Skip to content

Pagination

All list endpoints in the ywork API return results in pages using cursor-based pagination. This keeps results stable even when items are added or removed between requests.

Parameter Type Description
limit integer Maximum items to return, 1100. Defaults to 20.
cursor string An opaque cursor from a previous page. Omit to fetch the first page.

Every paginated response is a list object with a data array and a pagination object:

{
"object": "list",
"data": [
{ "id": "prj_8Hs2Kd0aZq", "object": "project", "name": "Website redesign", "key": "WEB" }
],
"pagination": {
"has_more": true,
"next_cursor": "eyJvIjoyMH0"
}
}
  • has_more — whether more items exist after this page.
  • next_cursor — pass this as cursor to fetch the next page, or null when there are no more results.
Terminal window
curl "https://docs.ywork.dev/api/v1/projects?limit=20&cursor=eyJvIjoyMH0" \
-H "Authorization: Bearer ywork_sk_live_2f8c1b9a4d7e6031"

Keep requesting with the returned next_cursor until has_more is false.