curl --request PATCH \
--url https://{host}/api/v1/dids/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_value": "<string>",
"enabled": true,
"monthly_rental": "12.5000",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destination_value: '<string>',
enabled: true,
monthly_rental: '12.5000',
team_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
trunk_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{host}/api/v1/dids/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/dids/{id}"
payload = {
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_value": "<string>",
"enabled": True,
"monthly_rental": "12.5000",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"destination_type": "extension",
"e164": "+61300000001",
"enabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_value": "<string>",
"monthly_rental": "12.5000",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Update a number
Partial: an omitted field is untouched, and a field sent as null clears it where the column is nullable.
curl --request PATCH \
--url https://{host}/api/v1/dids/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_value": "<string>",
"enabled": true,
"monthly_rental": "12.5000",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destination_value: '<string>',
enabled: true,
monthly_rental: '12.5000',
team_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
trunk_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{host}/api/v1/dids/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/dids/{id}"
payload = {
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_value": "<string>",
"enabled": True,
"monthly_rental": "12.5000",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"destination_type": "extension",
"e164": "+61300000001",
"enabled": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_value": "<string>",
"monthly_rental": "12.5000",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Every request sends Authorization: Bearer <token>. The token is either a panel session (a JWT from /auth/login, 12 hours) or an API key ft_<id>_<secret>. An API key is accepted only from an address on its IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required for an old key that has none), is limited to its rate per minute (429 rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on every response), and at most 60 call placements a minute.
Path Parameters
Body
All fields optional. destination_id is validated against destination_type and the owning organisation, because the column has no foreign key.
The id of the extension, queue, IVR flow, process, room or client trunk the number goes to. Must belong to the number's organisation. Not used for external.
Where the number's calls go: extension (a phone), queue, flow (an IVR), process, conference (a room), external (forwarded to another number), client_trunk (a client's own PBX; only where that module is on) or recorder.
extension, queue, external, flow, process, recorder, conference, client_trunk For external: the number to forward to, normalised to E.164. For extension: the extension number, as an alternative to destination_id.
Whether the number is in service. A disabled number's calls are refused.
Exact decimal amount as a string. Never a JSON number: rates are fractions of a cent and binary floating point cannot represent them exactly.
"12.5000"
The team the number belongs to, if any; a team supervisor sees only their teams' numbers.
The trunk this number arrives on, when it is pinned to one.
Response
OK
Where the number's calls go: extension (a phone), queue, flow (an IVR), process, conference (a room), external (forwarded to another number), client_trunk (a client's own PBX; only where that module is on) or recorder.
extension, queue, external, flow, process, recorder, conference, client_trunk The number, in E.164 form with the plus.
"+61300000001"
Whether the number is in service. A disabled number's calls are refused.
The number's id.
The organisation the number belongs to. May be left out by a caller with exactly one organisation.
The id of the extension, queue, IVR flow, process, room or client trunk the number goes to. Must belong to the number's organisation. Not used for external.
For external: the number to forward to, normalised to E.164. For extension: the extension number, as an alternative to destination_id.
Exact decimal amount as a string. Never a JSON number: rates are fractions of a cent and binary floating point cannot represent them exactly.
"12.5000"
The team the number belongs to, if any; a team supervisor sees only their teams' numbers.
The trunk this number arrives on, when it is pinned to one.