Para agentes de IA: markdown desta página — /docs-content-en/voximplant-sip/list.md índice da documentação — /llms.txt

Os artigos da documentação estão disponíveis atualmente em inglês.

List connections

GET /v1/voximplant-sip

Returns the SIP connections of office and cloud PBXs available to the key, with filtering, sorting and pagination.

Parameters

Parameter Type Required Default Description
Parameterfilter (query) Typeobject Requiredno Default— DescriptionFilter by the connection fields from the "Response fields" table, except hasPassword and hasIncomingPassword. The operator goes before the field name: >, >=, ! — not equal, % — substring.
Filtering syntax. Pass several values of one field as an array. Conditions on different fields are combined with AND, and filter[logic]=OR combines them with OR. Example: ?filter[type]=office, ?filter[configId][]=1&filter[configId][]=17
Parametersort (query) Typestring Requiredno Default— DescriptionSort field — any field that filter works with. Pass it only together with order
Parameterorder (query) Typestring Requiredno Default— DescriptionSort direction: ASC or DESC, case-insensitive. Pass it only together with sort
Parameterstart (query) Typenumber Requiredno Default0 DescriptionHow many records to skip. For the next page, pass the meta.next value from the previous response

The request accepts no other parameters.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/voximplant-sip?sort=configId&order=ASC" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/voximplant-sip?sort=configId&order=ASC" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/voximplant-sip?sort=configId&order=ASC', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { data, meta } = await res.json()
for (const sip of data) {
  console.log(sip.configId, sip.type, sip.title, sip.server)
}
if (meta.next !== undefined) {
  console.log('Next page: start =', meta.next)
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/voximplant-sip?sort=configId&order=ASC', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data, meta } = await res.json()
for (const sip of data) {
  console.log(sip.configId, sip.type, sip.title, sip.server)
}
if (meta.next !== undefined) {
  console.log('Next page: start =', meta.next)
}

Response fields

Passwords are not included in the response — the hasPassword and hasIncomingPassword flags are returned instead.

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata Typearray DescriptionConnections. An empty array if nothing matches the filter
Fielddata[].configId Typestring DescriptionConnection ID
Fielddata[].type Typestring DescriptionPBX type: office — office PBX, cloud — cloud PBX
Fielddata[].title Typestring DescriptionConnection name
Fielddata[].server Typestring DescriptionSIP server address
Fielddata[].login Typestring DescriptionLogin on the SIP server
Fielddata[].hasPassword Typeboolean DescriptionWhether the connection password is set
Fielddata[].authUser Typestring | null DescriptionUser name for authorization on the SIP server. null if not set
Fielddata[].outboundProxy Typestring | null DescriptionProxy server address for outgoing calls. null if not set
Fielddata[].detectLineNumber Typestring DescriptionWhether to detect the line number from the SIP headers of an incoming call: N — do not detect
Fielddata[].lineDetectHeaderOrder Typestring DescriptionSIP headers used to detect the line number, in the order they are checked, for example diversion;to
Fielddata[].registrationStatusCode Typestring | null DescriptionResult code of the registration on the SIP server, for example 502 when the server is not found
Fielddata[].registrationErrorMessage Typestring | null DescriptionRegistration error text. null if there is no error
Fielddata[].regId Typestring DescriptionCloud PBX only: registration ID on the SIP server
Fielddata[].incomingServer Typestring DescriptionOffice PBX only: server address for incoming calls, issued by Bitrix24
Fielddata[].incomingLogin Typestring DescriptionOffice PBX only: login for incoming calls, issued by Bitrix24
Fielddata[].hasIncomingPassword Typeboolean DescriptionOffice PBX only: whether the password for incoming calls is set
Fieldmeta.total Typenumber DescriptionHow many connections match the filter. When nothing matches the filter, meta is an empty object
Fieldmeta.next Typenumber DescriptionThe start value for the next page. Present only when there is a next page

Response example

JSON
{
  "success": true,
  "data": [
    {
      "type": "cloud",
      "configId": "1",
      "regId": "133788",
      "server": "pbx.example.com",
      "login": "cloud-line",
      "hasPassword": true,
      "authUser": "cloud-user",
      "outboundProxy": "proxy.example.com",
      "detectLineNumber": "N",
      "lineDetectHeaderOrder": "diversion;to",
      "registrationStatusCode": "502",
      "registrationErrorMessage": "Unable to resolve hostname",
      "title": "Cloud PBX"
    },
    {
      "type": "office",
      "configId": "17",
      "server": "sip.example.com",
      "login": "office-line",
      "hasPassword": true,
      "incomingServer": "ip.b24-1234-1234567890.bitrixphone.com",
      "incomingLogin": "sip17",
      "hasIncomingPassword": true,
      "authUser": null,
      "outboundProxy": null,
      "detectLineNumber": "N",
      "lineDetectHeaderOrder": "diversion;to",
      "registrationStatusCode": "0",
      "registrationErrorMessage": null,
      "title": "Office PBX"
    }
  ],
  "meta": {
    "total": 2
  }
}

Error response example

400 — filter by a password field:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "filter may use only noncredential SIP fields and logical groups"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionA parameter other than filter, sort, order, start is passed
HTTP400 CodeINVALID_PARAMS Descriptionfilter is not an object, or it contains a password field, a dot path or a field that is not in the response
HTTP400 CodeINVALID_PARAMS Descriptionsort and order are not passed together, or order is neither ASC nor DESC
HTTP400 CodeINVALID_PARAMS Descriptionsort names a password field or a field that is not in the response
HTTP400 CodeINVALID_PARAMS Descriptionstart is not a non-negative integer
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is not passed
HTTP401 CodeINVALID_API_KEY DescriptionThe platform does not know this key string: a typo, a truncated value or a deleted key
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no access to the portal: a personal key has no portal webhook, or an application key was passed without a session token in Authorization: Bearer
HTTP403 CodeSCOPE_DENIED DescriptionThe key has no telephony scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied access — causes explained
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request. The reason is in error.message
HTTP429 CodeRATE_LIMITED DescriptionRequest rate exceeded
HTTP429 CodeQUEUE_OVERFLOW DescriptionThe account request queue is full, so the request is rejected without waiting. The Retry-After header suggests the delay
HTTP429 CodeQUEUE_TIMEOUT DescriptionThe request did not get through the account queue in time and was not sent to Bitrix24. The Retry-After header suggests the delay
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable
HTTP503 CodeBITRIX_TIMEOUT DescriptionBitrix24 did not respond in time

Full list of common API errors — Errors.

Known specifics

  • Only your own application's connections are visible. The list contains connections created by the same Bitrix24 application as the key: an application key sees its own application's connections, a personal key sees connections created through the Bitrix24 account webhooks. Connections of other applications are not included in the list.
  • Upper-case field names. filter and sort also accept field names in upper case with underscores: filter[CONFIG_ID]=1, sort=CONFIG_ID.

See also