Pagination
Every list endpoint returns at most 50 records per request and uses cursor-based pagination.
List envelope
Section titled “List envelope”{ "object": "list", "data": [ /* up to 50 objects */ ], "has_more": true, "next_cursor": "cnt_9f2c8e7b1a3d4f60"}datais an array of resources in the endpoint’s default sort order (usuallycreated_atdescending).has_moreistruewhen there are more records available.next_cursoris the id of the last record indata. Pass it as thecursorquery parameter to fetch the next page.
Fetching a page
Section titled “Fetching a page”curl "https://app.nativpost.com/api/v1/content?limit=25" \ -H "Authorization: Bearer $NATIVPOST_API_KEY"Fetching the next page
Section titled “Fetching the next page”curl "https://app.nativpost.com/api/v1/content?limit=25&cursor=cnt_9f2c8e7b1a3d4f60" \ -H "Authorization: Bearer $NATIVPOST_API_KEY"Continue until has_more is false.
Parameters
Section titled “Parameters”| Name | Type | Default | Notes |
|---|---|---|---|
limit | integer | 50 | Between 1 and 100. |
cursor | string | null | Id returned as next_cursor on the previous page. |
Filtering while paginating
Section titled “Filtering while paginating”List filters (for example status=scheduled) are stable across pages. Pass the same filter values on every request in the sequence.
When cursors expire
Section titled “When cursors expire”Cursors remain valid as long as the referenced record exists. If a record was deleted between requests, the API returns 400 invalid_request with param: "cursor". Restart pagination from the beginning.