# Configure phone number

Set the answering voice and language for a rented support number. If activation is still in progress, saving retries activation and reports whether the number is ready.

POST https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber

## Access & visibility

Allow `support.ConfigurePhoneNumber` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `e164` | string | Yes | Existing rented number from [List phone numbers](https://developer.brigg.app/reference/support/ListPhoneNumbers), including the leading + and country calling code. At least 3 characters. |
| `settings` | [object](#request-settings) | Yes | Complete replacement of user-editable phone settings. Server-managed routing and greeting configuration are preserved. |

### request.settings

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `voice_id` | string | Yes | Required compatibility value; currently does not change the receptionist's live voice. Preserve the existing value, or use the documented default in the example. At least 1 character. At most 120 characters. |
| `language` | string | No | Language tag such as en, no, sv or da. Defaults to no when omitted; omission does not preserve a previously saved language. Default: `"no"`. At least 2 characters. At most 16 characters. |

## Configure an existing number

Get `e164` from [List phone numbers](https://developer.brigg.app/reference/support/ListPhoneNumbers). This operation configures an already rented number; it does not rent a number.

Send the complete settings pair. `settings` replaces the user-editable settings, while Brigg preserves its own routing configuration. Omitting `language` resets it to `no` (Norwegian), rather than keeping its previous value. Use a language tag such as `en`, `no`, `sv` or `da`.

`voice_id` is currently retained for compatibility: changing it does **not** select the live receptionist's voice. Use the example's default when you have no saved value to preserve. Greeting and transfer instructions belong to the inbox playbook, not this object.

## Settings saved does not mean calls are active

`ok: true` confirms the settings save. A number still provisioning also returns `activated`: false means carrier activation is incomplete, and `detail` gives its reported state; true means activation completed. When no activation attempt was needed, `activated` is absent.

Check [List phone numbers](https://developer.brigg.app/reference/support/ListPhoneNumbers) for provisioning progress. Do not release and rent the number again to recover a pending activation. The separate [Set phone number enabled](https://developer.brigg.app/reference/support/SetPhoneNumberEnabled) operation controls whether its inbox accepts calls.

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ok` | boolean | Yes | Whether the action completed successfully. |
| `activated` | boolean | No | Present only when the number was still provisioning: true if activation completed, false if the carrier is not ready. Absence does not mean false. |
| `detail` | string | No | Carrier state explaining activated: false. The settings save has already succeeded. |

## Errors & retries

Set `BRIGG_REQUEST_ID` once for each logical action. The samples send it as `Idempotency-Key`. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. Supply a stable Idempotency-Key containing 1–200 characters. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. Reuse the original Idempotency-Key. |

## Next steps

- [List phone numbers](https://developer.brigg.app/reference/support/ListPhoneNumbers)
- [Set phone number enabled](https://developer.brigg.app/reference/support/SetPhoneNumberEnabled)
- [Get inbox](https://developer.brigg.app/reference/support/GetInbox)
- [Update inbox](https://developer.brigg.app/reference/support/UpdateInbox)

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Save English settings

Keep the compatibility voice value; language is explicit so this does not reset to Norwegian.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $BRIGG_REQUEST_ID" \
  --data-raw '{
  "e164": "+4721001234",
  "settings": {
    "voice_id": "xF681s0UeE04gsf0mVsJ",
    "language": "en"
  }
}'
```

#### TypeScript


```typescript
const requestId = process.env.BRIGG_REQUEST_ID;
if (!requestId) throw new Error("Set BRIGG_REQUEST_ID once per action and reuse it on retries.");

const response = await fetch("https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId, // Create once per action; reuse on retries.
  },
  body: JSON.stringify({
    "e164": "+4721001234",
    "settings": {
      "voice_id": "xF681s0UeE04gsf0mVsJ",
      "language": "en"
    }
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

request_id = os.environ["BRIGG_REQUEST_ID"]  # Reuse for retries of this action.
payload = {
  "e164": "+4721001234",
  "settings": {
    "voice_id": "xF681s0UeE04gsf0mVsJ",
    "language": "en"
  }
}
request = Request(
    "https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,  # Create once per action; reuse on retries.
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "ok": true
}
```

### Activation still pending

A successful settings save while the rented number is waiting for its carrier.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $BRIGG_REQUEST_ID" \
  --data-raw '{
  "e164": "+4721001234",
  "settings": {
    "voice_id": "xF681s0UeE04gsf0mVsJ",
    "language": "en"
  }
}'
```

#### TypeScript


```typescript
const requestId = process.env.BRIGG_REQUEST_ID;
if (!requestId) throw new Error("Set BRIGG_REQUEST_ID once per action and reuse it on retries.");

const response = await fetch("https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId, // Create once per action; reuse on retries.
  },
  body: JSON.stringify({
    "e164": "+4721001234",
    "settings": {
      "voice_id": "xF681s0UeE04gsf0mVsJ",
      "language": "en"
    }
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

request_id = os.environ["BRIGG_REQUEST_ID"]  # Reuse for retries of this action.
payload = {
  "e164": "+4721001234",
  "settings": {
    "voice_id": "xF681s0UeE04gsf0mVsJ",
    "language": "en"
  }
}
request = Request(
    "https://api.brigg.app/v1/operations/support.ConfigurePhoneNumber",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,  # Create once per action; reuse on retries.
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "ok": true,
  "activated": false,
  "detail": "provisioning"
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "e164": {
      "type": "string",
      "minLength": 3,
      "description": "Existing rented number from [List phone numbers](https://developer.brigg.app/reference/support/ListPhoneNumbers), including the leading + and country calling code."
    },
    "settings": {
      "type": "object",
      "properties": {
        "voice_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "description": "Required compatibility value; currently does not change the receptionist's live voice. Preserve the existing value, or use the documented default in the example."
        },
        "language": {
          "type": "string",
          "minLength": 2,
          "maxLength": 16,
          "default": "no",
          "description": "Language tag such as en, no, sv or da. Defaults to no when omitted; omission does not preserve a previously saved language."
        }
      },
      "required": [
        "voice_id"
      ],
      "additionalProperties": false,
      "description": "Complete replacement of user-editable phone settings. Server-managed routing and greeting configuration are preserved."
    }
  },
  "required": [
    "e164",
    "settings"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "e164": "+4721001234",
      "settings": {
        "voice_id": "xF681s0UeE04gsf0mVsJ",
        "language": "en"
      }
    }
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Whether the action completed successfully."
    },
    "activated": {
      "type": "boolean",
      "description": "Present only when the number was still provisioning: true if activation completed, false if the carrier is not ready. Absence does not mean false."
    },
    "detail": {
      "type": "string",
      "description": "Carrier state explaining activated: false. The settings save has already succeeded."
    }
  },
  "required": [
    "ok"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "ok": true
    }
  ]
}
```

