Skip to main content
POST
/
v1
/
phone-numbers
/
carriers
curl --request POST \
  --url https://api.topcalls.ai/v1/phone-numbers/carriers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "carrier_name": "My VoIP Provider",
  "trunk_type": "static_ip",
  "sip_gateway": {
    "ipv4": "sip.myprovider.com",
    "port": 5060,
    "inbound": true,
    "outbound": true
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "voip_carrier_sid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sip_gateway_sid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "carrier_name": "<string>",
  "trunk_type": "static_ip",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer tc_live_xxxxx

Body

application/json
carrier_name
string
required

Display name for the carrier

Required string length: 1 - 100
sip_gateway
object
required
trunk_type
enum<string>
default:static_ip

SIP trunk authentication type:

  • static_ip - IP-based authentication (default)
  • auth - Credential-based inbound authentication
  • reg - SIP registration
Available options:
static_ip,
auth,
reg
registration
object

Required when trunk_type is 'reg'

inbound_auth
object

Required when trunk_type is 'auth'

Response

Carrier created successfully

id
string<uuid>

Carrier record ID

account_id
string<uuid>

Account UUID

voip_carrier_sid
string<uuid>

Carrier UUID (for use in phone number provisioning)

sip_gateway_sid
string<uuid>

SIP gateway UUID

carrier_name
string

Display name

trunk_type
enum<string>
Available options:
static_ip,
auth,
reg
created_at
string<date-time>