API basics
Lists and the event feed
Cursor pagination, and the event feed that is the complete record of everything that happened.
Cursors
Texa API lists page with a cursor, never an offset. An answer gives you next; pass it as after
to get the page after it. has_more says whether there is one.
curl "https://api.texadesk.com/v1/events?limit=100" -H "Authorization: Bearer $TEXA_API_KEY"
{"events": [{"id": "evt_431", "type": "conversation.reply", "...": "..."}],
"next": "evt_530", "has_more": true}
curl "https://api.texadesk.com/v1/events?after=evt_530&limit=100" -H "Authorization: Bearer $TEXA_API_KEY"
limit is at most 1,000 for events. The SDKs page for you:
for event in texa.events(after=saved_cursor):
handle(event)
saved_cursor = event["id"]
let after = savedCursor;
for (;;) {
const page = await texa.eventsPage(after, 100);
for (const e of page.events) handle(e);
after = page.next;
if (!page.has_more) break;
}
The event feed
GET /v1/events holds every event of every conversation in your account, in order: replies,
action requests, handovers, closes, calls, media, quality scores. It is the complete record.
Webhooks push the same events, but if your server was down, read the feed from your last cursor
instead of waiting for retries.
typestakes a comma-separated list (conversation.reply,conversation.handover) for only those.- Keep the last
idyou handled; it's your cursor. - Events are the same in the feed and in webhooks, except that webhooks add
environment.
Texa Desk API lists
The Texa Desk API pages by number: page=2, with meta giving counts. Each endpoint in the
reference says its page size.