---
title: "Send a verification code to a phone number"
method: POST
path: "/phone_numbers/{phone_number_id}/prepare_verification"
tags: ["Phone Numbers"]
---

# Send a verification code to a phone number

`POST /phone_numbers/{phone_number_id}/prepare_verification`

Sends a one-time code to the given phone number so that a backend can
verify the user controls it (for example, in a custom, backend-driven
sign-in flow). The code is tracked on its own verification; confirm it
with attempt_verification.

## Path parameters

- `phone_number_id` string, required

## Response `200`

The verification. After prepare_verification it is pending (unverified);
after attempt_verification its status reflects the attempt outcome.

- object
  - `object` string — The type of the verification object.
  - `id` string — The ID of the verification. Pass this to attempt_verification.
  - `status` string — The status of the verification (unverified, verified, expired, or failed).
  - `strategy` string — The verification strategy (email_code or phone_code).
  - `attempts` integer, nullable — The number of attempts made against this verification.
  - `expire_at` integer, nullable — Unix timestamp (milliseconds) at which the code expires.
  - `channel` string, nullable — The channel the code was sent over (phone numbers only).

## Other responses

- `400` — Request was not successful
- `401` — Authentication invalid
- `403` — Authorization invalid
- `404` — Resource not found
- `429` — Request was not successful
- `500` — Request was not successful

---

[API](https://skmtc.net/clerk/apis/clerk-backend-api.md) · [All operations](https://skmtc.net/clerk/apis/clerk-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clerk/clerk-backend-api/revisions/cf036e7951d3/schema)
