# Verify a caller ID

`POST https://api.morevoice.ai/v1/caller_ids`

Starts verifying a number you hold elsewhere (your office line, a mobile) so your calls can present it. We call `phone_number` from our verification line and ask the person who answers to type the 6-digit `verification_code` of this answer on the phone's keypad: show it to them (the call never says it). The outcome arrives as `caller_id.verified` or `caller_id.failed`, or read it with GET /v1/caller_ids/{id}; the code works for 10 minutes and for one entry. A verified number can then be the `caller_id` of POST /v1/calls and of campaigns, also on MoreVoice Telephony.

Limits: 3 calls a day per number, 10 a day and 3 in any 10 minutes per organisation (429 `rate_limited`, `details.scope`). Refused: a number not in E.164, an emergency or premium-rate number (400 `parameter_invalid`); one of your own numbers or one already verified (409 `caller_id_exists`). The request is not replayed under an Idempotency-Key (its answer holds the code): a retry starts a new verification, and the older one fails as `superseded`. Live keys only.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `caller_ids_create`.

## Parameters

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Request body

Required, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `phone_number` | `string` | yes | The number to verify, in E.164 (e.g. +97235550100). Not one of your own numbers (those need no verification), an emergency number or a premium-rate number. |
| `friendly_name` | `string` | no | Your name for the number, shown in lists. |
| `language` | `"he" \| "en"` | no | The language our call speaks first (then the other one). Default `he`. |

Example:

```json
{
  "friendly_name": "Head office",
  "phone_number": "+97235550100"
}
```

## Responses

### 201 Created

Created Returns `CallerId`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The caller ID's ID. |
| `object` | `"caller_id"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `phone_number` | `string` | The number, in E.164. |
| `friendly_name` | `string \| null` | Your name for the number, or null. |
| `status` | `"pending" \| "verified" \| "failed"` | `pending`: our call is on its way, or waits for the code (10 minutes at most). `verified`: the number can be the `caller_id` of your calls and campaigns. `failed`: see `failure_reason`; start a new verification to try again. |
| `failure_reason` | `"wrong_code" \| "no_answer" \| "no_input" \| "expired" \| "call_failed" \| "superseded" \| null` | Why it failed: `wrong_code`, `no_answer` (the call was not answered), `no_input` (answered, nothing typed), `expired` (10 minutes passed), `call_failed` (we could not place the call), `superseded` (a newer verification of the number started). null unless `failed`. |
| `method` | `"call" \| "attestation"` | `call`: verified by our call. `attestation`: an administrator attested ownership in the dashboard (usable on your own SIP connections only, not on MoreVoice Telephony). |
| `verification_code` | `string \| null` | Only in the answer to POST /v1/caller_ids: the 6-digit code to show the person who will answer our call, who types it on the phone's keypad. null everywhere else (we keep only a hash of it). |
| `expires_at` | `string \| null` | While `pending`: when the code stops working. null otherwise. |
| `verified_at` | `string \| null` | When the number was verified, or null. |
| `created` | `string` | When the verification started. |

Example:

```json
{
  "created": "2026-11-23T10:01:58.000Z",
  "expires_at": null,
  "failure_reason": null,
  "friendly_name": "Head office",
  "id": "cid_5Xr8Tq2Lm4Nb7Vc1Zd9Ks3",
  "livemode": true,
  "method": "call",
  "object": "caller_id",
  "phone_number": "+97235550100",
  "status": "verified",
  "verification_code": null,
  "verified_at": "2026-11-23T10:02:41.000Z"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 413 Payload Too Large

The request body is larger than the endpoint accepts, or has more parts or files than it takes. Returns `ErrorEnvelope`.

### 415 Unsupported Media Type

The request body's Content-Type is not one the endpoint takes. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

### 503 Service Unavailable

A dependency this endpoint needs (a speech or language model, file storage) is temporarily unavailable. Retry later. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const callerId = await mv.callerIds.create({
	friendly_name: "Head office",
	phone_number: "+97235550100",
});
console.log(callerId);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

caller_id = client.caller_ids.create({
    "friendly_name": "Head office",
    "phone_number": "+97235550100",
})
print(caller_id)
```

**cURL**

```sh
curl -X POST https://api.morevoice.ai/v1/caller_ids \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "friendly_name": "Head office",
  "phone_number": "+97235550100"
}'
```
