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. 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.
Replay · 200 OK
# Second POST with the same Idempotency-Key returns the original message:
{
"id": "cmqzkdkul0007p20mf0r4tz21",
"status": "queued",
...
"credits_charged": 1
}