One key per logical Start
Send anIdempotency-Key header with POST /sessions. Use 16–128 ASCII letters, digits, underscores, or hyphens. A UUID is a suitable value.
The key belongs to your account. Replaying the same key with the same parsed JSON body returns the existing session identity instead of allocating another phone. JSON key ordering does not matter; changing fields or adding a formerly omitted default does.
Recover an ambiguous result
If your connection drops after sending the request, you may not know whether a phone was created. Look up the key:Illustrative response
id to continue polling. If no receipt is found, retry the original POST with the same key and body. Even if the earlier request arrives late, the key prevents a second allocation for that logical request.
Do not immediately generate another key because a request timed out.
Creation replay responses
The receipt remains available after the live session is removed.
state: "recorded" is a receipt state, not API readiness. state: "released" and cleanup_complete: true confirm completed cleanup.