Every list answers the same way:
{
"data": [ { "…": "…" } ],
"next_cursor": "MjAyNi0xMS0yM1QxMDowMDowMC4wMDBafDAxNTQxMTVk"
}
- Newest first.
limitis 1–100 and 25 by default.next_cursorisnullon the last page — never missing, so you can loop on it without checking whether the field is there.
Walking a list
cursor=""
while :; do
page=$(curl -s "https://app.talkturo.com/api/v1/contacts?limit=100&cursor=$cursor" \
-H "Authorization: Bearer $TALKTURO_KEY")
echo "$page" | jq -c '.data[]'
cursor=$(echo "$page" | jq -r '.next_cursor // empty')
[ -z "$cursor" ] && break
done
The cursor is opaque
Pass back exactly what we gave you. It is not a page number, not an offset, and its contents are not a promise — they will change. A cursor we did not issue answers 400:
{
"error": {
"code": "invalid_request",
"message": "cursor: This cursor is not one we issued.",
"details": [{ "field": "cursor", "problem": "This cursor is not one we issued." }]
}
}
We refuse it rather than quietly serving page one, because a server that silently restarts hands you the same rows forever and looks like it is working.
Why not page=2?
Because rows arrive while you are reading. With page numbers, a contact created between your first and second request pushes everything down one, so you see one row twice and never see another. The cursor is a position in the list rather than a count into it, so a page boundary stays where it was however busy the workspace is.
Two consequences worth knowing:
- A row added while you page is not guaranteed to appear. It is newer than where you are, and you are walking away from it. Page again from the start if you need it.
- Filters stay applied.
search,status,group_idand the rest keep working on every page; the cursor does not replace them. Send the same filters with each request along with the cursor.
The two lists that are different
GET /v1/plans and GET /v1/templates shipped before this shape existed and answer their own: plans gives { "data": [...] } with no cursor and at most 100 rows; templates gives { "connected": true, "templates": [...] }. Their clients already read those names, so they are left as they are.
GET /v1/calls pages like everything else, but its cursor is a timestamp rather than an opaque string — same reason.