Send a WhatsApp authentication template for OTP, verification codes, or two-factor authentication.#
This endpoint sends an OTP code via a pre-approved AUTHENTICATION category WhatsApp template. It handles contact auto-creation if the phone number doesn't exist in your contacts, and stores the OTP for subsequent verification via /auth/verify.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#
If no contact_id is provided and the phone number doesn't match an existing contact:A new contact is auto-created with the phone number
Requires default lead status, source, and assignee configured in Application settings
Subject to the tenant's contact limit (returns FEATURE_LIMIT_EXCEEDED if exceeded)
Template Requirements#
Template must be APPROVED status
Template must be AUTHENTICATION category
First body parameter {{1}} receives the OTP code
Second body parameter {{2}}, if present, receives the expiry minutes
URL buttons containing otp{{1}} will automatically receive the OTP code