Para agentes de IA: markdown de esta página — /docs-content-en/voximplant-sip.md índice de la documentación — /llms.txt
Los artículos de la documentación están disponibles actualmente en inglés.
SIP connections
Manage SIP connections of office and cloud PBXs through which the Bitrix24 account receives and places calls.
Scope: telephony | Base URL: https://vibecode.bitrix24.com/v1 | Authorization: X-Api-Key
What to know before you start
- Two PBX types.
cloudis a cloud PBX,officeis an office PBX. The type is set on creation, defaults tocloud, and cannot be changed afterwards. For an office PBX, Bitrix24 issues an address and a login for incoming calls on creation — theincomingServerandincomingLoginfields. - Passwords are write-only.
passwordis passed on create and update but never comes back in a response: responses carry thehasPasswordandhasIncomingPasswordflags instead of passwords. The list cannot be filtered or sorted by these flags. - Five fields can be set through the API:
type,title,server,login,password. All other connection fields are read-only, and an extra field in the request body returns400 READONLY_FIELD. - Only your own application's connections are visible. The methods in this section work with connections created by the same Bitrix24 application as the key: an application key works with its own application's connections; a personal key works with connections created through the Bitrix24 account's webhooks. Another application's connection does not appear in the list, and the methods return
404 ENTITY_NOT_FOUNDfor itsconfigId. - The type of
configIddepends on the method. List, get, create and update responses return it as a string; the delete response returns it as a number. In the path the ID is passed as a number:/v1/voximplant-sip/17.
Quick start
List the SIP connections available to the key:
curl "https://vibecode.bitrix24.com/v1/voximplant-sip" \
-H "X-Api-Key: YOUR_API_KEY"
The response contains an array of connections in data and their count in meta.total. Connection fields are described on the List connections page.
Full example
An office PBX connection from creation to deletion: create it, read it, change the login and password, delete it. Run the script in Node.js 18+ from a file with the .mjs extension.
const BASE = 'https://vibecode.bitrix24.com/v1/voximplant-sip'
const API_KEY = 'YOUR_API_KEY'
async function call(method, path, body) {
const headers = { 'X-Api-Key': API_KEY }
if (body) headers['Content-Type'] = 'application/json'
const res = await fetch(BASE + path, { method, headers, body: body && JSON.stringify(body) })
const json = await res.json()
if (!json.success) throw new Error(`${json.error.code}: ${json.error.message}`)
return json.data
}
// 1. Create an office PBX connection
const created = await call('POST', '', {
type: 'office',
title: 'Office PBX',
server: 'sip.example.com',
login: 'office-line',
password: 'EXAMPLE_SIP_PASSWORD',
})
console.log('Created:', created.configId, 'incoming server:', created.incomingServer)
// 2. Read the connection
const sip = await call('GET', `/${created.configId}`)
console.log('Type:', sip.type, 'password set:', sip.hasPassword)
// 3. Change the login and password
const updated = await call('PATCH', `/${created.configId}`, {
login: 'office-line-2',
password: 'EXAMPLE_NEW_SIP_PASSWORD',
})
console.log('New login:', updated.login)
// 4. Delete the connection
const removed = await call('DELETE', `/${created.configId}`)
console.log('Deleted:', removed.deleted)
Endpoint reference
| Method | Path | Bitrix24 method | Description |
|---|---|---|---|
| GET | /v1/voximplant-sip |
voximplant.sip.get | List connections with filtering, sorting and pagination |
| GET | /v1/voximplant-sip/:configId |
voximplant.sip.get | A single connection by ID |
| POST | /v1/voximplant-sip |
voximplant.sip.add | Create a connection |
| PATCH | /v1/voximplant-sip/:configId |
voximplant.sip.update | Change the title, server, login or password |
| DELETE | /v1/voximplant-sip/:configId |
voximplant.sip.delete | Delete a connection |
Error codes
SIP connection errors
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_PARAMS |
Invalid list parameters filter, sort, order, start; configId is not a positive integer; the body is not a JSON object; type is neither office nor cloud; a field value is not a string; an update contains no field other than type |
| 400 | MISSING_REQUIRED_FIELDS |
server or login is missing on create |
| 400 | READONLY_FIELD |
The body contains a field other than type, title, server, login, password; or on update type differs from the current one |
| 404 | ENTITY_NOT_FOUND |
No connection with this configId among the connections available to the key |
| 422 | BITRIX_ERROR |
Bitrix24 rejected the request or did not confirm the update or deletion; the reason is in error.message |
System errors
| HTTP | Code | When |
|---|---|---|
| 401 | MISSING_API_KEY |
The X-Api-Key header is missing |
| 401 | INVALID_API_KEY |
The platform does not recognize the key string: a typo, a truncated value, or a deleted key |
| 401 | TOKEN_MISSING |
The key has no access to the portal: a personal key has no portal webhook, or an application key was sent without a session token in Authorization: Bearer |
| 403 | SCOPE_DENIED |
The key lacks the telephony scope |
| 403 | WRITE_BLOCKED_READONLY_KEY |
A read-only key attempts to create, update or delete a connection |
| 403 | BITRIX_ACCESS_DENIED |
Bitrix24 denied access — causes explained |
| 429 | RATE_LIMITED |
Request rate exceeded |
| 429 | QUEUE_OVERFLOW |
The account request queue is full, so the request is rejected without waiting. The Retry-After header suggests the delay |
| 429 | QUEUE_TIMEOUT |
The request did not get through the account queue in time and was not sent to Bitrix24. The Retry-After header suggests the delay |
| 502 | BITRIX_UNAVAILABLE |
Bitrix24 is unavailable |
| 503 | BITRIX_TIMEOUT |
Bitrix24 did not respond in time |
Full list of common API errors — Errors.