Idempotency
The Idempotency-Key header: safe retries without double sends.
Pass a unique Idempotency-Key header on POST /messages (≤255 chars). If the request is retried with the same key, the original message is returned - no second charge and no second send. Omit the header for a non-deduplicated send. The key is bound to the request: the same key with a different recipient or body is 409 IDEMPOTENCY_CONFLICT. POST /verify accepts the same header and replays the original verification. POST /contacts needs no key: it is inherently idempotent on the phone number, so a retry updates the same contact instead of creating a duplicate.
# Second POST with the same Idempotency-Key returns the original message:
{
"id": "cmqzkdkul0007p20mf0r4tz21",
"status": "queued",
...
"credits_charged": 1
}