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.
  • 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.
  • The events feed pages in the order things happened. See Events and webhooks.