# Lines

Create, update, and delete an application's external lines, plus read the list of lines rented from Voximplant or connected over SIP.

Bitrix24 API: `telephony.externalLine.*`, `voximplant.line.get`
Scope: `telephony`

## Operations

- [List application lines](./lines/list.md) — `GET /v1/telephony-lines`
- [Search application lines](./lines/search.md) — `POST /v1/telephony-lines/search`
- [Add a line](./lines/create.md) — `POST /v1/telephony-lines`
- [Update a line](./lines/update.md) — `PATCH /v1/telephony-lines/:number`
- [Delete a line](./lines/delete.md) — `DELETE /v1/telephony-lines/:number`
- [Application line fields](./lines/fields.md) — `GET /v1/telephony-lines/fields`
- [Aggregate application lines](./lines/aggregate.md) — `POST /v1/telephony-lines/aggregate`
- [Voximplant lines](./lines/voximplant.md) — `GET /v1/voximplant-lines`

## What you need to know

Two endpoints return lines from different sources:
- `GET /v1/telephony-lines` — lines **added by the application** via `POST /v1/telephony-lines`. Relevant for applications connecting their own PBX to a Bitrix24 account.
- `GET /v1/voximplant-lines` — lines **rented from Voximplant** or connected over SIP, visible to your Bitrix24 account. Read-only.

The application line identifier is the `number` string set at creation. The update and delete URLs use exactly this value — URL-encode special characters.

The collection of application lines is returned in full as a single page: filtering, sorting and a non-zero `offset` are not supported. The list, the search and `list` sub-calls in `POST /v1/batch` and `POST /v1/telephony-lines/batch` reject them with the `UNSUPPORTED_FILTER`, `INVALID_SORT_FIELD` and `UNSUPPORTED_OFFSET` errors. `POST /v1/telephony-lines/aggregate` rejects a filter with `400 UNSUPPORTED_FILTER` and ignores sorting. Filter and sort lines on your side.

## Application line fields

| Field | Type | Description |
|-------|------|------------|
| `number` | string | External line number, set at creation |
| `name` | string \| null | Line name shown in the interface. `null` if it was not set at creation |
| `crmAutoCreate` | boolean | Auto-create a CRM entity on an outbound call through the line. Defaults to `true` |
| `serverName` | string | Telephony server name. Read-only: it is not returned in responses, and a write is rejected with `400 READONLY_FIELD` |

See [Add a line](./lines/create.md) and [Update a line](./lines/update.md) for which of these fields are writable. The Voximplant line fields are described on the [Voximplant lines](./lines/voximplant.md) page.

## See also

- [Telephony — overview](../telephony.md)
- [Outbound calls](./outbound.md)
