Flowstates messaging platform logo
    OTP API - one API for SMS, email and voice verification

    One OTP API for every channel, so codes actually arrive.

    One managed OTP API covers SMS, email and voice verification through two REST endpoints. Multi-vendor SMS routing, sub-second cascade, automatic email fallback and full attempt tracking - so logins, signups and checkouts do not fail at the last step. For general messaging, see the Messaging API.

    Quick answer

    An OTP API is a pair of endpoints that sends a one-time passcode and verifies the code a user enters. The Flowstates OTP API sends across multiple SMS vendors with sub-second failover and automatic email fallback, so codes still arrive when a route degrades, and every attempt is logged for investigation.

    Every undelivered code is a lost user

    OTP delivery is the silent killer of authentication funnels. Users who do not receive the code do not retry - they leave.

    Failed signups

    When the OTP does not arrive, the user drops off and the acquisition cost is wasted.

    Conversion leakage

    Even a few percent of OTP failures compound across login, checkout and password reset flows.

    Support tickets

    Every undelivered code becomes a ticket - your support team becomes a vendor escalation desk.

    SMS first. Email when SMS will not.

    One API call. Multiple SMS vendors tried in order, with email as the safety net. The user gets the code through whichever path works.

    // 1. Send the OTP
    POST /v1/otp/send
    {
    "phone": "+44 7911 123456",
    "email": "user@example.com",
    "length": 6,
    "ttl_seconds": 300
    }
    // 2. Verify what the user entered
    POST /v1/otp/verify
    {
    "request_id": "otp_8f2a...",
    "code": "483921"
    }
    OTP API - Delivery Failover Flow
    Guaranteed Delivery
    Your Application
    POST /v1/otp/send
    phone: "+44...", length: 6
    OTP Routing Engine
    SMS
    Primary channel
    Vendor A (Vonage)timeout
    Vendor B (Sinch)rejected
    SMS exhausted
    Email
    Failover channel
    SendGridOTP delivered
    OTP delivered
    OTP Code Delivered via Email
    SMS vendors exhausted - automatic email fallback - code delivered in 1.2s

    One API call. If SMS delivery fails across all configured vendors, the OTP is automatically sent via email - ensuring your customer always receives their code.

    Built for verification, not marketing

    The OTP API runs on a separate routing path with its own priority lane, vendor stack and audit trail - purpose-built for short-lived, time-critical codes.

    Multi-vendor SMS cascade

    Configure a stack of SMS vendors. If Vendor A fails or times out, Vendor B is tried before any fallback channel kicks in.

    SMS-to-email fallback

    If every SMS vendor fails, the same code is sent via email automatically with no extra integration.

    Priority routing

    OTPs bypass standard message queues and route through the fastest path, separately from marketing traffic.

    Sub-second decisions

    Vendor selection, retry and fallback decisions happen in under a second so the user is not left waiting.

    Attempt tracking

    Every send, retry and verification attempt is logged with vendor, latency and result for audit and analytics.

    Single endpoint

    One POST to send, one POST to verify. Consistent response format whether SMS, email or fallback was used.

    The SMS verification workflow: two endpoints, three steps.

    01

    Send

    POST the user's phone and optional email fallback. We generate, store and dispatch the code.

    02

    Cascade

    We try your configured SMS vendors in priority order, then fall back to email if needed - all within sub-second timing.

    03

    Verify

    POST the code the user entered. We confirm, mark the attempt and return success or a typed error.

    OTP API FAQ

    What is an OTP API?

    An OTP API is a pair of endpoints: one sends a one-time passcode to a user and one verifies the code they enter. The API owns code generation, expiry, attempt limits and delivery, so your application only has to call send and verify.

    How does the Flowstates OTP API differ from sending an SMS yourself?

    A plain SMS send has one route and no verification state. The OTP API cascades across multiple SMS vendors with sub-second failover, falls back to email when SMS is not arriving, and tracks every attempt per request so failures can be diagnosed instead of guessed.

    Which channels are used to deliver codes?

    SMS as the primary channel, with automatic email fallback. Channel order and per-country vendor order are configured for your traffic during onboarding.

    How long does integration take?

    Two REST calls: POST /v1/otp/send returns a request_id, and POST /v1/otp/verify checks the code against it. Most teams integrate in a day; the API reference is published in our docs.

    Can I control code length and expiry?

    Yes. Code length and time-to-live are request parameters, and resend and attempt limits are set per account so you can match your own security policy.

    What happens when one SMS vendor degrades?

    The cascade moves to the next configured route automatically, and email fallback triggers if the code still isn't confirmed as delivered. Flowstates operates the gateway under a 99.99% gateway SLA and investigates route-level failures on your behalf.

    Stop losing users at the verification step.

    Bring your own SMS and email vendors, or use ours. The API stays the same either way.