KonektDevelopersYour API keys

Pagination

Every list takes two query parameters and answers the same shape.

ParameterMeaning
limitHow many items to return. The default is 50 and the most is 200.
cursorThe next_cursor of the previous page. Leave it out for the first page.
{
  "items": [ { "id": "..." } ],
  "next_cursor": "eyJwIjo1MH0",
  "complete": false
}

To read a whole list, call again with cursor set to the next_cursor you were given, until complete is true and next_cursor is null.

cursor=""
while :; do
  page=$(curl -s "https://app.konekt.so/api/v1/workspaces/$WS/leads?limit=200&cursor=$cursor" \
    -H "Authorization: Bearer $KEY")
  echo "$page" | jq -c '.items[]'
  cursor=$(echo "$page" | jq -r '.next_cursor // empty')
  [ -z "$cursor" ] && break
done

Good to know

  • A cursor is opaque. Do not build or change one. Its content can change between releases (the leads list pages by position since decision 0166); a cursor from the earlier form is still accepted, so a read that spans a release does not break.
  • A cursor belongs to the list and the filters it came from. Using it with another list or other filters is refused with 422 and the reason invalid_cursor.
  • Some lists add fields beside the three, for example a total or counts.
  • GET /workspaces/{workspace_id}/inbox/conversations also takes since, a time, to read only what is new, and search_older to make a text search read message text older than 90 days (by default it reads the last 90 days of message text and always matches names).
  • The events feed pages in the order things happened. See Events and webhooks.