## Get default outgoing line

`GET /v1/voximplant-lines/default`

Returns the outgoing telephony line that the Bitrix24 account uses by default. The setting is shared across the entire account. To set another line, use [`PUT /v1/voximplant-lines/default`](/docs/voximplant-lines/default-set).

**Scope:** `telephony` | **Base URL:** `https://vibecode.bitrix24.com/v1` | **Authorization:** `X-Api-Key`

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/voximplant-lines/default" \
  -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-lines/default', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Default line:', data.lineId)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/voximplant-lines/default', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { data } = await res.json()
console.log('Default line:', data.lineId)
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on success |
| `data` | object | Line setting |
| `data.lineId` | string \| null | ID of the default outgoing line from [`GET /v1/voximplant-lines`](/docs/telephony/lines/voximplant) |

## Response example

```json
{
  "success": true,
  "data": {
    "lineId": "reg151083"
  }
}
```

## Error response example

401 — the `X-Api-Key` header was not passed:

```json
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key required. Pass via X-Api-Key header."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |
| 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 Bitrix24 account: a personal key has no Bitrix24 account webhook, or an application key was sent without an `Authorization: Bearer` header with a session token |
| 403 | `SCOPE_DENIED` | The key does not have the `telephony` scope |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access — [causes](/docs/errors/auth#bitrix_access_denied-403) |
| 403 | `B24_TARIFF_RESTRICTION` | The operation is not available on the Bitrix24 account plan |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request; the reason is in `error.message` |
| 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 |
| 503 | `user_self_deletion_pending` | The key owner is deleting their user profile in the Bitrix24 account. The `Retry-After` header equals `604800` — the length of the deletion grace period |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Set default outgoing line](/docs/voximplant-lines/default-set)
- [Telephony lines](/docs/voximplant-lines)
- [Voximplant lines](/docs/telephony/lines/voximplant)
- [SIP connections](/docs/voximplant-sip)
