Chatilo
USDPrices shown in US dollars Sign in Start free trial
Guide

Create a broadcast

A broadcast sends one approved template to many contacts: an offer to everyone tagged VIP, a notice to a segment, a reminder to all. In the API a broadcast is called a campaign. This guide creates one, schedules it, and follows it to the end.

A broadcast is three choices #

  • What to send: an approved WhatsApp template, and the values for its placeholders.
  • Who gets it: every contact, contacts with certain tags, or a saved segment.
  • When: now, or at a time you set.

Three things are taken care of for you, exactly as when a broadcast is made in the app. Contacts who opted out are skipped. Contacts without a phone number are skipped. And a broadcast never sends more than the plan’s monthly message allowance has left: if the audience is larger, the rest are skipped and the broadcast’s note says how many.

  1. Choose the audience #

    For tags, list them to get the exact names and how many contacts each has:

    List tags
    curl "https://chatilo.me/api/v1/tags" \
      -H "Authorization: Bearer YOUR_API_KEY"

    For a segment, list the segments. reachable is how many of its contacts can actually be messaged right now:

    List segments
    curl "https://chatilo.me/api/v1/segments" \
      -H "Authorization: Bearer YOUR_API_KEY"

    Segments are made in the app under Contacts. A segment is a filter, not a fixed list: who is in it is worked out when the broadcast starts sending.

  2. Choose the template #

    List approved templates
    curl "https://chatilo.me/api/v1/templates?status=APPROVED" \
      -H "Authorization: Bearer YOUR_API_KEY"

    Note the template’s id (or its name and language) and its variables: how many body values it needs, and whether it has a header to fill.

  3. Check there is allowance left #

    Look at limits.messages.remaining. If it is zero, creating a broadcast answers message_limit.

    See the plan’s limits
    curl "https://chatilo.me/api/v1/account" \
      -H "Authorization: Bearer YOUR_API_KEY"
  4. Create it #

    This one goes to everyone tagged VIP, greets each person by first name, and starts on 20 December at 10:00 Indian time. Leave scheduled_at out to start straight away.

    Create a broadcast
    curl -X POST "https://chatilo.me/api/v1/campaigns" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Idempotency-Key: festive-offer-2026" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Festive offer",
        "template": {
            "name": "festive_offer",
            "language": "en"
        },
        "audience": {
            "type": "tags",
            "tags": [
                "VIP"
            ]
        },
        "variables": {
            "body": [
                "{{first_name}}",
                "FESTIVE20"
            ]
        },
        "scheduled_at": "2026-12-20T10:00:00+05:30"
    }'

    The answer is the broadcast, with "status": "scheduled" and its id. Keep the id. The Idempotency-Key matters here more than anywhere: without it, a retry after a dropped connection would create a second broadcast to the same people.

    Other audiences look like this:

    Values for "audience"
    {
        "all contacts": {
            "type": "all"
        },
        "any of several tags": {
            "type": "tags",
            "tags": [
                "VIP",
                "Denver"
            ]
        },
        "a segment": {
            "type": "segment",
            "segment_id": 4
        }
    }
  5. Follow it #

    Once it starts, messages go out in small batches over the following minutes. Ask for the broadcast to see the numbers move:

    Get a broadcast
    curl "https://chatilo.me/api/v1/campaigns/4001" \
      -H "Authorization: Bearer YOUR_API_KEY"
    Response (shortened)
    {
        "ok": true,
        "campaign": {
            "id": 4001,
            "name": "Festive offer",
            "status": "sending",
            "total": 250,
            "sent": 120,
            "delivered": 112,
            "read": 64,
            "failed": 2,
            "replied": 9,
            "pending": 128,
            "note": null,
            "…": "…"
        }
    }

    total is the audience as it was when sending began. delivered and read keep rising after the broadcast is completed, as phones come online and people open the message.

    Rather than asking repeatedly, subscribe to the campaign.finished event and you are told once when it is done: see webhooks.

Pause, resume or cancel #

Sent the wrong thing? Pausing takes effect within a few seconds. Messages already sent can’t be recalled.

Pause, resume, cancel
curl -X POST "https://chatilo.me/api/v1/campaigns/4001/pause" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -X POST "https://chatilo.me/api/v1/campaigns/4001/resume" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -X POST "https://chatilo.me/api/v1/campaigns/4001/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"

Cancelling works on a scheduled, sending or paused broadcast and is final. The broadcast ends as completed, with a note that it was cancelled.

The life of a broadcast #

StatusMeaningWhat you can do
scheduledWaiting for its start time.Cancel.
sendingMessages are going out.Pause or cancel.
pausedStopped part-way.Resume or cancel.
completedEvery message was attempted, or it was cancelled.Read the numbers.
failedIt could not run: the template was deleted or the plan ended. note says which.Create a new one.

WhatsApp limits how many people a number may start conversations with in a day, and raises the limit as the number earns a good quality rating. Messages beyond it show up under failed. Start with smaller audiences on a new number.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy