Import a configuration file (pbx)
/configuration-imports
Send a PBX configuration file (kind external) to be stored as a configuration version of the PBX
of your API key. The import never applies anything to the PBX. It adds the file as a configuration
version of the PBX, like "Back up now"; a person opens that version in Cockpit, reviews the
data and what a restore would change, settles any conflict with other PBXs, and decides to restore it
(the restore takes its own safety backup first).
The file is checked in this request with the same checks as POST /configuration-import/validate:
a file that breaks a rule answers 422 with every error and nothing is stored. A valid file is
answered 202 and stored; a background job converts the audio and stores the version. Poll
GET /configuration-imports/{id} until status is ready (the version is stored and waits for review;
the answer then holds version_id and a link to the version's page in Cockpit) or failed.
What a restore of the version does (in Cockpit, not here). It restores exactly what the file
contains, per entity type. A type the file leaves out of data is not touched; a type it holds (even
empty, for example "queue": {}) ends as in the file. Users, locations, phone numbers, parent devices and
multicast groups are never deleted when missing from the file. The sets that belong to a parent
follow it.
Checks against other PBXs (an email address, an alternative SIP username or a phone number used elsewhere) do not run in the API and no answer tells anything about another PBX. They run in Cockpit on the version's review page, where a person fixes each conflict before restoring.
Limits. At most 10 versions made through the API may wait for review per PBX (409 for the
next file until one is restored or deleted). A version nobody restored is removed after 30 days. One
file of a PBX is checked at a time (409), and the PBX's versions are made one after the other. The JSON
of a file is limited to 16 MB inside a zip; a plain .json upload to 5 MB and a zip to 50 MB.
Needs the configuration-import scope. Rate limit: 6 files per minute per PBX.
Answers 503 while configuration versions are switched off.
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
application/jsonRequest body · required · multipart/form-data
Responses
550e8400-e29b-41d4-a716-446655440000queued processing ready restored failed removedreadyMove from the old provider2026-11-24T10:15:00+01:002026-11-24T10:15:02+01:002026-11-24T10:15:09+01:00550e8400-e29b-41d4-a716-4466554400012026-11-25T09:30:00+01:00errors*array<object>
row.pbx_idThe PBX id must be "00000000-0000-4000-8000-000000000001".extensionExtensionnotesarray<object>
example.skippedinfo warninginfoOne unsupported feature was left out.links*object
https://cockpit.voxbi.com/api/v1/configuration-imports/550e8400-e29b-41d4-a716-446655440000https://cockpit.voxbi.com/admin/configuration-versions/550e8400-e29b-41d4-a716-446655440001/show1countsobject
notes*array<object>
example.skippedinfo warninginfoOne unsupported feature was left out.errors*array<object>
row.pbx_idThe PBX id must be "00000000-0000-4000-8000-000000000001".extensionExtension00000000-0000-4000-8000-000000000010pbx_iderrorsobject
https://cockpit.voxbi.com/api/v1/configuration-imports
curl -X POST 'https://cockpit.voxbi.com/api/v1/configuration-imports' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-F 'file=@/path/to/file'
const body = new FormData();
body.append('file', fileInput.files[0]); // /path/to/file
const response = await fetch('https://cockpit.voxbi.com/api/v1/configuration-imports', {
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/configuration-imports',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
files={
'file': open('/path/to/file', 'rb'),
},
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$ch = curl_init('https://cockpit.voxbi.com/api/v1/configuration-imports');
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, [
'file' => new CURLFile('/path/to/file'),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);
{ … }
{ … }
"notes": [ … ],
{ … }
"links": { … }
{ … }
application/json{ … }
application/json{ … }
{ … }
{ … }
"errors": [ … ],
{ … }
{ … }
60application/json