---
title: "OTP Verify Request"
method: POST
path: "/otp/verify"
tags: ["OTP"]
---

# OTP Verify Request

`POST /otp/verify`

## Request

- Base URL: `https://api.commpeak.com/textpeak/streams`
- URL: `https://api.commpeak.com/textpeak/streams/otp/verify`
- Auth: API key in header `Authorization`

Verify the code a recipient submitted against the active OTP for their phone number. Returns `verification: true` on a match, otherwise `false`.

A wrong code is a normal `false` result with HTTP `200` — not an error. A correct code is accepted once: verifying clears it.

**Voice OTP.** While the call is still in progress the response is `verification: false` with `in_progress: true`; verify again after the call.

**Errors.** `400` no active code for this recipient · `429` too many wrong codes (wait for the cool-down). Errors use the standard error envelope.

**Authentication:** OTP token (the stream token of an OTP stream) in the `Authorization` header (see **Authentication** in the API Overview).

## Request body

- VerifyOTPRequest
  - `recipient_phone` string, required: The phone number the code was sent to, in international format.
  - `code` string, required: The code your user entered, as a string (keep leading zeros).

## Response `200`

Successful Response

- VerifyOTPResponse
  - `verification` boolean, required: `true` when the code matches the active code for this recipient.
  - `in_progress` boolean, nullable: `true` while a voice OTP call is still in progress: verification is `false` for now, so ask again after the call.

## Other responses

- `400`: The request could not be served (see the endpoint description).
- `401`: Invalid token, or the token is not valid from this IP address.
- `402`: Payment required: the account balance is depleted (`0x41`).
- `403`: Missing token, blocked IP address, or the stream is not available (`0x11`, `0x16`, `0x21`, `0x22`).
- `422`: Validation Error
- `429`: Rate limit reached (see the endpoint description).

---

[API](https://skmtc.dev/commpeak/apis/commpeak-textpeak-streams-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-textpeak-streams-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-textpeak-streams-api/revisions/b9aaa8b4efa2?raw)
