Skip to main content

API keys

Authenticate every request with a Bearer token:
Keys are environment-prefixed: The full secret is shown once at creation. Only a prefix (ask_live_…) and the last 4 characters are stored for display; the key itself is stored as a SHA-256 hash.
Treat keys like passwords. If a key leaks, rotate it from Settings → API Keys — rotation issues a new secret and invalidates the old one immediately.

Sign in an agent by code

An AI agent can get its own key without you copying one. It starts a sign-in with no credentials and shows you a code:
The response has user_code, verification_uri_complete, device_code, expires_in (600) and interval (5). An owner or admin opens the link, picks the account and approves. Meanwhile the agent polls every interval seconds:
It returns authorization_pending until approval, then api_key, subaccount_id and mcp_url once. The key covers that one subaccount with calling, texting and number scopes and no deletes. Revoke it under Integrations → Personal agent. MCP agents use the assistable_connect tools instead; see Give your AI agent a phone. For a person with no account, POST /v3/agent-signup (email, name, and area_code or city/state) emails them a 6-digit code, and POST /v3/agent-signup/verify (signup_id, code, password) creates the account and returns its key once, plus a card_url. Calls and texts answer 402 card_required until the person adds a card there.

Scopes

Each key carries resource:action scopes (e.g. assistants:read, calls:create). A request to an endpoint you lack the scope for returns 403. Role presets:
  • read_only → read + list on every resource
  • read_write → full CRUD + list
  • admin → all scopes
  • custom → exactly the scopes you assign

Selecting a subaccount

A key may be authorized for one or more subaccounts. Tell the API which one a request targets, in priority order:
  1. X-Subaccount-Id header (recommended)
  2. subaccount_id in the request body
  3. location_id in the request body (legacy alias)
A single-subaccount key defaults to its one subaccount. Requesting a subaccount the key isn’t authorized for returns 403.

IP allowlisting

A key can be restricted to specific source IPs or CIDR ranges. Requests from other addresses are rejected with 401.