---
title: "Validate Code - OTP Code"
method: POST
path: "/otp/code/validate (COPY)"
---

# Validate Code - OTP Code

`POST /otp/code/validate (COPY)`

## Request

- Base URL: `https://api.crunchz.app/api`
- URL: `https://api.crunchz.app/api/otp/code/validate (COPY)`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://example.com/oauth2/token`
- TypeScript: <https://skmtc.dev/crunchz/apis/live-2/docs/otp/code/validate%20(COPY)/post.ts> (a function with typed inputs; its response is checked against the schema)

GLOBAL means system will randomize the channel to send or receive the message from or to the user. The Validate OTP Code endpoint allows you to verify OTPs generated by the "Request and Send OTP Code" endpoint. This endpoint checks the validity of the OTP, ensuring it hasn't expired and matches the one sent. The response will include the validation status and relevant data.

## Request body

- object
  - `contact_id` string, required
  - `code` string, required

## Response `200`

200

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `id` string
    - `code` string
    - `contact_id` string
    - `is_validated` boolean
    - `timestamp` string

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/crunchz/apis/live-2.md) - [All operations](https://skmtc.dev/crunchz/apis/live-2/llms.txt) - [OpenAPI document](https://skmtc.dev/crunchz/apis/live-2/revisions/14e6b45e8808?raw)
