POST /v3/send when your system generates the OTP code and you want OTP.ID to handle only delivery. This endpoint supports message-based outbound channels only: whatsapp, sms, and email. The code you supply is delivered to the user and is never echoed back in any API response.
Endpoint
Request Headers
Request Body
string
required
The OTP code to deliver. Must contain digits only and be between 4 and 8 characters long. Example:
"482913".string
required
The delivery channel for the OTP. Accepted values:
whatsapp, sms, email.string
required
The destination phone number or email address.
- Phone numbers: digits only, minimum 10 characters (e.g.
"6281234567890") - Email: a valid email address (e.g.
"user@example.com")
string
Legacy alias for
destination. It is still accepted for backward compatibility, but new integrations and all examples should use destination. If both destination and number are provided, destination takes precedence.string
Legacy fallback for Email OTP. It is used only when both
destination and number are empty.string
The brand name included in channels that deliver a message. Defaults to the
brand_name configured on your merchant account.integer
Ignored when
otp is provided — the length is inferred from the otp value you supply. Included for API compatibility; has no effect.integer
Time-to-live in seconds before the OTP expires. Accepted range:
60–900. Defaults to 300 (5 minutes). Values outside this range are clamped to the nearest bound — not rejected.string
Your own idempotency key for this transaction. If you resubmit the same
external_id within 24 hours with identical parameters (same channel, resolved destination, and otp), OTP.ID returns the original otp_id without resending the message and without deducting additional credits. A resubmission with different parameters returns 409 DUPLICATE_EXTERNAL_ID.Response Fields
string
The unique transaction ID assigned by OTP.ID. Use this in
POST /v3/verify and GET /v3/otp/{otp_id}.string
Current delivery status:
sent / success when delivered, failed if vendor delivery failed.string
The channel used to deliver the OTP, echoed from your request.
string
The destination address used. This response field is still named
number for backward compatibility, even when your request uses destination.integer
The number of credits charged for this transaction. Present even when delivery fails; no credits are deducted on failure.
integer
Your remaining credits after this transaction. Unchanged if delivery failed or if this was an idempotency replay.
string
The datetime at which this OTP expires, in
YYYY-MM-DD HH:MM:SS format (WIB, UTC+7).Examples
SMS
The OTP code you sent is never returned in the response — you already know it on your side. Store it securely if you need to reference it later (e.g. for audit logs), but never log it in plaintext.
Error Responses
All errors follow the shape{"success": false, "data": null, "error": {"code": "...", "message": "..."}}.
Example — otp validation error:

