Skip to main content
Each list endpoint answers in one of four shapes:

All at once

These lists have no pages, and answer with a bare array. GET /workspaces:
200
GET /posts/{id}/people is the one that puts its list in data, with nothing else:
200
Items on this page are cut down to a few fields. Each endpoint’s reference page has them all. Send page (1 by default) and, on posts and media, per_page. per_page above 100 gives 100. On posts and media, a per_page or page below 1, or that isn’t a number, answers 422. Deliveries read such a page as page 1. GET /posts?page=2&per_page=2, with 5 posts in all:
200
  • meta.last_page is the last page, and meta.total the number of items in all. On the last page, links.next is null.
  • meta.links has one entry for each page button, for showing pages to people.
  • links keep only page. They drop per_page and every filter, such as workspace_id or folder_id on media. Build the next request yourself: the same query, with page one higher.
Posts come newest first, media newest first, deliveries newest first.

Numbered pages, with pagination

Send page and per_page (1 to 100; above 100 answers 422). GET /comments?post_id=1203&per_page=20:
200
Read on while has_more_pages is true. Comments come oldest first. Reviews come unanswered first, then newest, and their answer also has meta.unanswered: how many reviews have no reply.

A cursor

GET /posts/{id}/history gives up to 20 entries, newest first, and next:
200
To read on, send next back as before: GET /posts/1203/history?before=98377. next is null on the last page.

Read every page

This reads every post, 100 at a time. It sends each page through send() from Rate limits, so a 429 waits and tries again. The same loop works for media, with any filters added to the query.
For comments and reviews, stop when pagination.has_more_pages is false. For history, stop when next is null. Each page is counted when you ask for it, so the list can move while you read. A post made or deleted during the read shifts the others: one can show up twice, which the loop keeps once, and one can be missed. For an exact copy, read every page again. Each page is one request toward your 60 a minute.

Rate limits

60 requests a minute, and how to wait out a 429.

Error handling

Every status and error code, and when to try again.