---
title: "Send a test code through the hook to a phone"
method: POST
path: "/api/v1/auth-hooks/{hookId}/test"
tags: ["Auth hooks"]
---

# Send a test code through the hook to a phone

`POST /api/v1/auth-hooks/{hookId}/test`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/auth-hooks/{hookId}/test`
- Auth: HTTP bearer

## Path parameters

- `hookId` string, required

## Request body

- TestInputBody
  - `phone` string, required: Phone in international format that receives a test code

## Response `200`

OK

- AuthHookTestBody
  - `channel_used` 'whatsapp_gateway' | 'telegram' | 'telegram_gateway' | 'whatsapp_official', nullable, required
  - `status` 'pending' | 'sent' | 'delivered' | 'verified' | 'failed' | 'expired' | 'canceled' | 'locked', required
  - `to_phone` string, required
  - `verification_id` string, uuid, required

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
