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.
Request parameters
Section titled “Request parameters”| Parameter | Type | Description |
|---|---|---|
limit |
integer | Maximum items to return, 1–100. Defaults to 20. |
cursor |
string | An opaque cursor from a previous page. Omit to fetch the first page. |
Response shape
Section titled “Response shape”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 ascursorto fetch the next page, ornullwhen there are no more results.
Fetching the next page
Section titled “Fetching the next page”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.