Skip to main content
POST
/
v1
/
chat
/
phone-numbers
Provision phone number
curl --request POST \
  --url https://api.agntix.ai/v1/chat/phone-numbers \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "provider": "twilio",
  "number": "+15550001234",
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "<string>",
  "number": "+15550001234",
  "provider": "twilio",
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "orgId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z"
}
Every endpoint on this page requires either a Clerk-issued JWT (Authorization: Bearer <token>) or an organization API key (x-api-key: pk_…). Anonymous calls return 401 Unauthorized. See Authentication for the full setup.

Code examples

curl -X POST https://api.agntix.ai/v1/chat/phone-numbers \
  -H "x-api-key: pk_live_••••" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "twilio",
    "number": "+15550001234",
    "agentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'

Sample response

{
  "id": "pn_01j3m...",
  "number": "+15550001234",
  "provider": "twilio",
  "agentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "orgId": "org_2abc123",
  "createdAt": "2026-04-29T10:00:00Z"
}

Authorizations

x-api-key
string
header
required

Organization API key. Obtain from the dashboard. Format: pk_live_…

Body

application/json
provider
enum<string>
Available options:
twilio,
telnyx
Example:

"twilio"

number
string

E.164 format.

Example:

"+15550001234"

agentId
string<uuid>

Optional agent to map immediately.

Response

Phone number provisioned.

id
string
number
string
Example:

"+15550001234"

provider
string
Example:

"twilio"

agentId
string<uuid> | null
orgId
string
createdAt
string<date-time>