Attach a call flow to a phone number
Set the handling strategy of a PhoneNumber to route incoming calls through a specific call flow. Both the PhoneNumber and the CallFlow must belong to the caller's PBX.
HTTP:
IntegrationApiKey
API key created on the Cockpit Integrations page (an "API key" integration).
It is a bearer token owned by the customer's PBX and limited to the scopes
selected when the key was created (e.g. phone-numbers, push-configuration).
Send it in the Authorization header:
Authorization: Bearer <api_key>
Manage keys (create / reveal / revoke) from Integrations → New integration → API key.
- HTTP Authorization Scheme
bearer
id
path · string · uuid
*
PhoneNumber UUID.
Request body · required
Request schema
call_flow_id*string · uuid
example:
550e8400-e29b-41d4-a716-446655440100Responses
Updated PhoneNumber with the new call flow attached.
Response schema
idstring · uuid
example:
550e8400-e29b-41d4-a716-446655440000numberstring
Phone number in E.164 format.
example:
+12125550100namestring | null
example:
Customer Supportis_activeboolean
example:
1call_flow_idstring | null · uuid
example:
550e8400-e29b-41d4-a716-446655440100call_flowobject | null
idstring · uuid
namestring
enabledboolean
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example:
Authorization Token is missingPhoneNumber not found in the caller's PBX.
Response schema
No response body.
Validation error - call_flow_id missing, malformed, or doesn't belong
to the caller's PBX.
Response schema
No response body.
put
https://cockpit.voxbi.com/api/v1/numbers/{id}/call-flow
Base URL
Request sample
curl -X PUT 'https://cockpit.voxbi.com/api/v1/numbers/{id}/call-flow' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/numbers/{id}/call-flow', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.put('https://cockpit.voxbi.com/api/v1/numbers/{id}/call-flow',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'PUT',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/numbers/{id}/call-flow', false, $context);
$data = json_decode($response, true);
print_r($data);
Sample request
No request example provided.
No example for this status.
{ … }
"error": "Authorization Token is missing"
}
Cache-Control
string
example:
private, must-revalidate
Connection
string
example:
keep-alive
Content-Type
string
example:
application/json
Vary
string
example:
Origin
X-RateLimit-Limit
integer
Max requests allowed in the current rate-limit window.
example:
60
X-RateLimit-Remaining
integer
Requests remaining in the current rate-limit window.
example:
57No example for this status.
No example for this status.