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.
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:
# 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:
statuspicks the column:backlog,progress,review,done, shown as Backlog, In progress, In review and Done;assignee.memberIdpicks the person in the People view (nullis Unassigned);positionorders 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
#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:
/api/v1/tasks/{taskId}/moveMove 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 gets412 version_conflict - MCP tool
move_task
move_task| Field | Meaning |
|---|---|
status | The target column. Required. |
assigneeMemberId | The 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. |
after | The task that will be directly above the moved card in its target place. |
before | The task that will be directly below it. |
placement | top 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"}'async function moveCard(task, { status, assigneeMemberId, after, before, placement }) {
const body = {
status,
...(assigneeMemberId !== undefined && { assigneeMemberId }),
...(after && { after }),
...(before && { before }),
...(placement && { placement }), // 'top' or 'bottom', when you name no neighbours.
};
const response = await fetch(`https://taskloader.com/api/v1/tasks/${task.id}/move`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}`,
'Content-Type': 'application/json',
'If-Match': `"${task.version}"`,
},
body: JSON.stringify(body),
});
const result = await response.json();
return { status: response.status, result }; // 200: the moved task, with its new position and version.
}import os
import requests
def move_card(task, status, assignee_member_id=..., after=None, before=None, placement=None):
body = {"status": status}
if assignee_member_id is not ...:
body["assigneeMemberId"] = assignee_member_id # People view only; None is Unassigned.
if after:
body["after"] = after
if before:
body["before"] = before
if placement:
body["placement"] = placement # "top" or "bottom", when you name no neighbours.
response = requests.post(
f"https://taskloader.com/api/v1/tasks/{task['id']}/move",
headers={
"Authorization": f"Bearer {os.environ['TASKLOADER_API_KEY']}",
"If-Match": f"\"{task['version']}\"",
},
json=body,
timeout=30,
)
return response.status_code, response.json() # 200: the moved task, with its new position and version.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:
| Answer | Meaning | Do |
|---|---|---|
200 | Moved | Replace the card with the answer. |
412 version_conflict | Someone changed the task since you loaded it | Put 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_changed | after 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_member | The target person is no longer in the project | Reload the members. |
403 forbidden_role | The person is a viewer | Do not offer dragging to viewers in the first place: check currentMember.role from GET /projects/{projectId}. |
To reload one place, search with its filters:
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, butpositionvalues 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.updatedwithvia.channelsystem). When the page cannot be read, it is named after the words of its link, and renamed once more if a later read succeeds. Itsbookmark.previewis thenfailed, with that title, a well-known site'ssiteNameand the site'siconwhen 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.