Skip to main content

Pagination

Most lists return a bare JSON array. Posts and post activity let you opt into a counted envelope by adding ?limit= (1–100, optional ?offset=):

{ "results": [...], "count": 240, "limit": 50, "offset": 0 }
curl -s -H "X-API-Key: writemars_pat_..." \
"https://api.writemars.com/api/workspaces/my-team/posts/?limit=50&offset=50"

How the parameters behave:

  • limit is clamped to 1–100; a non-integer value returns 400.
  • offset defaults to 0; negative values are treated as 0; a non-integer value returns 400.
  • count is the total number of matching rows — keep fetching while offset + limit < count.

Endpoints with the envelope:

  • GET /api/workspaces/<slug>/posts/
  • GET /api/workspaces/<slug>/posts/<post_id>/activity/

Bounded bare-array pagination

Skills always return a bare array for compatibility, but the response is bounded to the newest 200 matching rows. Use limit (1–200) and offset to continue:

curl -s -H "X-API-Key: writemars_pat_..." \
"https://api.writemars.com/api/workspaces/my-team/skills/?limit=200&offset=200"

There is no count field on this shape. Keep requesting the next offset until a page contains fewer rows than the requested limit. The main Skills library drains these bounded pages before showing the library, which keeps its filters, counts, and empty states complete. Compact pickers and People profiles expose an explicit Load more action.

Other list endpoints that do not document pagination return their full visible array.