Skip to main content
List endpoints, such as GET /v1/signatures and GET /v1/teammates, return results one page at a time using cursor-based pagination. Results are ordered newest first.

Query parameters

ParameterTypeDescription
cursorstringThe next_cursor from the previous response. Omit it on the first request.
limitintegerPage size. Defaults to 50. Maximum 100.

The pagination object

Every list response includes a pagination object alongside the data array:
{
  "data": [ ... ],
  "pagination": {
    "next_cursor": "eyJpZCI6MTQ4M30",
    "has_more": true,
    "limit": 50
  }
}
FieldDescription
next_cursorPass this back as cursor to fetch the next page. It is null on the last page.
has_moretrue when more pages are available.
limitThe page size applied to this response.
The cursor is opaque. Do not parse or build it yourself; pass back the exact value you received. A malformed cursor returns an error response.

Fetch every page

Request the first page, then pass each next_cursor back as cursor until it is null:
# First page
curl "https://api.scribe-mail.com/v1/teammates?limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Next page: use the next_cursor from the previous response
curl "https://api.scribe-mail.com/v1/teammates?limit=100&cursor=eyJpZCI6MTQ4M30" \
  -H "Authorization: Bearer YOUR_API_KEY"
The same loop in JavaScript:
async function listAllTeammates(apiKey) {
  const results = [];
  let cursor = null;

  do {
    const url = new URL("https://api.scribe-mail.com/v1/teammates");
    url.searchParams.set("limit", "100");
    if (cursor) url.searchParams.set("cursor", cursor);

    const res = await fetch(url, {
      headers: { Authorization: `Bearer ${apiKey}` },
    });
    const body = await res.json();

    results.push(...body.data);
    cursor = body.pagination.next_cursor;
  } while (cursor);

  return results;
}