sign.ytDocs

Core concepts

Pagination

Paginated list endpoints return a plain JSON array and put the pointer to the next page in response headers.

Paginated endpoints#

EndpointParameters
GET /api/v1/documentslimit (1-100, default 50), cursor, legacy offset
GET /api/v1/webhooks/{webhook_id}/deliverieslimit (1-100, default 50), cursor, legacy offset
GET /api/v1/flow-runslimit (1-200), filters flow_id and status; no cursor

Other collections (/templates, /webhooks, /flows, /template-catalog) are returned in full.

How it works#

  1. Request the first page with a limit.
  2. If more results may exist, the response carries X-Next-Cursor: <cursor> and a Link header with rel="next".
  3. Request the next page with cursor=<cursor> (keep the same limit). When neither header is present you have reached the last page.
HTTP/1.1 200 OK
Content-Type: application/json
X-Next-Cursor: bzo1MA
Link: </api/v1/documents?limit=50&cursor=bzo1MA>; rel="next"

The Link target is a path relative to the API host; it keeps your other query parameters and replaces cursor/offset.

Cursors are opaque strings: do not build or parse them. A malformed cursor returns 422 with code invalid_cursor. offset keeps working for existing integrations but is ignored when cursor is set. A full last page may still return a cursor, in which case the following request returns an empty array.

Loop through all pages#

url="https://api.sign.yt/v1/documents?limit=100"
while [ -n "$url" ]; do
  curl -sS -D headers.txt -o page.json "$url" -H "Authorization: Bearer $SIGNYT_API_KEY"
  jq -r '.[] | [.id, .status, .title] | @tsv' page.json
  cursor=$(grep -i '^x-next-cursor:' headers.txt | awk '{print $2}' | tr -d '\r')
  url=${cursor:+"https://api.sign.yt/v1/documents?limit=100&cursor=$cursor"}
done

The SDKs' documents.list() methods currently take limit and offset; use raw HTTP as above for cursor iteration.

Ordering and consistency#

Pages are cut from the same ordered list on every request, so documents created while you paginate can shift items between pages. For a consistent export, record the IDs you have seen and de-duplicate, or use webhooks to track changes instead of repeated full listings.