1. Messages
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. Messages

Send Template Message

POST
https://getrasl.io/api/v2/messages/template

Send a pre-approved WhatsApp template message. Template messages can be sent at any time#

📌
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

Merge Fields#

You can use merge fields in the message text that will be replaced with actual contact data:
@{contact_first_name} — Contact's first name
@{contact_last_name} — Contact's last name
@{contact_email} — Contact's email
@{contact_phone} — Contact's phone number

Auto-Contact Creation#

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 Validation#

The endpoint validates that all required template parameters are provided:
TEXT header: header_field_1 required if template has header parameters
IMAGE header: header_image_url or header_image_file required
VIDEO header: header_video_url or header_video_file required
DOCUMENT header: header_document_url or header_document_file required
Body: field_1 through field_N required for each body parameter

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 multipart/form-dataRequired

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/messages/template' \
--header 'Authorization: Bearer <token>' \
--form 'phone="201XXXXXXXXX"' \
--form 'template_name="hello_world"' \
--form 'language=""' \
--form 'contact_id=""' \
--form 'header_image_url=""' \
--form 'header_image_file=@""' \
--form 'header_video_url=""' \
--form 'header_video_file=@""' \
--form 'header_document_url=""' \
--form 'header_document_file=@""' \
--form 'header_document_name=""' \
--form 'header_field_1=""' \
--form 'field_1 to field_10=""' \
--form 'button_0 to button_2=""'

Responses

🟢200Success
application/json
Body

Example
{
    "success": true,
    "data": {
        "message_id": "string",
        "contact_id": 0,
        "phone": "string",
        "template_name": "string",
        "language": "string",
        "status": "string",
        "sent_at": "string",
        "chat_id": 0,
        "chat_message_id": 0
    },
    "meta": {
        "request_id": "string",
        "timestamp": "string"
    }
}
🟠401UNAUTHORIZED
🟠403INSUFFICIENT_SCOPE
🟠403FEATURE_LIMIT_EXCEEDED
🟠403CONTACT_OPTED_OUT
🟠404NOT_FOUND
🟠422VALIDATION_ERROR
🟠422WHATSAPP_NOT_CONFIGURED
🟠429RATE_LIMIT_EXCEEDED
🔴500INTERNAL_ERROR
🔴500MESSAGE_SEND_FAILED
Previous
Send Media Message
Next
Send Interactive Message
Built with