API reference

Create a campaign

Create a draft email campaign. It does not send until you launch it.

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

Creates a campaign in Draft. Nothing is sent until you call the launch endpoint.

emails is the recipient list as a single string — one address per line, or comma separated. Provide template_id and subject_id for the content, and smtp_ids for the accounts to send from; if you omit smtp_ids the most recently configured SMTP account is used, and if there is none the request fails.

mappings binds template variables to CSV data columns (data_index 1–10). batch_size, delay_to, from_time and to_time pace the send.

Authentication

Send Authorization: Bearer <token>. The account needs access to the email Campaigns feature.

Body parameters

NameTypeRequiredDescription
namestringYesCampaign name, up to 255 characters.
emailsstringYesRecipients — one email per line, or comma separated. At least one.
typestringNoCampaign type. Defaults to bulk.
template_idintegerNoId of an email template on the account.
subject_idintegerNoId of a saved subject line.
smtp_idsinteger[]NoSMTP account ids to send from. Defaults to the newest configured account.
batch_sizeintegerNoEmails per batch. Defaults to 1.
delay_tointegerNoSeconds to wait between batches.
from_timestringNoStart of the daily send window, e.g. 09:00.
to_timestringNoEnd of the daily send window, e.g. 18:00.
ai_variationbooleanNoGenerate AI subject/body variations. Defaults to false.
variation_countintegerNoNumber of variations to generate (0–10).
mappingsobject[]No{ variable, data_index } pairs binding template variables to CSV columns.

Request

curl -X POST https://nextgenpanel.cloudshope.com/api/v1/email/campaigns \
  -H "Authorization: Bearer cs_live_9f2c…" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "October newsletter",
    "emails": "ravi@example.com\nmeera@example.com",
    "template_id": 12,
    "subject_id": 5,
    "smtp_ids": [3],
    "batch_size": 50
  }'

Response

{
  "id": 611,
  "name": "October newsletter",
  "type": "bulk",
  "status": "Draft",
  "template_id": 12,
  "subject_id": 5,
  "batch_size": 50,
  "created_at": "2026-10-02T06:12:00.000Z"
}
201 — example response

Errors

StatusTypeWhen
400bad-requestNo SMTP account is configured and none was given.
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.