API reference

Launch a campaign

Send a bulk SMS campaign now, or schedule it for later.

POSThttps://nextgenpanelstaging.cloudshope.com/api/v1/sms/campaigns

Launches a bulk SMS campaign against a DLT-approved template. The template must already be Approved — a Pending template is rejected.

Recipients are resolved from one of three sources, chosen with send_to: a direct list in to (comma or newline separated), a saved group named in group_name, or an uploaded CSV. Numbers are normalised to Indian 10-digit mobiles (a +91, 91 or 0 prefix is accepted); invalid, duplicate and blacklisted numbers are skipped and not charged, but invalid ones still count toward count.

Credit is checked and deducted synchronously against the resolved recipient count. If schedule_time is in the future the campaign is created as Submitted and sent when it comes due; otherwise it starts sending immediately.

Authentication

Send Authorization: Bearer <token>. The account needs the campaign.create permission for SMS.

Body parameters

NameTypeRequiredDescription
campaign_namestringYesLabel for the campaign, up to 255 characters. Must be unique on the account (case-insensitive).
template_idintegerYesId of an Approved SMS template on the account.
send_toenumYesContacts, Groups or Upload from CSV — how recipients are resolved.
tostringNoComma or newline separated numbers. Required when send_to is Contacts.
group_namestringNoName of a saved number group. Required when send_to is Groups.
sms_typeenumNotext (default), smart or rcs.
schedule_timestring · ISO 8601NoWhen to send. Omit or use a past time to send now; a value that cannot be parsed also sends now.
is_flashinteger (0 or 1)No1 sends as a flash SMS. Defaults to 0.

Request

  • Send as application/json when send_to is Contacts or Groups.
  • Send as multipart/form-data when uploading a CSV (send_to = Upload from CSV), with the file in a file field.
  • Campaigns are limited to 40,000 recipients; oversized lists are rejected with 400.
  • CSV format: the first column is the mobile number, followed by one column per template variable in placeholder order. A header row is optional.
  • A template with variables (%var% or {var}, i.e. smart SMS) must be sent with send_to = Upload from CSV; rows missing a variable value are rejected and nothing is charged.
curl -X POST https://nextgenpanelstaging.cloudshope.com/api/v1/sms/campaigns \
  -H "Authorization: Bearer cs_live_9f2c…" \
  -H "Content-Type: application/json" \
  -d '{
    "campaign_name": "Diwali offer",
    "template_id": 88,
    "send_to": "Contacts",
    "to": "9876543210, 9812345678",
    "sms_type": "text"
  }'

Response

{
  "id": 1207,
  "campaign_name": "Diwali offer",
  "sms_type": "text",
  "status": "Processing",
  "template_id": 88,
  "sender_id": "CLDSHP",
  "count": 2,
  "message_credits": 1,
  "total_credits": 2,
  "schedule_time": null,
  "created_at": "2026-09-08T09:20:41.000Z",
  "updated_at": "2026-09-08T09:20:41.000Z"
}
201 — example response

Errors

StatusTypeWhen
400bad-requestThe template is not Approved or has an invalid DLT Content ID; a campaign with this name already exists; to or group_name is missing for the chosen send_to; the list exceeds 40,000; a template variable has no value; or no recipient is left because every one is invalid, blacklisted or a duplicate.
404not-foundNo template on the account matches template_id, or the named group does not exist.
409insufficient-creditThe account does not have enough credit for the resolved recipient count.
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.