Skip to main content
Phone numbers are the gateway for calls to reach your AI agents. You can provision new numbers and assign them to specific agents for inbound and outbound calls.

Endpoints

MethodEndpointDescription
GET/v1/orgs/:org_id/phone-numbersList phone numbers
POST/v1/orgs/:org_id/phone-numbersProvision a new number
GET/v1/orgs/:org_id/phone-numbers/:idGet phone number details
PATCH/v1/orgs/:org_id/phone-numbers/:idUpdate phone number
DELETE/v1/orgs/:org_id/phone-numbers/:idRelease phone number

Phone Number Object

{
  "id": 101,
  "number": "+14155551234",
  "status": "active",
  "inbound_agent_id": 12,
  "outbound_agent_id": null
}
FieldTypeDescription
idintegerUnique identifier
numberstringE.164 formatted phone number
statusstringStatus: active, pending, released
inbound_agent_idinteger | nullAgent that handles incoming calls
outbound_agent_idinteger | nullDefault agent for outbound calls

List Phone Numbers

Retrieve all phone numbers in your organization.
curl https://api.thunderphone.com/v1/orgs/{org_id}/phone-numbers \
  -H "Authorization: Token YOUR_API_TOKEN"

Provision a Phone Number

Request a new phone number for your organization.
curl -X POST https://api.thunderphone.com/v1/orgs/{org_id}/phone-numbers \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_agent_id": 12
  }'

Response

{
  "id": 101,
  "number": "+14155551234",
  "status": "active",
  "inbound_agent_id": 12,
  "outbound_agent_id": null
}

Update Phone Number

Change the agents assigned to a phone number.
curl -X PATCH https://api.thunderphone.com/v1/orgs/{org_id}/phone-numbers/101 \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_agent_id": 15,
    "outbound_agent_id": 16
  }'

Delete Phone Number

Release a phone number from your organization.
Releasing a phone number is permanent. The number may become available to other users.
curl -X DELETE https://api.thunderphone.com/v1/orgs/{org_id}/phone-numbers/101 \
  -H "Authorization: Token YOUR_API_TOKEN"
Response: 204 No Content