Idempotency keys for OTP sends
Prevent duplicate OTPs when your app retries. Pass a UUIDv4 Idempotency-Key header on /v2/otp/send and we return the original response without triggering a new send.
If your application retries a send request because of a network blip, you can end up sending two OTPs to the same user. Idempotency keys prevent this completely.
How to use them
- 01Generate a unique key (we recommend a UUIDv4) for each OTP request.
- 02Pass it in the Idempotency-Key header on POST /v2/otp/send.
- 03If the same key arrives within 24 hours, we return the original response without sending a second OTP.
- 04Keep the key until you receive a terminal status (delivered, failed, or expired).
Related articles in OTP & Transactional
Browse other help categories
Getting started
Create your SMSLocal account, add INR credits to your wallet, complete DLT registration, and send your first compliant SMS, WhatsApp, or OTP in under fifteen minutes.
SMS campaigns
SMS content templates, DLT routing, sender ID setup, delivery report statuses, bulk campaign scheduling, throttle controls, and automatic retry logic for India.
WhatsApp Business API
Complete guide to WhatsApp Business API — onboarding, Meta template approval, chatbot flow setup, shared team inbox, quality rating management, and conversation analytics.
AI WhatsApp Agents
Train your AI WhatsApp agent on your own knowledge, sync your product catalogue, configure handoff triggers, and serve customers across twelve Indian languages.
Did this article help?
If something isn't clear or the steps don't match what you're seeing, tell us and we'll fix the doc the same day.