Sync conversations to your system

Combine signed webhooks with REST reconciliation to maintain a reliable local conversation view.

Use webhooks for low-latency notifications and the REST API for authoritative state. A webhook-only sync can drift when a delivery is discarded; polling alone adds delay and load.

Prerequisites

  • A server-side bearer token.
  • A signed webhook receiver.
  • Durable storage for conversation IDs and sync cursors.

Initial sync

List each inbox and walk its paginated conversations, following links.next until it is null. Store the stable conversation id, not only the human-facing ticket_id.

curl "https://api.thrivedesk.com/v1/inboxes/INBOX_ID?per-page=100&page=1" \
  -H "Authorization: Bearer $THRIVEDESK_TOKEN"

Incremental sync

Subscribe to conversation webhook events. Verify each signature, deduplicate it, enqueue it, then fetch the affected conversation by data.id before updating your database.

curl "https://api.thrivedesk.com/v1/conversation/CONVERSATION_ID" \
  -H "Authorization: Bearer $THRIVEDESK_TOKEN"

Run a periodic reconciliation pass to recover from delayed or discarded webhook deliveries.

Errors

Honor Retry-After on 429, quarantine schema failures for inspection, and treat a webhook fetch 404 as a possible deletion rather than immediately recreating the record.