Skip to main content
POST
/
v1
/
sip-trunks
/
{id}
/
assignments
Create agent assignment on SIP trunk
curl --request POST \
  --url https://api.vatel.ai/v1/sip-trunks/{id}/assignments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "number": "<string>",
  "alternate_number": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sip_trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "number": "<string>",
  "alternate_number": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Send your organization API key as Authorization: Bearer <key>.

Path Parameters

id
string<uuid>
required

SIP trunk id

Body

application/json

Create assignment. Use number for digest-auth trunks (unique on this trunk). Use alternate_number for ACL trunks (globally unique). Both may be set if you use both routing styles.

agent_id
string<uuid>
required
number
string

Target number to dial for digest inbound auth; unique among assignments on this SIP trunk.

alternate_number
string

Globally unique alternate number to dial when the trunk uses ACL inbound auth.

Response

Created assignment

Binds an org agent to a SIP trunk. With digest inbound auth, routing uses number. With ACL inbound auth, routing uses alternate_number (globally unique).

id
string<uuid>
agent_id
string<uuid>
sip_trunk_id
string<uuid>
number
string

Number to dial for this agent when the trunk uses digest inbound auth; must be unique among assignments on this trunk.

alternate_number
string

Globally unique alternate dial string when the trunk uses ACL inbound auth; used instead of per-trunk number routing in that mode.

created_at
string<date-time>