Create a key
Create keys in the dashboard. The key is shown once, so copy it into a secrets manager or an environment variable straight away. Keys look likelx_<key_id>_<secret>.
Send it as a bearer token:
Choose scopes
Give each key the smallest set of scopes it needs. Every endpoint page names the scope it requires.
The full list of scopes is in Authentication.
Roles still apply
A key acts for the person who owns it. Some operations need a minimum role as well as the scope. For example, creating a webhook endpoint needs thewebhooks:write scope and an admin role. Outbound calling still needs your account to be verified, whatever scopes the key has.
Errors
Rotate and revoke
To rotate a key, create a new one, switch your software to it, then revoke the old one in the dashboard. If a key leaks, revoke it at once.Safe retries
Placing calls, starting campaigns, importing contacts and ordering numbers require anIdempotency-Key header. A repeat within 24 hours returns the stored response. See Idempotency.