Skip to main content
A request can succeed on our side while its response is lost on the way back. Retrying is then the right thing to do, as long as the retry cannot repeat the effect.

Which requests are safe to retry

The Idempotency-Key header

  • Choose any unique string of 8 to 200 characters, such as a UUID. Keys are scoped to your workspace.
  • Sending the same key again returns the original result. Nothing is sent or charged a second time.
  • The same key with a different request returns 422 idempotency_key_reused. For a reply, that means a different conversation, thread or text. For a placement test or a new campaign, any change to the request. Do not rely on other differences being caught: use a new key for every new request.
  • A launch is the exception to “the original result”: the same key returns the campaign as it is now, which may have changed since, and never launches it again. The first request’s send_window_mode stands.
  • If a launch answers 409 conflict, read the campaign’s status. running tells you the campaign is running, not that your key launched it: someone else may have.
  • If a retry arrives while the first request is still being processed, wait a moment and retry with the same key. A placement test answers 409 conflict until then; a reply answers with the stored message, its delivery_status still pending.

Sending replies

A reply’s delivery_status is sent, failed, pending or unknown. unknown means we could not confirm the send. The same key keeps returning that stored message and never sends again, so a retry does not resolve it. The conversation is read from stored history, which can lag behind the mailbox, so a reply missing there is not proof that it was not sent. Check the mailbox itself, or wait and read again, before sending it again with a new key. A message that ends as failed was not sent, and its key keeps returning that failed message. To try again, send it with a new key.