## Get connection

`GET /v1/voximplant-sip/:configId`

Returns an office or cloud PBX SIP connection by ID — for example, to check the registration on the SIP server after creating the connection.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `configId` (path) | number | yes | Connection ID. List: [`GET /v1/voximplant-sip`](/docs/voximplant-sip/list) |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/voximplant-sip/17" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/voximplant-sip/17" \
  -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/17', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
if (success) {
  console.log(data.title, data.server, 'password set:', data.hasPassword)
}
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/voximplant-sip/17', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
if (success) {
  console.log(data.title, data.server, 'password set:', data.hasPassword)
}
```

## Response fields

Passwords are not returned — the response carries the `hasPassword` and `hasIncomingPassword` flags instead.

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on success |
| `data` | object | The SIP connection. Its fields are the `data.*` rows below |
| `data.configId` | string | Connection ID |
| `data.type` | string | PBX type: `office` — office PBX, `cloud` — cloud PBX |
| `data.title` | string | Connection name |
| `data.server` | string | SIP server address |
| `data.login` | string | Login on the SIP server |
| `data.hasPassword` | boolean | Whether the connection password is set |
| `data.authUser` | string \| null | User name for authorization on the SIP server. `null` if not set |
| `data.outboundProxy` | string \| null | Proxy server address for outgoing calls. `null` if not set |
| `data.detectLineNumber` | string | Whether to detect the line number from the SIP headers of an incoming call: `N` — do not detect |
| `data.lineDetectHeaderOrder` | string | SIP headers used to detect the line number, in the order they are checked, for example `diversion;to` |
| `data.registrationStatusCode` | string \| null | Result code of the registration on the SIP server, for example `502` when the server is not found |
| `data.registrationErrorMessage` | string \| null | Registration error text. `null` if there is no error |
| `data.regId` | string | Cloud PBX only: registration ID on the SIP server |
| `data.incomingServer` | string | Office PBX only: server address for incoming calls, issued by Bitrix24 |
| `data.incomingLogin` | string | Office PBX only: login for incoming calls, issued by Bitrix24 |
| `data.hasIncomingPassword` | boolean | Office PBX only: whether the password for incoming calls is set |

## Response example

```json
{
  "success": true,
  "data": {
    "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"
  }
}
```

## Error response example

404 — connection not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "SIP connection not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `configId` is not a positive integer |
| 404 | `ENTITY_NOT_FOUND` | No connection with this `configId` among the connections available to the key |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |
| 401 | `INVALID_API_KEY` | The platform does not know this 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 does not have the `telephony` scope |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access — [causes explained](/docs/errors/auth#bitrix_access_denied-403) |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `error.message` |
| 429 | `RATE_LIMITED` | Request rate limit 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](/docs/errors).

## Known specifics

- **Only connections of the key's own application are visible.** The method finds a connection only if it was created by the same Bitrix24 application as the key: an application key sees the connections of its own application, a personal key sees the connections created through the Bitrix24 account's webhooks. For the `configId` of another application's connection, the method responds with `404 ENTITY_NOT_FOUND`.

## See also

- [List connections](/docs/voximplant-sip/list)
- [Update connection](/docs/voximplant-sip/update)
- [Delete connection](/docs/voximplant-sip/delete)
- [SIP connections](/docs/voximplant-sip)
