Send a one-time password (OTP) to a recipient. TextPeak generates the code, delivers it using your OTP settings, and returns a request_uuid.
Channels and fallback. Your OTP settings list the channels to try in order (SMS, WhatsApp Business, voice, Telegram). When a channel fails to deliver, the next one is tried automatically. provider pins one channel for a single attempt instead.
Resending. While a code is active, a second request for the same recipient returns 409. Send retry: true to resend on the next channel — the request_uuid stays the same. When no channels are left, retry returns 409 too.
Your end user's IP. Pass client_ip when you call from your backend, so the per-IP limit applies to your user rather than to your server.
Configured in your OTP settings (not request fields): code length (default 5 digits), how long a code stays valid (default 300 seconds), how many codes a recipient may request (default 10) and from one IP, how many wrong codes are allowed (default 5), and the cool-down that resets those counters (default 1800 seconds).
Errors. 401 invalid token · 402 balance depleted · 403 blocked · 409 code already active, or nothing left to retry · 422 invalid phone number or provider · 429 too many requests for this recipient or IP. Errors use the standard error envelope.
Authentication: OTP token (the stream token of an OTP stream) in the Authorization header (see Authentication in the API Overview).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||