API reference

Create a campaign

Create and submit a bulk WhatsApp campaign in one call.

POSThttps://nextgenpanel.cloudshope.com/api/v1/whatsapp/campaigns

Creates the campaign and immediately queues the sends — this is not a draft. Credit is checked and reserved up front; invalid, duplicate and blacklisted numbers are trimmed automatically.

Provide exactly one of template_id (a Meta-approved message template), flow_id (a WhatsApp Flow) or automation_flow_id (an Automation-module flow). contacts is one row per recipient, each with its own variables map for template placeholders.

Omit scheduled_at to send now, or pass a future ISO 8601 timestamp to schedule.

Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers. A 429 adds Retry-After.

Authentication

Send Authorization: Bearer <token>. The account needs the Bulk WhatsApp feature.

Headers

NameTypeRequiredDescription
Idempotency-KeystringYesA unique key you choose per operation. A retry with the same key returns the original response instead of sending again.

Body parameters

NameTypeRequiredDescription
namestringYesCampaign name, up to 255 characters.
waba_number_idintegerYesId of the WABA number to send from.
template_idintegerNoApproved message template id. One of template_id / flow_id / automation_flow_id.
flow_idintegerNoWhatsApp Flow id.
automation_flow_idstringNoAutomation-module flow id (a UUID).
contactsobject[]No{ phone_number, variables } per recipient. variables is a { key: value } map of strings.
scheduled_atstring · ISO 8601NoFuture timestamp to schedule. Omit or null to send now.
mm_litebooleanNoMarketing-template routing hint; re-validated server-side.

Request

curl -X POST https://nextgenpanel.cloudshope.com/api/v1/whatsapp/campaigns \
  -H "Authorization: Bearer cs_live_9f2c…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7c2f9e1a-order-updates-2026-09-20" \
  -d '{
    "name": "Order updates",
    "waba_number_id": 4,
    "template_id": 88,
    "contacts": [
      { "phone_number": "919876543210", "variables": { "1": "Ravi", "2": "#4021" } }
    ]
  }'

Response

{
  "id": 905,
  "name": "Order updates",
  "status": "running",
  "total_contacts": 1,
  "sent_count": 0,
  "failed_count": 0,
  "pending_count": 1,
  "scheduled_at": null,
  "created_at": "2026-09-20T11:03:00.000Z"
}
201 — example response

Errors

StatusTypeWhen
400bad-requestNone or more than one of template_id / flow_id / automation_flow_id, no valid contacts, or the Idempotency-Key header is missing.
409insufficient-creditNot enough WhatsApp credit for the recipient count.
429rate-limitedToo many writes in the current window. Retry after Retry-After seconds.
422validation-failedA field failed validation. The errors array names each field and why.
401unauthorizedThe Authorization header is missing, malformed or the token is invalid or expired.
403forbiddenThe token is valid but the account is not allowed to perform this action.