DeckleDocs
Dashboard

API reference

Pagination

List endpoints are cursor-paginated and return newest-first.

Every list endpoint — emails, contacts, campaigns, templates, automations, suppressions — returns a page of results with a cursor for fetching the next one.

Query parameters#

limitintegerOptional
Number of items per page. Defaults to 50, clamped between 1 and 100.
cursorstringOptional
The next_cursor from a previous response. Omit it to fetch the first page.

Response shape#

Results come back in a data array with two pagination fields. When has_more is false, next_cursor is null.

json
{
  "data": [ { "id": "contact_a1", "email": "jane@example.com" } ],
  "has_more": true,
  "next_cursor": "contact_a1"
}

Paging through everything#

Follow the cursor until there are no more pages:

ts
let cursor: string | undefined;
const all = [];

do {
  const page = await deckle.contacts.list({ limit: 100, cursor });
  all.push(...page.data);
  cursor = page.next_cursor ?? undefined;
} while (cursor);