WhatsApp - Send Text Only Template


Endpoint

For sending WhatsApp templates, the base url is:

https://rebuetext.com/api/v1

Method

Method URI
POST /whatsapp/send-template

Request Params

Param Type Description
sender_phone string(required) Your approved WhatsApp Business Phone Number (e.g., "254741226412").
phone string(required) Recipient's Phone Number starting with the country code (e.g., "254708XXXXXX").
template_name string(required) The exact name of your approved Meta template (e.g., "order_confirmation").
language string(required) The language code of the template (e.g., "en_US", "en_GB", "sw").
correlator string(optional) A Unique identifier generated by YOUR system. We forward delivery receipts together with your correlator to help you map statuses back to your database.
delivery_endpoint string(optional) Your webhook endpoint where we will send real-time delivery and read receipts for this specific message. Click HERE for the payload structure.
body_variables array(optional) An array of strings to dynamically replace placeholders (1, 2) in your template's body. Must be provided in the exact order they appear in the template.

Sample Request Header

{
    "Content-type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer 123456789"
}

Sample Request Body

To send a batch of messages, simply pass an array of message objects. A single request can process between 1 and 100 messages.

{info} Even if you are sending a single message, the JSON body must be wrapped in an array [ ].

[
    {
        "sender_phone": "254741226412",
        "phone": "254708361797",
        "template_name": "order_confirmation",
        "language": "en_US",
        "correlator": "ORDER-991",
        "delivery_endpoint": "https://yourclient.com/webhooks/whatsapp",
        "body_variables": [
            "Edward",
            "ORD-12345",
            "KES 4,500",
            "0708361797"
        ]
    }
]

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "batch_id": "820f15fc-9ab0-4393-950a-7c3e50f6f345",
    "results": [
        {
            "status": true,
            "message": "Template queued successfully",
            "data": {
                "sender_phone": "254741226412",
                "phone": "254708361797",
                "template_name": "order_confirmation",
                "correlator": "ORDER-991",
                "batch_id": "820f15fc-9ab0-4393-950a-7c3e50f6f345",
                "message_id": 142,
                "currency": "KES",
                "cost_minor": 200,
                "cost": 2.00,
                "created_at": "2026-06-24 19:45:59"
            }
        }
    ]
}

Playground

Sample Error Response

If a message fails validation (e.g., missing variables or insufficient balance), the API will successfully process the rest of the batch, but return status: false with the exact error for the failed item.

StatusCode 200

{
    "status": true,
    "batch_id": "820f15fc-9ab0-4393-950a-7c3e50f6f345",
    "results": [
        {
            "status": false,
            "message": "Template Validation Failed: Body requires exactly 4 variable(s), but 3 provided",
            "data": {
                "phone": "254708361797",
                "correlator": "ORDER-991"
            }
        }
    ]
}

Delivery Receipts Structure

If you provide a delivery_endpoint in your request, we will automatically POST real-time status updates back to your server as Meta processes the message.

{info} The status field can return sent, delivered, read, or failed.

{
    "status": "delivered",
    "message_id": 142,
    "correlator": "ORDER-991",
    "batch_id": "820f15fc-9ab0-4393-950a-7c3e50f6f345",
    "phone": "254708361797",
    "error": null,
    "timestamp": "2026-06-24T19:46:02+03:00"
}

{danger} The Generated Auth Token gives a person full access to your account balances. Do not share it under any circumstance.