Create a campaign
Create a draft email campaign. It does not send until you launch it.
POST
https://nextgenpanel.cloudshope.com/api/v1/email/campaignsCreates 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
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Campaign name, up to 255 characters. |
emails | string | Yes | Recipients — one email per line, or comma separated. At least one. |
type | string | No | Campaign type. Defaults to bulk. |
template_id | integer | No | Id of an email template on the account. |
subject_id | integer | No | Id of a saved subject line. |
smtp_ids | integer[] | No | SMTP account ids to send from. Defaults to the newest configured account. |
batch_size | integer | No | Emails per batch. Defaults to 1. |
delay_to | integer | No | Seconds to wait between batches. |
from_time | string | No | Start of the daily send window, e.g. 09:00. |
to_time | string | No | End of the daily send window, e.g. 18:00. |
ai_variation | boolean | No | Generate AI subject/body variations. Defaults to false. |
variation_count | integer | No | Number of variations to generate (0–10). |
mappings | object[] | 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"
}Errors
| Status | Type | When |
|---|---|---|
| 400 | bad-request | No SMTP account is configured and none was given. |
| 422 | validation-failed | A field failed validation. The errors array names each field and why. |
| 401 | unauthorized | The Authorization header is missing, malformed or the token is invalid or expired. |
| 403 | forbidden | The token is valid but the account is not allowed to perform this action. |
