Voice

Create a voice token

Changed on

Mints a short-lived token for one of your app users. Call this from your backend and return the token to your app, which passes it to the voice client SDK to register. The identity is bound to the given number, or to your default app-call number when omitted, and calls placed by that identity are routed through the bound number. Minting again re-binds the identity, so an identity can move between numbers.

post/v3/voice/tokens

Request

  • Base URL
    https://api.sent.dm
  • URL
    https://api.sent.dm/v3/voice/tokens
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Headers

Idempotency-Keystring

Unique key to ensure idempotent request processing. Must be 1-255 alphanumeric characters, hyphens, or underscores. Responses are cached for 24 hours per key per customer.

x-profile-idstring uuid

Profile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization.

Request body

sandboxboolean

Sandbox flag - when true, the operation is simulated without side effects Useful for testing integrations without actual execution

identitystring

Your identifier for the app user, such as an agent or account id. Letters, digits, hyphens and underscores only, up to 200 characters.

numberstring nullable

One of your voice-enabled phone numbers in E.164 format. Calls placed by this identity are routed through that number. Omit to use your default app-call number.

ttlinteger nullable

Token lifetime in seconds. Defaults to 600 and cannot exceed 3600.

Example request

{
  "identity": "agent-42",
  "number": "+12025550123",
  "ttl": 600,
  "sandbox": false
}

Response

Token minted and identity bound to the number

successboolean

Indicates whether the request was successful

Changes