OTP messages
Send one-time passwords over SMS through OTP-capable providers.
Set isOtp: true to send a one-time password or verification code:
{
"channel": "sms",
"recipients": [{ "type": "Phone", "value": "+905321234567" }],
"content": "Your verification code is 482913. It expires in 3 minutes.",
"priority": "Critical",
"isOtp": true
}Rules
- OTP is only available on the
smschannel. On other channels the request answers400 validation.failed. - The project's SMS provider chain must contain at least one active provider that supports OTP; otherwise the API
answers
422 message.otp_not_supported. - OTP messages are delivered through an OTP-capable provider of the chain (the first healthy one) and are always sent one by one, never grouped with other recipients.
Good practices
- Use
priority: "Critical"so codes are not delayed by other traffic. - Generate and verify the code in your own application; the API only delivers the text.
- Keep codes short-lived and do not put them in
idempotencyKeyor other fields that are stored and searchable.