REST API
Changes feed
Follow everything that changes in a project, in order and without gaps. Cursors, long-polling, event types, the 7-day retention and how to resync after a 410.
On this page
The changes feed lists what changed in a project, in a stable order and without gaps. Use it to keep a copy of a project up to date: a mirror, a search index, a report, a board in another tool. Sync tasks builds one step by step.
/api/v1/projects/{projectId}/eventsRead a project’s changes feed. Lists every change to a project in a stable, gap-free order after a cursor; can wait for new ones.
- Scopes
tasks:read- Who can call it
- Viewer or above in the project
- Project-limited credentials
- Allowed when the project is one of the credential’s projects
list_eventsGET /projects/{projectId}/events?after=<cursor>&wait=25How it works
#- Events are thin. An event says what changed (
task.updated, the task's id and key, the newversion, the names of the changed fields) but never the content: no titles, descriptions or comment text. Fetch the resource to see it. That fetch checks access again, so someone who loses access to a project cannot read its content from the feed. - Events come in a stable order, without gaps. An event is returned only once every transaction that started writing before it has finished, so nothing can appear later behind a cursor you already moved past. The order follows when each change started writing, so it can differ slightly from the order in which changes finished;
occurredAtis when each one was saved. - The cursor is your bookmark. Every answer has a
nextCursor, even when there were no events. Store it after you process a page, and send it asafternext time. - Long-polling. With
wait=25, Taskloader holds the request open for up to 25 seconds and answers as soon as there is something to return. You get changes within about a second, without polling in a tight loop. - Events are kept for 7 days. A cursor answers
410 cursor_expiredonly once events after it may have been removed, which never happens within 7 days of reading it; then you resync.
Parameters
#| Parameter | Meaning |
|---|---|
after | Where to continue: a nextCursor from an earlier answer. Leave it out to start from the oldest event still kept (up to 7 days back). Send after=now to start from this moment and see only new changes. |
wait | Seconds to wait for new events when there are none yet: 0 to 25. Leave it out (or send 0) to answer at once. |
types | Only these event types, comma-separated: types=task.created,task.deleted. A cursor belongs to the types it was read with: send the same types with after=now and with every later read. |
limit | Events per page: 50 by default, up to 200. |
Why the cursor remembers types: a read with types moves past the events it leaves out, so continuing that cursor with other types would skip events without a word. A cursor sent with other types is refused with 400 invalid_cursor instead. To change the types you follow, take a new cursor with after=now (and resync if you cannot miss anything in between).
The answer
#A page of events, oldest first:
HTTP/1.1 200 OK
Content-Type: application/json
{
"object": "list",
"data": [
{
"object": "event",
"id": "evt_1042",
"type": "task.moved",
"projectId": "prj_0b6f1d2a8c9e4f00a1b2c3d4e5f60718",
"subject": {
"type": "task",
"id": "task_0b6f1d2a8c9e4f00a1b2c3d4e5f60718"
},
"taskKey": "TL-012",
"data": {
"fromStatus": "progress",
"toStatus": "review",
"version": 5,
"fields": [
"status"
]
},
"actor": {
"userId": "usr_kq3Xb1W9pZ0aLm7c"
},
"via": {
"channel": "api",
"label": "API key “CI”"
},
"occurredAt": "2026-11-18T10:00:00.123Z"
}
],
"hasMore": false,
"nextCursor": "eyJ2IjoxLCJvIjoibGlzdF9ldmVudHMi…"
}| Field | Meaning |
|---|---|
id | evt_ and a number |
type | What happened; see Event types |
projectId | The project (prj_…) |
subject | What it happened to: its type (task, comment, attachment, link_preview, member or project) and its public id (task_…, cmt_…, att_…, lnk_…, mem_… or prj_…) |
taskKey | The task's key when the event concerns a task, kept even after the task is deleted; otherwise null |
data | Ids, versions and changed field names; see below |
actor | Who made the change (userId), or null for Taskloader's own background work |
via | Through what: web, api, mcp, assistant or system, and a label. See Provenance. |
occurredAt | When the change was saved |
When hasMore is true, more events are waiting: ask again straight away with nextCursor.
Event types
#The list of types is open: new types may appear in v1, so skip types you do not know. data carries ids, versions and the names of changed fields, never content. A member event names the person and their role (userId, role) only to a credential with projects:read, the scope the members list needs; without it, data has memberId only. The members listed here are the ones to rely on; more may be added. Ids in data are public ids, so you can fetch what they name straight away.
| Type | Sent when | data |
|---|---|---|
task.created | A task was created, including by create_tasks and add_bookmark. | version |
task.updated | A task’s fields changed: through update_task, edit_checklist or remove_bookmark, when its assignee left the project, when Taskloader renamed a new bookmark (then via.channel is system), or once when Taskloader rewrote a title saved before the one-line rule (also system). | fields, version |
task.moved | A task was moved with move_task. | fromStatus, toStatus, fields, version |
task.deleted | A task was deleted; subject.id and taskKey still name it. | key |
tasks.reordered | Taskloader respaced the positions of the project’s tasks to make room for a move, without changing their order or versions. | None |
comment.created | Someone commented on a task. | taskId, commentId |
attachment.created | A file was attached to a task. | taskId, attachmentId |
attachment.deleted | A file was deleted. | taskId, attachmentId |
attachment.preview_ready | A file’s preview image is ready: one Taskloader made, or one its uploader sent for a finished file. | taskId, attachmentId |
link_preview.updated | A bookmarked page’s preview was read or refreshed (always by Taskloader, so actor is null). | previewId |
member.added | Someone joined the project: added, through an invitation link, or by joining as an organization admin. | memberId, userId, role |
member.removed | Someone left the project or was removed from it. | memberId, userId, role |
member.role_changed | A member’s role changed. | memberId, userId, role |
project.updated | The project’s name or description changed, or it was archived or restored (fields holds archived); once by Taskloader itself, system, when it rewrote a name saved before the one-line rule. | fields, version |
data member | Holds |
|---|---|
version | The subject’s version after the change. |
fields | The names of the fields that changed. |
fromStatus | The status before a move. |
toStatus | The status after it. |
key | The deleted task’s key. |
taskId | The task (task_…). |
commentId | The comment (cmt_…). |
attachmentId | The file (att_…). |
previewId | The link preview (lnk_…). |
memberId | The membership (mem_…). |
userId | The person (usr_…), with projects:read only. |
role | The member’s role (after the change, or when they left), with projects:read only. |
Following the feed
## The first call starts at the current moment; each later call continues from nextCursor.
curl "https://taskloader.com/api/v1/projects/$PROJECT_ID/events?after=now&wait=25" \
-H "Authorization: Bearer $TASKLOADER_API_KEY" \
--max-time 40// follow.mjs: node follow.mjs prj_… (Node.js 20 or later)
const API = 'https://taskloader.com/api/v1';
const auth = { Authorization: `Bearer ${process.env.TASKLOADER_API_KEY}` };
const projectId = process.argv[2];
const sleep = (seconds) => new Promise((resolve) => setTimeout(resolve, seconds * 1000));
let cursor = 'now'; // In a real integration, load the cursor you stored last time.
for (;;) {
const url = new URL(`${API}/projects/${projectId}/events`);
url.searchParams.set('after', cursor);
url.searchParams.set('wait', '25');
url.searchParams.set('limit', '200');
const response = await fetch(url, { headers: auth, signal: AbortSignal.timeout(40_000) });
// Limits, and outages: a proxy's 502 or 504 page is HTML, so wait before reading JSON.
if ([429, 502, 503, 504].includes(response.status)) {
await sleep(Number(response.headers.get('retry-after') ?? 5));
continue;
}
const page = await response.json();
if (response.status === 410)
throw new Error(
'Cursor expired: resync as in "Resyncing after a 410" (take a new cursor first, then list the tasks), and follow from that cursor.',
);
if (!response.ok) throw new Error(`${response.status} ${page.code}: ${page.detail}`);
for (const event of page.data)
console.log(event.occurredAt, event.type, event.taskKey ?? event.subject.id);
cursor = page.nextCursor; // Store it now, so a restart continues from here.
}# follow.py: python3 follow.py prj_…
import os
import sys
import time
import requests
API = "https://taskloader.com/api/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['TASKLOADER_API_KEY']}"
project_id = sys.argv[1]
cursor = "now" # In a real integration, load the cursor you stored last time.
while True:
response = session.get(
f"{API}/projects/{project_id}/events",
params={"after": cursor, "wait": 25, "limit": 200},
timeout=40,
)
# Limits, and outages: a proxy's 502 or 504 page is HTML, so wait before reading JSON.
if response.status_code in (429, 502, 503, 504):
time.sleep(int(response.headers.get("Retry-After", "5")))
continue
page = response.json()
if response.status_code == 410:
raise SystemExit(
'Cursor expired: resync as in "Resyncing after a 410" (take a new cursor first,'
" then list the tasks), and follow from that cursor."
)
if not response.ok:
raise SystemExit(f"{response.status_code} {page['code']}: {page['detail']}")
for event in page["data"]:
print(event["occurredAt"], event["type"], event["taskKey"] or event["subject"]["id"])
cursor = page["nextCursor"] # Store it now, so a restart continues from here.Give the HTTP request a timeout longer than wait: 40 seconds works well. Long-polls count against your search limit, so run one loop per project rather than many.
Resyncing after a 410
#A cursor answers 410 cursor_expired once events after it may have been removed (events are kept 7 days and removed oldest first), so you cannot know what you missed. Rebuild from the current state:
- Get a fresh starting point first:
GET /projects/{projectId}/events?after=now, and keep itsnextCursor. - List the current tasks:
GET /projects/{projectId}/tasks?sort=createdAt, page by page, and replace your copy with what you get.createdAtnever changes, so a task edited while you page cannot move past your position. Tasks you have that are not listed were deleted. - Refresh anything else you mirror the same way (members, comments, files).
- Follow the feed from the cursor of step 1.
Taking the cursor before listing means nothing that changes during the resync is lost. You may see a few events for changes you already listed; fetching those resources again is harmless.
Errors
#| Status and code | Meaning | What to do |
|---|---|---|
410 cursor_expired | The cursor is older than the 7-day retention | Resync |
400 invalid_cursor | The cursor was changed, comes from another project or list, or was read with other types | Send the cursor with the types it was read with; otherwise start again with after=now, or resync |
400 validation_failed | wait, limit or types is out of range, or names an unknown type | Fix the parameter |
404 not_found | The project does not exist, or you no longer have access to it | Stop following it |
429 rate_limited | Too many requests | Wait Retry-After seconds |
Good to know
#- Short delays happen. A change appears once every transaction that started before it has finished. Normally that is well under a second; a long-running transaction delays the feed until it ends, and the feed pauses briefly while Taskloader is being updated. Nothing is lost.
- Events are not history. For people, read activity (
list_task_activity,list_project_activity): it has readable messages and comment text, and is kept for the life of the task. See Activity and events. - Positions. After
tasks.reordered, read positions again (GET /projects/{projectId}/tasks?sort=position) if you show board order. - Bookmarks get renamed by Taskloader after their page is read: you see a
task.updatedwithvia.channelsystem. A bookmark whose page could not be read is named after the words of its link, and renamed once more if a later read succeeds. - Push delivery (webhooks and streams) is planned; see Status. It will use the same events.