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-idstringUser identifier
Content-TypestringMust be application/json
CookiestringAuthentication session token

Request Body

FieldTypeRequiredDescription
campaignIdstring|nullPass null for new campaigns
namestringCampaign name
settingsobjectContains channel-specific settings
channelstring[]Channels to include (email, sms, voice)
contactListIdstring[]Array of contact list IDs

Settings Object

ChannelFieldTypeRequiredDescription
emailfromEmailstringSender email
templateIdstringEmail template ID
versionnumberTemplate version
smsshortCodestringSender shortcode
templateIdstringSMS template ID
versionnumberTemplate version
voicecallerIdstringCaller ID number
templateIdstringVoice template ID
versionnumberTemplate 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.