Skip to content
DocsBuild a board

Guides

Build a board

Show a project as Taskloader does, by status and by person, from one list of tasks, and move cards with before, after and placement.

Updated View as Markdown

On this page

Taskloader shows a project in two views: Tasks, with a column per status, and People, with a heading per person above four status cells. Both are arrangements of the same list of tasks. This guide builds both from one API call and moves cards the way the app does.

You need projects:read and tasks:read to show a board, and tasks:write with the editor role to move cards.

Load the data

#

Two requests give you everything:

Shell
# The people, owner first, then in the order they joined.
curl "https://taskloader.com/api/v1/projects/$PROJECT_ID/members?limit=100" \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"

# Every task in board order (sort=position is the default for one project).
curl "https://taskloader.com/api/v1/projects/$PROJECT_ID/tasks?sort=position&limit=100" \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"

Follow nextCursor on both until hasMore is false. The API pages through every task, however many there are.

Each task's place on the board comes from three fields:

  • status picks the column: backlog, progress, review, done, shown as Backlog, In progress, In review and Done;
  • assignee.memberId picks the person in the People view (null is Unassigned);
  • position orders the tasks that share a place. Lower comes first.

Because the list is sorted by position, grouping it keeps each group in board order.

The two views

#
JavaScript
const STATUSES = ['backlog', 'progress', 'review', 'done'];

/** Tasks view: one column per status, cards in board order. */
function tasksView(tasks) {
  return STATUSES.map((status) => ({
    status,
    cards: tasks.filter((task) => task.status === status),
  }));
}

/** People view: a heading per member, then Unassigned, each over the four status cells. */
function peopleView(tasks, members) {
  const people = [
    ...members.map((member) => ({ memberId: member.id, name: member.name })),
    { memberId: null, name: 'Unassigned' },
  ];
  return people.map((person) => ({
    ...person,
    cells: STATUSES.map((status) => ({
      status,
      cards: tasks.filter(
        (task) => task.status === status && (task.assignee?.memberId ?? null) === person.memberId,
      ),
    })),
  }));
}

Both views are built from the same task objects, so a selected task's id, and any filter you applied to the list, carry over when you switch between them.

Moving a card

#

A move sets a task's status, optionally its assignee, and its place among its new neighbours:

POST/api/v1/tasks/{taskId}/move

Move a task. Puts a task in a status column (and assignee), between neighbours or at an edge.

Scopes
tasks:write
Who can call it
Editor or above in the project
Project-limited credentials
Allowed when the project is one of the credential’s projects
Version
Send If-Match: "<version>" (required); a stale version gets 412 version_conflict
MCP tool
move_task
Reference for move_task
FieldMeaning
statusThe target column. Required.
assigneeMemberIdThe target person in the People view: a member id, me, or null for Unassigned. Leave it out in the Tasks view, so the move never changes who the task belongs to.
afterThe task that will be directly above the moved card in its target place.
beforeThe task that will be directly below it.
placementtop or bottom of the target place, when you do not name neighbours. Without neighbours or placement, the card goes to the bottom.

Send the neighbours you know: both when the card lands between two others, one at either end, none (or placement) in an empty place. They must be in the target place right now: the target column in the Tasks view, or the target person's status cell in the People view. Taskloader computes the new position from them, exactly as the app does.

Use move_task for moves. update_task can change status or the assignee too, but it keeps the task's position as it is, so the card lands wherever that position falls in its new place.

# Move TL-013 into In review, between two cards, keeping its assignee.
curl https://taskloader.com/api/v1/tasks/task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718/move \
  -H "Authorization: Bearer $TASKLOADER_API_KEY" \
  -H "Content-Type: application/json" \
  -H 'If-Match: "3"' \
  -d '{"status":"review","after":"task_95e04b630a1a03ee30565c8e55b2eecf","before":"task_88552042f5c0677a7caaf5cc10529dcc"}'

The answer is the moved task. Replace your copy with it: its position, status, assignee and version are now the server's.

Optimistic moves and what can go wrong

#

For a responsive board, move the card on screen at once, send the move, then reconcile:

AnswerMeaningDo
200MovedReplace the card with the answer.
412 version_conflictSomeone changed the task since you loaded itPut the card back where current says it is now, and let the person try again. The problem's current holds the whole task.
409 neighbors_changedafter or before moved away or is gone, or after is now below before; detail says which and where it is now ("TL-007 (after) is in Backlog, not In review. Pass neighbours from that column…")Reload that place (below), then send the move again with the new neighbours, or with placement.
422 assignee_not_memberThe target person is no longer in the projectReload the members.
403 forbidden_roleThe person is a viewerDo not offer dragging to viewers in the first place: check currentMember.role from GET /projects/{projectId}.

To reload one place, search with its filters:

Shell
curl "https://taskloader.com/api/v1/projects/$PROJECT_ID/tasks?status=review&assigneeMemberId=mem_6eeb754d7a80739034c6d9fa93e0a741&sort=position" \
  -H "Authorization: Bearer $TASKLOADER_API_KEY"

Use assigneeMemberId=unassigned for the Unassigned row.

Moves do not need an Idempotency-Key: the version protects them. If a move's answer is lost and you send it again, you get 412. If current is already where you put it, you are done; otherwise someone else changed the task, or your first request never arrived: decide again with current, as for any 412.

Keeping the board live

#

Follow the project's changes feed with wait=25 and update cards as events arrive: fetch the task on task.created, task.updated and task.moved, remove it on task.deleted. Sync tasks has a complete loop.

Two events matter only for boards:

  • tasks.reordered: Taskloader respaced positions in the project to make room (the tasks around the spot a move went to). Order and versions did not change, but position values did: reload the positions before computing a move locally.
  • A new bookmark is renamed when its page has been read, which raises its version (task.updated with via.channel system). When the page cannot be read, it is named after the words of its link, and renamed once more if a later read succeeds. Its bookmark.preview is then failed, with that title, a well-known site's siteName and the site's icon when the site gave it: show them as you would a read page's.

Accessibility

#

Dragging is not the only way to move a card. Offer the same move from the keyboard and a menu (status, person, up and down), and announce the result. The API call is the same.