---
title: "Send an OTP verification code"
method: POST
path: "/v2/otp/send"
tags: ["otp-v2"]
---

# Send an OTP verification code

`POST /v2/otp/send`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/otp/send`
- Auth: API key in header `X-Api-Key`

## Request body

- OTPSendRequest
  - `channel` 'sms' | 'voice' | 'auto': Delivery channel: sms (default), voice, or auto (SMS with voice fallback)
  - `metadata` object: Optional metadata
  - `to` string, required: Recipient phone number (E.164)

## Response `201`

OTP sent

- OTPSendResponse
  - `channel` string: Delivery channel used (sms or voice)
  - `deduplicated` boolean: True if returning an existing OTP within dedup window
  - `expires_in` integer: Seconds until code expires
  - `number_type` string: Detected line type (mobile, voip, landline, unknown)
  - `otp_id` string: OTP message ID
  - `sandbox` boolean: True if sent to a test number
  - `success` boolean
  - `to` string: Normalized phone number

## Other responses

- `400`: Validation error
- `403`: Forbidden
- `429`: Rate limited
- `503`: Service temporarily unavailable

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
