POST
/
webhook
/
campaign
WhatsApp Campaign
curl --request POST \
  --url https://webhook.cocoonmail.com/webhook/campaign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_number": "+910000000000",
  "type": "template",
  "content": {
    "template_name": "welcome_template",
    "template_language": "en"
  },
  "tags": [
    "tag1",
    "tag2"
  ],
  "recipient": [
    {
      "whatsapp_number": "+910000000000",
      "first_name": "John",
      "email": "john@example.com"
    },
    {
      "whatsapp_number": "+910000000001",
      "name": "Jane",
      "email": "jane@example.com"
    }
  ],
  "scheduled_at": "2026-04-30T12:00:00Z"
}
'
{
    "success": true,
    "message": "WhatsApp campaign message(s) sent successfully."
}
Send WhatsApp campaign messages to multiple recipients using pre-approved templates. This endpoint allows for scheduling messages at a specific time.

Request Body

The request body includes the sender’s phone number, template details, recipient information, tags, and the scheduled time.

Example Payload

{
    "from_number": "+910000000000",
    "type": "template",
    "content": {
        "template_name": "welcome_template",
        "template_language": "en"
    },
    "tags": ["tag1", "tag2"],
    "recipient": [
        {
            "whatsapp_number": "+91 0000000000",
            "first_name": "John",
            "email": "john@example.com"
        },
        {
            "whatsapp_number": "+91 0000000001",
            "name": "Jane",
            "email": "jane@example.com"
        }
    ],
    "scheduled_at": "2026-04-30T12:00:00Z"
}
{
    "success": true,
    "message": "WhatsApp campaign message(s) sent successfully."
}

Authorizations

Authorization
string
header
required

Use your API key with the 'Bearer ' prefix

Body

application/json
from_number
string
required
type
enum<string>
default:template
required
Available options:
template
content
object
required
recipient
object[]
required
tags
string[]

Array of strings to tag the message with.

Example:
["tag1", "tag2"]
scheduled_at
string<date-time>

Response

WhatsApp campaign message(s) sent successfully.