Skip to main content

Create Campaign

The Create Campaign API is used to create a new campaign with email, SMS, and voice channels.


Endpoint​

POST /api/campaign

Request Example

curl --location 'https://beta.intelsend.com/api/campaign' \\ --header 'x-user-id: 648b80839b30ddb88cdbab11' \\ --header 'Content-Type: application/json' \\ --header 'Cookie: __Secure-next-auth.session-token=YOUR_SESSION_TOKEN' \\ --data-raw '{ "campaignId": null, "name": "campaign Template", "settings": { "email": { "fromEmail": "info@intelsend.com", "templateId": "66d845e99bb64dbbd0d449d8", "version": 1 }, "sms": { "shortCode": "9498671145", "templateId": "6708a567654ca1d854afa3bd", "version": 1 }, "voice": { "callerId": "9498671008", "templateId": "67077eb17f4a5560aa9c3ea8", "version": 1 } }, "channel": ["email","sms","voice"], "contactListId": [ "687a0f67137b4868f1b1eaea", "6889fa1e53d9e06f64c13d59", "683d77584efab5b960439970" ] }'

Headers

HeaderTypeRequiredDescription
x-user-idstring✅User identifier
Content-Typestring✅Must be application/json
Cookiestring✅Authentication session token

Request Body

FieldTypeRequiredDescription
campaignIdstring|null❌Pass null for new campaigns
namestring✅Campaign name
settingsobject✅Contains channel-specific settings
channelstring[]✅Channels to include (email, sms, voice)
contactListIdstring[]✅Array of contact list IDs

Settings Object

ChannelFieldTypeRequiredDescription
emailfromEmailstring✅Sender email
templateIdstring✅Email template ID
versionnumber✅Template version
smsshortCodestring✅Sender shortcode
templateIdstring✅SMS template ID
versionnumber✅Template version
voicecallerIdstring✅Caller ID number
templateIdstring✅Voice template ID
versionnumber✅Template version

Example Response

{ "result": "success" }
Tip

Ensure that the contact lists and templates exist before creating a campaign. Otherwise, the request may fail with validation errors.