Docs
Esc

Suggested

QuickstartGet started
Webhooks and signaturesMessaging
Create a messagemessages.create · POST /v1/accounts/{AC}/messages
RATE_LIMITED429 · Rate limit exceeded.
message.deliveredMessage resource
Contents

API reference

API keys

API reference descriptions are provided in English to preserve the exact published contract.

List API key metadata

GET/v1/accounts/{AC}/api-keys

apiKeys.listSDK operation getV1AccountsByAcApiKeys

List API keys: name, scopes, restrictions and last use. Secrets are never shown.

Parameters

  • limitinteger (1–100)query
  • cursorstring (max 2048 chars)query

Create an API key and reveal its secret once

POST/v1/accounts/{AC}/api-keys

apiKeys.createSDK operation postV1AccountsByAcApiKeys

Create an API key. The secret is in this response only; store it now. Give each key the fewest scopes it needs.

Request body

  • displayNamestring (max 128 chars)Required
  • scopesstring (pattern ^(?:[*]|[a-z][a-z0-9_-]*:[a-z*][a-z0-9_*-]*)$)[]Required
  • stepUpTokenstring (max 256 chars)Required
  • allowedCidrsstring (max 64 chars)[]
  • expiresAtstring (date-time)
  • requireSigningboolean
  • subaccountSidstring (SA… SID)

List the scopes an API key can be given

GET/v1/accounts/{AC}/api-keys/scopes

apiKeys.scopes.listSDK operation getV1AccountsByAcApiKeysScopes

The scope catalogue, grouped, with plain-language labels (M-38). held marks the scopes the caller may put on a new key: a key never exceeds the user or key creating it.

Get API key metadata

GET/v1/accounts/{AC}/api-keys/{SK}

apiKeys.retrieveSDK operation getV1AccountsByAcApiKeysBySk

Parameters

  • SKstring (SK… SID)Required

Update API key restrictions

PATCH/v1/accounts/{AC}/api-keys/{SK}

apiKeys.updateSDK operation patchV1AccountsByAcApiKeysBySk

Parameters

  • SKstring (SK… SID)Required

Request body

  • allowedCidrsstring (max 64 chars)[]
  • displayNamestring (max 128 chars)
  • expiresAtstring (date-time) | null
  • requireSigningboolean
  • scopesstring (pattern ^(?:[*]|[a-z][a-z0-9_-]*:[a-z*][a-z0-9_*-]*)$)[]
  • stepUpTokenstring (max 256 chars)

Disable an API key

POST/v1/accounts/{AC}/api-keys/{SK}/disable

apiKeys.disableSDK operation postV1AccountsByAcApiKeysBySkDisable

Parameters

  • SKstring (SK… SID)Required

Request body

  • reasonstring (max 1000 chars)Required
  • stepUpTokenstring (max 256 chars)Required

Stop the replaced secret of a rotated API key working now

POST/v1/accounts/{AC}/api-keys/{SK}/end-overlap

apiKeys.endOverlapSDK operation postV1AccountsByAcApiKeysBySkEndOverlap

After a rotation the previous secret keeps working until previousSecretExpiresAt. Call this once every client uses the new secret. It only narrows access, so it needs no step-up.

Parameters

  • SKstring (SK… SID)Required

Request body

  • reasonstring (max 1000 chars)Required

Revoke an API key

POST/v1/accounts/{AC}/api-keys/{SK}/revoke

apiKeys.revokeSDK operation postV1AccountsByAcApiKeysBySkRevoke

Revoke a key immediately and for good. A revoked key is never re-enabled.

Parameters

  • SKstring (SK… SID)Required

Request body

  • reasonstring (max 1000 chars)Required
  • stepUpTokenstring (max 256 chars)Required

Rotate an API key and reveal the replacement secret once

POST/v1/accounts/{AC}/api-keys/{SK}/rotate

apiKeys.rotateSDK operation postV1AccountsByAcApiKeysBySkRotate

Replace a key's secret. The response shows the new secret once; store it now.

Parameters

  • SKstring (SK… SID)Required

Request body

  • reasonstring (max 1000 chars)Required
  • stepUpTokenstring (max 256 chars)Required
  • overlapHoursinteger (0–168)

    Hours the current secret stays valid beside the new one. Default 24; 0 ends it immediately; at most 168 (7 days).