---
title: "Create a verification"
canonical: "https://bird.com/docs/api/reference/create-verification"
---

# Create a verification

`POST /v1/verify/verifications`

Creates a verification and sends the recipient a one-time passcode. Provide an email address, a phone number, or both in `to`. The service sends over one channel at a time and moves to the next planned channel if delivery fails.

Calling this again for the same recipient reuses the verification in progress. During the resend cooldown, it returns the current state without sending, so nothing is charged and no send budget is spent. After the cooldown, it sends a fresh passcode, and that send draws on the recipient's hourly send cap exactly as a new verification does, so repeated resends can exhaust the cap and return `429` for the rest of that rolling hour. [Abuse guardrails](/docs/guides/verify/sending-verifications#abuse-guardrails) gives the figures.

The `200` response contains the current state, never the passcode. Submit the recipient's passcode with [Check a verification](/docs/api/reference/create-verification-check) before `expires_at`. An invalid recipient returns `422`; exceeding the send rate limit returns `429`.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

## Code samples

**TypeScript**

```ts
const verification = await bird.verify.verifications.create({
  to: { phone_number: "+15551234567" },
});
console.log(verification.id, verification.status);
```

Examples: [TypeScript](/docs/api/reference/create-verification.ts.md) · [Python](/docs/api/reference/create-verification.py.md) · [Go](/docs/api/reference/create-verification.go.md) · [PHP](/docs/api/reference/create-verification.php.md) · [CLI](/docs/api/reference/create-verification.cli.md) · [MCP](/docs/api/reference/create-verification.mcp.md) · [cURL](/docs/api/reference/create-verification.curl.md)

## Example response `200`

```json
{
  "id": "vrf_01krdgeqcxet5s7t44vh8rt9mg",
  "status": "pending",
  "reason": null,
  "to": {
    "email": "user@example.com"
  },
  "channels": [
    {
      "channel": "email"
    }
  ],
  "last_channel": "email",
  "expires_at": "2026-05-20T09:24:52Z",
  "created_at": "2026-05-20T09:14:52Z",
  "updated_at": "2026-05-20T09:14:52Z"
}
```

## Header parameters

- `Idempotency-Key` (string, optional)

  Client-supplied key. On operations supporting request deduplication, a retained
  response is replayed for duplicate requests with the same key within the
  idempotency window (3 hours by default). This protection requires a workspace,
  organization, or staff-account scope. User-only and unscoped unauthenticated operations,
  streams, and operations with a separate replay contract do not use this
  response replay.

  On a supported operation, if idempotency protection is unavailable before execution, the API returns
  `503 IdempotencyUnavailable` (E01033) without executing this attempt. Retry with
  backoff using the same key and request. An operation that takes effect before
  its response is retained can still execute again on retry.

  Two distinct 409 errors signal misuse:

  - `request_in_progress` (E01004): The same key is currently being
    processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  - `idempotency_key_reuse` (E01005): The same key has already completed
    against a different request body or method. Generate a new key.

  Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Request body

- `to` (object, required): The recipient to verify. Provide an `email`, a `phone_number`, or both; at least one is required. The addresses also identify the verification: a check must supply exactly the set used on the create call, so a verification created with both addresses is not found by either one alone.
- `to.email` (string): The recipient's email address. Case does not matter; the address is lowercased before use.
- `to.phone_number` (string): The recipient's phone number in E.164 format, with the leading `+` and country code (for example `+15551234567`). A number in any other format is rejected as an invalid recipient (`422`).
- `options` (object): Per-request overrides applied to this verification only. `language` picks one of Bird's built-in translations; a custom sender that carries its own template renders the language that template stocks instead. An email template pinned to a custom email sender falls back to its own default language rather than to English (Verify only accepts templates whose language settings fall back). A WhatsApp authentication template follows its own missing-language policy: it falls back to its default or, when set to fail, refuses the send for a language it does not stock. The requested tag stays fixed for the verification.
- `options.code_length` (integer): Passcode length for this verification. Omit to use the configured length.
- `options.channels` (array of string): Reorder or narrow the delivery channels for this request. List channel names in the order to try them; a channel you omit is not used for this request, and a channel not already enabled for the recipient is ignored. A list that leaves no usable channel fails the request with `422`. Omit the field to use the configured order.
- `options.language` (string)

  Which of the built-in message translations to send. It applies to SMS, email and WhatsApp, and has no effect on a Telegram verification. A tag with no translation of its own falls back to its base language, and then to English. The attempt's `template_language` reports which translation was used. The tag is fixed for the verification, so a resend arrives in the same language as the first message.

  Omit it and the language is read from the recipient phone number's country, so a French number gets French without you asking. Set it to override that. A verification with no phone number, and one whose country has no translation here, sends English.

  Supported: en, ar, bg, cs, da, de, el, es, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, mk, mn, ms, nb-NO, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, th, tr, uk, vi, zh, zh-TW. Every one of them is available on SMS and on Bird's built-in email. Mongolian (mn) is the one WhatsApp cannot carry, so a WhatsApp passcode falls back to English for it.

  A custom sender that carries its own template sends that template's content instead: a custom WhatsApp sender uses its authentication template's approved languages under that template's missing-language policy, and a custom email sender pinned to one of your email templates uses the template's published languages, falling back to the template's default language rather than to English. The requested tag stays fixed for the verification; the dashboard's verification detail shows the language each attempt actually rendered.
- `options.autofill_origin` (string): The website this verification's passcodes are entered on, such as `https://login.example.com`, replacing the configured origin for this verification only. Write it as `https://` and a lowercase host, with no port, path or trailing slash; an internationalized host uses its `xn--` form. Any other form is rejected with `422`, naming the form to send when there is one. Each SMS passcode then ends with a line such as `@login.example.com #123456`, which browsers read to offer the code on that site and which can add an SMS segment in languages that need Unicode encoding. Each email passcode carries an `OTP-Token` header with the code and this website, unless `autofill_top_level_origin` is set. An `android_app_hash` replaces the SMS line. A retry of a verification still in progress keeps the origin it started with.
- `options.autofill_top_level_origin` (string): For a passcode entered in a cross-origin frame, such as a payment form embedded in a shop's checkout, the website of the top-level page in the browser tab. `autofill_origin` then names the frame. The SMS line names both sites, as in `@shop.example #123456 @pay.example`, and email passcodes carry no `OTP-Token` header, which can name only one site. It uses the same format as `autofill_origin`. The request is rejected with `422` when the value is not in that format, when no `autofill_origin` is set in the request or the configuration, or when it equals that origin. Autofill works only when this page embeds the frame directly.
- `options.android_app_hash` (string): The Android app that reads this verification's SMS passcodes through Google's SMS Retriever API, replacing the configured hash for this verification only. Send the 11-character app hash computed from the app's package name and signing certificate, such as `FA+9qCX9VSu`; any other form is rejected with `422`. Each SMS passcode is then a short message ending with the hash on its own line, within the API's 140-byte limit, and names no website. Email passcodes don't change: they carry the `OTP-Token` header exactly as they would without a hash. A retry of a verification still in progress keeps the hash it started with.
- `metadata` (object): Optional key/value pairs to attach to the verification, for example a correlation id. Returned on the verification and copied onto the SMS, WhatsApp or email message that carries the code, so reads of that message and its webhooks return it too. The copy is skipped when the object is larger than 2 KB serialized.

## Response body

- `id` (string, required)
- `status` (string, required)

  The verification's current state:

  - `pending`: Awaiting a correct passcode.
  - `verified`: A correct passcode was submitted.
  - `failed`: The verification cannot be completed. Either too many
    incorrect passcodes were submitted, or no planned channel could
    deliver one. Read `reason` to tell those apart.
  - `expired`: The validity window elapsed before a correct passcode.
  - `canceled`: The verification was canceled before completion.
  - `blocked`: A fraud or abuse control stopped the verification.

  Possible values: `pending`, `verified`, `failed`, `expired`, `canceled`, `blocked`
- `reason` (nullable string)

  Why the verification reached its final state, or `null` while `pending` and once `verified`. See the enum for the values it can take.

  Possible values (may grow over time): `attempts_exhausted`, `ttl_elapsed`, `undeliverable`
- `to` (object, required): The recipient to verify. Provide an `email`, a `phone_number`, or both; at least one is required. The addresses also identify the verification: a check must supply exactly the set used on the create call, so a verification created with both addresses is not found by either one alone.
- `to.email` (string): The recipient's email address. Case does not matter; the address is lowercased before use.
- `to.phone_number` (string): The recipient's phone number in E.164 format, with the leading `+` and country code (for example `+15551234567`). A number in any other format is rejected as an invalid recipient (`422`).
- `channels` (array of object, required): The channels this verification uses to deliver the passcode, in attempt order: the first entry is tried first and later entries are fallbacks. An email recipient is verified over email; a phone recipient is verified over the phone channels enabled for its destination country, in the order that country's configuration sets.
- `channels.channel` (string, required)

  The channel a passcode is delivered over. Open enum: new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.

  Possible values (may grow over time): `email`, `sms`, `whatsapp`, `telegram`, `voice`
- `last_channel` (nullable string)

  The channel the most recent passcode was sent on, or `null` before the first send. Open enum; new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.

  Possible values (may grow over time): `email`, `sms`, `whatsapp`, `telegram`, `voice`
- `metadata` (object): The key/value pairs attached when the verification was created.
- `expires_at` (string, required): When the verification expires if no correct passcode is submitted first. After this time its status reports `expired`.
- `verified_at` (nullable string): When the verification was completed, or `null` if it is not yet verified.
- `created_at` (string, required)
- `updated_at` (string, required)

## Related resources

- [Verify phone numbers at signup](/learn/series/verify-phone-numbers-at-signup) (video)
- [What does OTP mean? One-time passwords explained](/explained/verify/what-does-otp-mean) (answer)
- [Customer verification](/verify-api) (product)
- [Build your first integration](/learn/paths/integration) (course)

[Get an implementation brief](/learn/workspace?topic=verify)
