Pagination
The lists that can grow long come a page at a time, newest first: each page names where the next one starts. The others answer in full.
Cursor pages
Messages, email templates and failed webhook deliveries page by cursor:
- Name
limit- Type
- integer
- Description
How many on a page, from 1 to 100; 25 by default.
- Name
cursor- Type
- string
- Description
Leave it out for the first page; then send the last page's
next, as it came.
Each page holds its items and next, which is null on the last page. Treat a cursor as opaque, and send each list only its own: their forms differ from list to list, and one that is no cursor at all is refused, 400 BAD_REQUEST.
Every message, a page at a time
cursor=''
while :; do
page=$(curl -sG https://api.oblic.app/external/v1/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d limit=100 ${cursor:+-d cursor="$cursor"})
echo "$page" | jq -c '.data.messages[]'
cursor=$(echo "$page" | jq -r '.data.next // empty')
[ -z "$cursor" ] && break
done
A cursor names the last item of its page, so items added while you page don't shift the pages after it: they come first, where a read from the first page finds them.
Contact lists
The contact lists page by offset, in the path: /external/contact-list/v1/{nextIndex}/{limit}. Start at 0; each page says, in moreIndicator, whether there are more (Y or N), and in nextIndex, where the next page starts.
Lists in full
Sender identities, webhook endpoints, sub-accounts, SMS headers and templates, and WhatsApp templates answer in full, with no pages.