Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt

Use this file to discover all available pages before exploring further.

Every list endpoint in the Spotzee API uses cursor pagination. Cursors are stable across inserts and deletes, so you never miss or duplicate a record while paging.

Request parameters

ParameterDefaultNotes
limit251 – 100 inclusive
cursornoneOpaque cursor returned by a previous page
directionforwardforward (older → newer) or backward
sortendpoint-specificField to sort on. Prefix with - for descending, e.g. -created_at
qnoneFree-text search where the endpoint supports it

Response shape

{
  "results": [ /* up to `limit` records */ ],
  "nextCursor": "eyJpZCI6Mzg2OTI1fQ",
  "prevCursor": "eyJpZCI6Mzg2ODk2fQ",
  "limit": 25
}
FieldMeaning
resultsThe records on this page
nextCursorCursor for the next page; null when you’ve reached the end
prevCursorCursor for the previous page; null on the first page
limitEchoes the limit you asked for
has_more is derivable: it’s nextCursor !== null.

Response headers

For convenience, list endpoints also emit:
HeaderMeaning
X-Total-CountTotal records that match the query (best-effort; large collections may return an estimate)
X-PagePage index when one is meaningful
X-LimitEchoes the limit query parameter

Walking a list

async function* listAllContacts(token) {
  let cursor = null
  do {
    const url = new URL('https://apix.spotzee.com/api/client/contacts')
    url.searchParams.set('limit', '100')
    if (cursor) url.searchParams.set('cursor', cursor)

    const res = await fetch(url, { headers: { Authorization: `Bearer ${token}` } })
    const page = await res.json()
    yield* page.results

    cursor = page.nextCursor
  } while (cursor)
}

Sort

Pass sort as a single field name. Prefix with - for descending order:
GET /contacts?sort=-created_at
Endpoints document their valid sort fields. Sorting on a non-indexed field returns 400 parameter_invalid_format.

Filtering

Use simple ?key=value filters where supported. The fielded query language (AIP-160 syntax) is on the roadmap.

Limits in practice

  • Use limit=100 for bulk processing — fewer round-trips, predictable headers.
  • Use limit=25 (the default) for interactive UIs.
  • Going above 100 returns 400 parameter_invalid_format.

Next steps

Rate limits

Stay under your per-second budget while paging.

Errors

Status codes and the code catalogue.