Place a phone number order
Submit a phone number order. Must be called as multipart/form-data because
KYC document files are part of the request. Call POST /numbers/orders/check
first to obtain the address-specific kycRequirements.
You may attach your own custom_order_reference (any short string, max 64
chars) - it will be echoed back to you in the response, in
GET /numbers/orders/{id}, and in the asynchronous webhook payload below.
If you omit it, the upstream provider will generate one and we'll backfill
it on your row. order_id is the deprecated name for the same field: it is
still accepted, but sending both order_id and custom_order_reference
with different values is rejected (422) - identical values are fine.
The response also carries order_reference, the carrier's own identifier
for the order (a UUID); use it to identify the order with the carrier
(e.g. their support, or their KYC-document endpoint).
Order fulfilment is asynchronous. This endpoint returns 201 as soon as the
order is accepted upstream. The final outcome (success or rejection) will be
delivered to your webhook URL (if provided) and is queryable via
GET /numbers/orders/{id}.
Webhook payload
When the order reaches its final state we POST to your webhook URL the
exact same body as GET /numbers/orders/{id} (the schema below). Read
the status field to tell success from rejection:
status: "success"-numbersandphone_numbersare populated.status: "error"-error_messagecarries the rejection reason.
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
Request body · required · multipart/form-data
ACME GmbHAdenauerallee153113BonnDE1https://your-app.example/hooks/number-orderpo-2026-00042po-2026-00042kycobject
Responses
550e8400-e29b-41d4-a716-446655440000po-2026-0004201a0ae76-0000-4000-8000-000000000000ACME GmbHcreated requested submission_failed processing success error processing_failedrequestedaddressobject
Adenauerallee153113BonnDEAdenauerallee 1, 53113 Bonn, DE1+49228numbersarray<string>
phone_numbersarray<object>
550e8400-e29b-41d4-a716-446655440000+12125550100Customer Support1550e8400-e29b-41d4-a716-446655440100call_flowobject | null
not_required pending retrying delivered failed cancelledAuthorization Token is missingerrors*object
https://cockpit.voxbi.com/api/v1/numbers/orders
curl -X POST 'https://cockpit.voxbi.com/api/v1/numbers/orders' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-F 'customer_name=ACME GmbH' \
-F 'street=Adenauerallee' \
-F 'street_number=1' \
-F 'postal_code=53113' \
-F 'city=Bonn' \
-F 'area_code=string' \
-F 'country=DE' \
-F 'quantity=1' \
-F 'webhook=https://your-app.example/hooks/number-order' \
-F 'order_id=po-2026-00042' \
-F 'custom_order_reference=po-2026-00042'
const body = new FormData();
body.append('customer_name', 'ACME GmbH');
body.append('street', 'Adenauerallee');
body.append('street_number', '1');
body.append('postal_code', '53113');
body.append('city', 'Bonn');
body.append('area_code', 'string');
body.append('country', 'DE');
body.append('quantity', '1');
body.append('webhook', 'https://your-app.example/hooks/number-order');
body.append('order_id', 'po-2026-00042');
body.append('custom_order_reference', 'po-2026-00042');
const response = await fetch('https://cockpit.voxbi.com/api/v1/numbers/orders', {
method: 'POST',
headers: { Authorization: `Bearer ${YOUR_TOKEN}` },
body,
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://cockpit.voxbi.com/api/v1/numbers/orders',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
data={
'customer_name': 'ACME GmbH',
'street': 'Adenauerallee',
'street_number': '1',
'postal_code': '53113',
'city': 'Bonn',
'area_code': 'string',
'country': 'DE',
'quantity': '1',
'webhook': 'https://your-app.example/hooks/number-order',
'order_id': 'po-2026-00042',
'custom_order_reference': 'po-2026-00042',
},
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$ch = curl_init('https://cockpit.voxbi.com/api/v1/numbers/orders');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_TOKEN']);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'customer_name' => 'ACME GmbH',
'street' => 'Adenauerallee',
'street_number' => '1',
'postal_code' => '53113',
'city' => 'Bonn',
'area_code' => 'string',
'country' => 'DE',
'quantity' => '1',
'webhook' => 'https://your-app.example/hooks/number-order',
'order_id' => 'po-2026-00042',
'custom_order_reference' => 'po-2026-00042',
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);
{ … }
{ … }
"address": { … },
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057