Skip to main content
List endpoints (e.g., GET /people, GET /companies, POST /people/search) return paginated responses:
{
  "data": [ /* up to `limit` items */ ],
  "next_cursor": "eyJpZCI6Ii4uLiIsImNyZWF0ZWRfYXQiOiIuLi4ifQ"
}
When next_cursor is null, you’ve reached the end.

Requesting the next page

Pass cursor back in the query string:
curl "$SALTY_API/people?limit=50&cursor=eyJpZCI6..." \
  -H "Authorization: Bearer $SALTY_API_KEY"

Ordering

Default order is created_at desc, id desc. POST /people/search lets you override via sort:
{
  "sort": [{ "first_name": "asc" }],
  "limit": 100
}

Limits

  • Default limit: 50
  • Max limit: 200
  • Above 200 → silently clamped to 200

Cursor format

The cursor is base64url-encoded JSON of { id, createdAt } — treat it as opaque. Don’t construct or parse it; just pass back what the server returned.

Walk the whole set

let cursor: string | null = null;
const all: Person[] = [];
do {
  const { data } = await salty.people.getPeople({
    query: { limit: 100, cursor: cursor ?? undefined },
  });
  all.push(...data.data);
  cursor = data.next_cursor;
} while (cursor);