---
title: "Check a verification code"
method: POST
path: "/v1/messaging/verify/verifications/{verificationId}/check"
tags: ["Verify"]
---

# Check a verification code

`POST /v1/messaging/verify/verifications/{verificationId}/check`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/messaging/verify/verifications/{verificationId}/check`
- Auth: HTTP bearer

Verify the code the user typed. Wrong, expired, and exhausted codes
answer 200 with `valid: false` and the settled `status`. Only an
unknown id is a 404. A correct code consumes the verification
(single-use, `status: approved`) and fires the `verification.approved`
webhook; the 5th wrong attempt settles it as `max_attempts_reached`
and fires `verification.failed`.


**Billing:** Request; paid actions are priced in credits (see GET /v1/messaging/prices) · **Rate limit:** 60/min

## Path parameters

- `verificationId` string, required

## Headers

- `Idempotency-Key` string
- `X-Tag` string

## Request body

- object
  - `code` string, required

## Response `200`

Completed

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: A managed OTP verification. The code itself is never returned or stored (hash only).
    - `id` string
    - `to` string
    - `resend` boolean: Present on create responses: true when an active verification was resent instead of created.
    - `status` 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed'
    - `channel` 'sms' | 'whatsapp'
    - `attempts` integer
    - `createdAt` string, date-time
    - `expiresAt` string, date-time
    - `sendCount` integer: Accepted deliveries (initial send + resends); each bills one verification fee.
    - `lastSentAt` string, date-time, nullable
    - `maxAttempts` integer
    - `deliveryStatus` 'delivered' | 'read' | 'failed' | 'null', nullable: WhatsApp only, returned by GET /v1/verify/verifications/{verificationId} (null on create and check responses): what Meta reported for the latest send, null until it reports. A code that never reached the recipient (for example a number not on WhatsApp) reads failed, with the Meta error in deliveryErrorCode. failed does not settle the verification: Meta can report failed and later deliver the same message. Reported for at least an hour after the send, well past any code's expiry.
    - `deliveryErrorCode` integer, nullable: Meta error code when deliveryStatus is failed (e.g. 131026, message undeliverable).
    - `valid` boolean
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
