Developer docs

Implement idempotency, retries, and ordering

Keep an API integration consistent through timeouts, duplicate delivery, and concurrent events.

Updated 2026-07-24For: Backend developers · Architects

A network timeout does not prove that a request failed. Both API clients and callback consumers must implement idempotency by ID.

Inbound messages

  • Generate a stable messageId for each business message and keep it across retries.
  • Retry timeouts and 5xx responses with exponential backoff and jitter; do not create a new ID.
  • duplicate: true means NavoChat returned the original processing result.

Callbacks

  • Store event id durably so the same ID creates a business effect only once.
  • Persist or enqueue the event before returning 2xx.
  • Use conversationId + sequence for relative order inside a conversation.
  • Process different conversations concurrently.
  • Return a retryable status on failure; do not return 2xx and discard the event.

Closure and reopening

When a customer writes to a closed conversation using the same threadId, NavoChat reopens it. Treat conversation.reopened as a lifecycle change rather than creating a new external thread.

Related guides