WhatsApp - Batch Sending Templates


Endpoint

For sending WhatsApp templates, the base url is:

https://rebuetext.com/api/v1

Method

Method URI
POST /whatsapp/send-template

How Batching Works

Our API is natively designed to handle arrays. This means you do not need to make 100 separate HTTP requests to send 100 messages. You can bundle up to 100 message objects in a single POST request.

You can even mix and match different template types (Text, Image, Video, Document, OTP) in the exact same array.

If one message in the batch fails validation (e.g., missing a variable or an invalid number), the API will still successfully process the rest of the batch. The response will clearly indicate status: true or status: false for each specific item in the array.

Sample Request Header

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

Sample Request Body (Mixed Batch)

In this example, we are sending one standard Text Template and one Image Template in the same request.

[
    {
        "sender_phone": "254741226412",
        "phone": "254708361797",
        "template_name": "order_confirmation",
        "language": "en_US",
        "correlator": "ORDER-991",
        "body_variables": [
            "Edward",
            "ORD-12345",
            "KES 4,500",
            "0708361797"
        ]
    },
    {
        "sender_phone": "254741226412",
        "phone": "254711223344",
        "template_name": "customer_welcome",
        "language": "en_GB",
        "correlator": "USR-002",
        "header": {
            "type": "image",
            "link": "https://ressirli.sirv.com/og-images/budget-wise-og.png"
        },
        "body_variables": [
            "Jane",
            "the VIP Club"
        ]
    }
]

Sample Success / Partial Response

The API will return a top-level status: true indicating the request was received, and an array of results that perfectly matches the order of your input array.

Notice how Item 1 succeeded, but Item 2 failed (e.g., due to a validation error). The system elegantly handles both!

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": 148,
                "currency": "KES",
                "cost_minor": 200,
                "cost": 2.00,
                "created_at": "2026-06-27 22:15:00"
            }
        },
        {
            "status": false,
            "message": "Validation failed: The header.link field must be a valid URL.",
            "data": {
                "phone": "254711223344",
                "correlator": "USR-002"
            }
        }
    ]
}

Playground

Delivery Receipts Structure

If you provided a delivery_endpoint in the payload of the message, 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": 148,
    "correlator": "ORDER-991",
    "batch_id": "820f15fc-9ab0-4393-950a-7c3e50f6f345",
    "phone": "254708361797",
    "error": null,
    "timestamp": "2026-06-27T22:15:05+03:00"
}

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