Request
Send a one-time password to a recipient via your chosen channel.Headers
Bearer token with your API key:
Bearer YOUR_API_KEYMust be
application/jsonBody Parameters
Communication channel for the verification code. Must be one of:
sms, email, or voiceRecipient address:
- For SMS/Voice: E.164 formatted phone number (e.g.,
+1234567890) - For Email: Valid email address (e.g.,
[email protected])
Custom message template. Use
{code} as a placeholder for the verification code.Default: "Your verification code is: {code}"Example: "Your Acme Corp verification code is: {code}. Valid for 5 minutes."Email subject line (only used when
channel is email)Default: "Your Verification Code"Example: "Verify Your Acme Corp Account"Code expiration time in seconds. Must be between 60 and 3600.Default:
300 (5 minutes)Custom verification code. Must be a numeric string between 4-10 digits.If not provided, a code will be automatically generated with a length defined in your account settings.Example:
"123456"Response
Always
true for successful requestsUnique identifier for this verification. Use this when calling the verify endpoint.Example:
"11f951d5-32d1-4b49-bdda-7da248e2615c"ISO 8601 timestamp when the code expiresExample:
"2024-01-01T12:05:00.000Z"Unique request identifier for debuggingExample:
"7b4d6022-7260-4568-b6b7-29c366c47bbc"Examples
Success Response
Error Responses
Rate Limiting
This endpoint enforces per-recipient rate limits to prevent spam and abuse:- 2 sends per minute per recipient
- 15 sends per hour per recipient
- 50 sends per 24 hours per recipient
429 response with a retry_after field indicating how many seconds until you can retry.
In addition to per-recipient limits, API keys are also rate limited to 120 requests per minute across all endpoints. Test recipients (like
+15555550100) are exempt from per-recipient limits but still count toward your API key limits. See the Rate Limits section for more details.Best Practices
Message length limits:
- SMS: 160 characters recommended
- Email: No hard limit, but keep it concise
- Voice: Keep under 50 characters for best experience
Credits Consumed
Each send request consumes 1 credit regardless of the channel:| Channel | Credits |
|---|---|
| SMS | 1 credit |
| 1 credit | |
| Voice | 1 credit |