Connect phone numbers
Provisions an inbound SIP trunk and a routing rule for the agent, and reserves the numbers.
The agent must already be deploying or deployed. Numbers are normalized before validation — spaces, dashes, dots and brackets are stripped — and must carry a country code. They are unique across the platform, so connecting a number already attached elsewhere fails with 409. auth_password is passed through to the routing layer and is not returned afterwards.
Authorization
personalAccessToken Personal Access Token of a Dynamiq user — the only credential accepted by the management API (api.*). Prefix dyn_pat_ (legacy uak_ tokens still authenticate). Send as Authorization: Bearer <token>.
In: header
Path Parameters
Voice agent UUID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/agents/voice/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/telephony/trunks" \ -H "Content-Type: application/json" \ -d '{ "provider": "twilio", "name": "string", "numbers": [ "string" ] }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"provider": "twilio",
"status": "provisioning",
"name": "string",
"numbers": [
"string"
],
"livekit_trunk_id": "string",
"auth_username": "string",
"error": "string",
"created_at": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "bad_request",
"message": "Bad Request",
"details": {
"input": "cannot be blank"
}
}
}{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"code": "not_found",
"message": "Not Found"
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}Get telephony configuration
Returns the agent's SIP trunks, the phone numbers attached to them, the SIP URI to point your trunk's origination at, and per-provider setup steps.
Disconnect phone numbers
Removes the trunk and its routing rule. Inbound calls to its numbers stop reaching the agent immediately and the numbers are released.