1. Auth (OTP/Verification)
RASL
  • Introduction
  • Authentication
  • Changelog
  • Messages
    • Overview
    • Send Text Message
      POST
    • Send Media Message
      POST
    • Send Template Message
      POST
    • Send Interactive Message
      POST
    • List Messages
      GET
    • Get Message
      GET
  • Auth (OTP/Verification)
    • Overview
    • Send OTP
      POST
    • Verify OTP
      POST
    • Resend OTP
      POST
    • Check OTP Status
      POST
    • List Authentication Templates
      GET
  • Templates
    • Overview
    • List Templates
      GET
    • Get Template
      GET
    • Sync Templates
      POST
  • Contacts
    • Overview
    • List Contacts
      GET
    • Create Contact
      POST
    • Get Contact
      GET
    • Update Contact
      PATCH
    • Delete Contact
      DELETE
    • Batch Create Contacts
      POST
    • Batch Delete Contacts
      DELETE
  • Groups
    • Overview
    • List Groups
    • Create Group
    • Get Group
    • Update Group
    • Delete Group
    • Add Contacts to Group
    • Remove Contacts from Group
  • Account
    • Overview
    • Get Account Info
    • Get Usage Statistics
    • Get Plan Limits
  • Integrations
    • Webhook Format Reference
    • N8N Webhook Integration
    • eCommerce Webhook Integration
      • Webhook Listener
      • WooCommerce Webhook Setup
Dashboard
Support
Support
  • Email
  • WhatsApp
Dashboard
Support
Support
  • Email
  • WhatsApp
Instagram
  1. Auth (OTP/Verification)

Resend OTP

POST
https://getrasl.io/api/v2/auth/resend

Resend a new OTP code to a phone number#

This generates a new random 6-digit code and sends it via WhatsApp authentication template, invalidating any previous OTP for the same phone and purpose. Internally, this endpoint generates a new code and delegates to the Send OTP logic.
📌
Important | No 24-Hour Restrictions
Template messages can be sent at any time, regardless of the customer service window. Unlike simple text and media messages, approved templates are not restricted by Meta's 24-hour policy. They are the only message type that can be sent outside a customer service window, making them perfect for marketing campaigns, notifications, and re-engaging customers after extended periods of inactivity.

Required Scope#

messages:send

Rate Limiting#

10 verification attempts per minute per phone number per tenant
Rate limit key: otp-resend:{tenant_id}:{phone}
Rate limit clears automatically on successful verification
Returns retry_after seconds when limit exceeded

Behavior#

Validates request fields
Checks resend rate limit (3 per 5 min)
Generates a new random 6-digit OTP code
Delegates to the Send OTP logic (which handles template validation, contact lookup, WhatsApp sending, etc.)
Previous OTP for the same phone/purpose is automatically deleted

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Body Params application/jsonRequired

Example
{
    "phone": "+201XXXXXXXXX",
    "template_name": "otp_verification",
    "language": "en",
    "expiry_minutes": 10,
    "purpose": "authentication"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://getrasl.io/api/v2/auth/resend' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "phone": "+201XXXXXXXXX",
    "template_name": "otp_verification",
    "language": "en",
    "expiry_minutes": 10,
    "purpose": "authentication"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "success": true,
    "data": {
        "message_id": "wamid.HBgMMjAxMDIzMDAwNDg5FQIAERgSQkQ0N0I4NjlFMDBFMzZCMjM0AA==",
        "contact_id": 1,
        "phone": "201XXXXXXXXX",
        "template_name": "otp_verification",
        "language": "en",
        "code_sent": true,
        "expiry_minutes": 10,
        "expires_at": "2026-01-01T08:15:15+00:00",
        "status": "sent",
        "sent_at": "2026-01-01T08:05:16+00:00"
    },
    "message": "Authentication code sent successfully. Please verify using /auth/verify endpoint.",
    "meta": {
        "request_id": "cbeeacdc-0afc-4367-b5ba-acb46fe222b8",
        "timestamp": "2026-01-01T08:05:16+00:00"
    }
}
🟠401UNAUTHORIZED
🟠403INSUFFICIENT_SCOPE
🟠403FEATURE_LIMIT_EXCEEDED
🟠404NOT_FOUND
🟠422VALIDATION_ERROR
🟠422WHATSAPP_NOT_CONFIGURED
🟠429RATE_LIMIT_EXCEEDED
🔴500INTERNAL_ERROR
Previous
Verify OTP
Next
Check OTP Status
Built with