# Carriers and numbers

## What this covers

Bring your own telephony account. Connect it with your carrier credentials, import or attach the numbers you own, and point each number at the URL the API hands back.

Every example below runs as written once these are exported:

```bash
export DVAARIK_API_KEY="dvk_..."        # project API key, server side only
export DVAARIK_TOKEN="<account access token>"   # console session, from POST /console/auth/login
export CONNECTION_ID="<uuid>"
export NUMBER_ID="<uuid>"
export PROJECT_ID="<uuid>"
```

A `<value>` inside a JSON body is a value you supply. Responses are JSON; every error body is `{ "detail": … }`. Each schema is expanded once per page, where it first appears.

### Machine door errors

Raised by the project-key dependency before any handler on this page runs.

| Status | Cause |
| --- | --- |
| `401` | `Missing API key` or `Invalid API key` — the `X-Api-Key` header is absent, unknown, or revoked. |
| `403` | `API key is not scoped to a project`, `Project unavailable`, or `API key is missing the required scope '<scope>'`. |
| `429` | The project's `api_rpm` ceiling was exceeded. Honour `Retry-After`; `X-RateLimit-*` headers are on every response. |

Scopes used on this page: `carrier:read`, `carrier:write`. Mint a key with only these.

### Account door errors

| Status | Cause |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. Refresh once, then re-authenticate. |
| `403` | The account is suspended or its email is not verified. |

## Operations — project API key

Call these from your own server with a project key. Never from a browser or a mobile bundle.

### GET `/v2/carriers`

List the project's carrier connections and their verification state.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:read` |
| Operation | `listCarriers` |
| Success | `200` `V2CarrierInfo[]` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `offset` | query | integer | no |  |

#### `V2CarrierInfo`

A carrier connection. No credential field exists in this direction.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `created_at` | date-time | yes |  |
| `display_name` | string | yes |  |
| `hint` | object | yes |  |
| `id` | uuid | yes |  |
| `last_error` | string or null | no |  |
| `name` | string | yes |  |
| `number_count` | integer | no | default 0 |
| `project_id` | uuid | yes |  |
| `provider` | string | yes |  |
| `status` | string | yes |  |
| `updated_at` | date-time | yes |  |
| `verified_at` | date-time or null | no |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/carriers?limit=20" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### POST `/v2/carriers`

Connect a carrier account you already pay for. The credentials are checked against the carrier immediately and a rejected credential is never stored.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `createCarrier` |
| Success | `201` `V2CarrierInfo` |

Request body: `V2CarrierCreate`.

#### `V2CarrierCreate`

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `credentials` | object<string> | yes |  |
| `name` | string | yes | min length 1; max length 120 |
| `provider` | string | yes | min length 1; max length 32 |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/carriers" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "<credential field from the catalogue>": "<secret>"
    },
    "name": "Primary line",
    "provider": "<carrier id from the catalogue>"
  }'
```

### DELETE `/v2/carriers/{connection_id}`

Forget the carrier credentials and disable every number on the connection. Your carrier account is never touched.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `disconnectCarrier` |
| Success | `200` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/v2/carriers/$CONNECTION_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### GET `/v2/carriers/{connection_id}`

Read one carrier connection.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:read` |
| Operation | `getCarrier` |
| Success | `200` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/carriers/$CONNECTION_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### POST `/v2/carriers/{connection_id}/numbers`

Attach one E.164 number by hand, for a carrier that cannot list its numbers.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `attachCarrierNumber` |
| Success | `201` `V2CarrierNumberInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |

Request body: `V2CarrierNumberAttach`.

#### `V2CarrierNumberAttach`

Attach one E.164 the developer's own carrier account holds.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `label` | string or null | no |  |
| `phone_number` | string | yes | min length 7; max length 24 |

#### `V2CarrierNumberInfo`

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `answer_url` | string | no | default "" |
| `connection_id` | uuid | yes |  |
| `created_at` | date-time | yes |  |
| `id` | uuid | yes |  |
| `inbound_agent_id` | uuid or null | no |  |
| `inbound_enabled` | boolean | yes |  |
| `label` | string or null | no |  |
| `outbound_enabled` | boolean | yes |  |
| `phone_number` | string | yes |  |
| `project_id` | uuid | yes |  |
| `provider` | string | yes |  |
| `stream_url` | string | no | default "" |
| `updated_at` | date-time | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/carriers/$CONNECTION_ID/numbers" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+15550000001",
    "label": "Main line"
  }'
```

### POST `/v2/carriers/{connection_id}/numbers/import`

Pull the numbers this carrier account already holds.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `importCarrierNumbers` |
| Success | `200` `V2CarrierNumberImportResult` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |

#### `V2CarrierNumberImportResult`

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `added` | integer | yes |  |
| `numbers` | V2CarrierNumberInfo[] | yes |  |
| `updated` | integer | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/carriers/$CONNECTION_ID/numbers/import" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### POST `/v2/carriers/{connection_id}/verify`

Re-check the stored credentials, or replace them when a body is sent — and only if the carrier accepts the replacement.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `verifyCarrier` |
| Success | `200` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/v2/carriers/$CONNECTION_ID/verify" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### GET `/v2/carriers/catalog`

The connectable carriers with the exact credential fields to render and, per carrier, whether it fetches an answer URL or takes a stream URL.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:read` |
| Operation | `listCarrierCatalog` |
| Success | `200` `V2CarrierCatalog` |

#### `V2CarrierCatalog`

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `carriers` | V2CarrierCatalogEntry[] | yes |  |

#### `V2CarrierCatalogEntry`

One connectable carrier: what to type, and what to configure back.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `display_name` | string | yes |  |
| `fields` | V2CarrierCredentialField[] | yes |  |
| `inbound_style` | string | yes |  |
| `inbound_url_pattern` | string | yes |  |
| `needs` | string | yes | The sentence shown above the connect form. |
| `provider` | string | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/carriers/catalog" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### GET `/v2/carriers/numbers`

List the project's numbers with the exact answer or stream URL to paste into the carrier.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:read` |
| Operation | `listCarrierNumbers` |
| Success | `200` `V2CarrierNumberInfo[]` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `offset` | query | integer | no |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/v2/carriers/numbers?limit=20" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### DELETE `/v2/carriers/numbers/{number_id}`

Forget the number locally. The number itself stays yours at the carrier.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `deleteCarrierNumber` |
| Success | `204` `no body` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `number_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/v2/carriers/numbers/$NUMBER_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY"
```

### PATCH `/v2/carriers/numbers/{number_id}`

Bind an agent to the number, and switch inbound answering or outbound dialling on or off.

| Detail | Value |
| --- | --- |
| Door | Project API key — `X-Api-Key: $DVAARIK_API_KEY` |
| Scope | `carrier:write` |
| Operation | `updateCarrierNumber` |
| Success | `200` `V2CarrierNumberInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `number_id` | path | uuid | yes |  |

Request body: `V2CarrierNumberUpdate`.

#### `V2CarrierNumberUpdate`

Every field optional; only what was SENT is applied. `inbound_agent_id=null` explicitly unbinds and switches inbound off, which is why the presence of the key matters and not just its value.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `inbound_agent_id` | uuid or null | no |  |
| `inbound_enabled` | boolean or null | no |  |
| `label` | string or null | no |  |
| `outbound_enabled` | boolean or null | no |  |

| Error | When |
| --- | --- |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the machine-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X PATCH "https://api.developers.dvaarik.com/v2/carriers/numbers/$NUMBER_ID" \
  -H "X-Api-Key: $DVAARIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_agent_id": "<agent uuid>",
    "inbound_enabled": true
  }'
```

## Operations — account session

The same resource through the console door. These are what the web console calls; both doors return the same shapes.

### GET `/console/v2/projects/{project_id}/carriers`

List the project's carrier connections and their verification state.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleListCarriers` |
| Success | `200` `V2CarrierInfo[]` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `project_id` | path | uuid | yes |  |
| `limit` | query | integer | no |  |
| `offset` | query | integer | no |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers?limit=20" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### POST `/console/v2/projects/{project_id}/carriers`

Connect a carrier account you already pay for. The credentials are checked against the carrier immediately and a rejected credential is never stored.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleCreateCarrier` |
| Success | `201` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `project_id` | path | uuid | yes |  |

Request body: `V2CarrierCreate`.

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "<credential field from the catalogue>": "<secret>"
    },
    "name": "Primary line",
    "provider": "<carrier id from the catalogue>"
  }'
```

### DELETE `/console/v2/projects/{project_id}/carriers/{connection_id}`

Forget the carrier credentials and disable every number on the connection. Your carrier account is never touched.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleDisconnectCarrier` |
| Success | `200` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/$CONNECTION_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### GET `/console/v2/projects/{project_id}/carriers/{connection_id}`

Read one carrier connection.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleGetCarrier` |
| Success | `200` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/$CONNECTION_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### POST `/console/v2/projects/{project_id}/carriers/{connection_id}/numbers`

Attach one E.164 number by hand, for a carrier that cannot list its numbers.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleAttachCarrierNumber` |
| Success | `201` `V2CarrierNumberInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

Request body: `V2CarrierNumberAttach`.

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/$CONNECTION_ID/numbers" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+15550000001",
    "label": "Main line"
  }'
```

### POST `/console/v2/projects/{project_id}/carriers/{connection_id}/numbers/import`

Pull the numbers this carrier account already holds.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleImportCarrierNumbers` |
| Success | `200` `V2CarrierNumberImportResult` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/$CONNECTION_ID/numbers/import" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### POST `/console/v2/projects/{project_id}/carriers/{connection_id}/verify`

Re-check the stored credentials, or replace them when a body is sent — and only if the carrier accepts the replacement.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleVerifyCarrier` |
| Success | `200` `V2CarrierInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `connection_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X POST "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/$CONNECTION_ID/verify" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### GET `/console/v2/projects/{project_id}/carriers/catalog`

The connectable carriers with the exact credential fields to render and, per carrier, whether it fetches an answer URL or takes a stream URL.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleListCarrierCatalog` |
| Success | `200` `V2CarrierCatalog` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `project_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/catalog" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### GET `/console/v2/projects/{project_id}/carriers/numbers`

List the project's numbers with the exact answer or stream URL to paste into the carrier.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleListCarrierNumbers` |
| Success | `200` `V2CarrierNumberInfo[]` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `project_id` | path | uuid | yes |  |
| `limit` | query | integer | no |  |
| `offset` | query | integer | no |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X GET "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/numbers?limit=20" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### DELETE `/console/v2/projects/{project_id}/carriers/numbers/{number_id}`

Forget the number locally. The number itself stays yours at the carrier.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleDeleteCarrierNumber` |
| Success | `204` `no body` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `number_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X DELETE "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/numbers/$NUMBER_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN"
```

### PATCH `/console/v2/projects/{project_id}/carriers/numbers/{number_id}`

Bind an agent to the number, and switch inbound answering or outbound dialling on or off.

| Detail | Value |
| --- | --- |
| Door | Account session — `Authorization: Bearer $DVAARIK_TOKEN` |
| Operation | `consoleUpdateCarrierNumber` |
| Success | `200` `V2CarrierNumberInfo` |

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `number_id` | path | uuid | yes |  |
| `project_id` | path | uuid | yes |  |

Request body: `V2CarrierNumberUpdate`.

| Error | When |
| --- | --- |
| `401` | No account session was presented, or it is invalid or expired. |
| `403` | The account is suspended or its email is not verified. |
| `404` | The project or the addressed resource does not exist for this owner. A resource owned by another developer is deliberately indistinguishable from one that never existed. |
| `409` | The project or resource is in a state that refuses this change. |
| `422` | The request body or query is not valid. `detail` is an array of `{loc, msg, type}` and `loc` names the offending field. |

Plus the account-door errors above. Full list on the [errors page](/docs/errors).

```bash
curl -sS -X PATCH "https://api.developers.dvaarik.com/console/v2/projects/$PROJECT_ID/carriers/numbers/$NUMBER_ID" \
  -H "Authorization: Bearer $DVAARIK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_agent_id": "<agent uuid>",
    "inbound_enabled": true
  }'
```

---

Source: https://developers.dvaarik.com/docs/api/carriers · every page as one file: https://developers.dvaarik.com/docs.md
