Skip to main content
POST
/
api
/
campaigns
Create a new campaign
curl --request POST \
  --url https://your-instance.example.com/api/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Q2 Lead Gen",
  "message": "Hi {{firstName}}, are you still interested?",
  "newContacts": [
    {
      "firstName": "Jamie",
      "phoneNumber": "+14155550133"
    }
  ],
  "selectedExistingContacts": [
    {
      "_id": "665f1a0c0e0a4b001a2c9f01",
      "firstName": "Sam",
      "lastName": "Patel",
      "phoneNumber": "+14165550100"
    },
    {
      "_id": "665f1a0c0e0a4b001a2c9f02",
      "firstName": "Alex",
      "lastName": "Morgan",
      "phoneNumber": "+14165550101"
    }
  ],
  "scheduleDate": "2026-05-20T15:00:00.000Z",
  "isAutopilot": false,
  "type": "sms"
}
'
{
  "success": true,
  "message": "Campaign created",
  "data": {
    "_id": "665f1a0c0e0a4b001a2c9f10",
    "name": "Q2 Lead Gen",
    "status": "scheduled",
    "scheduleDate": "2026-05-20T15:00:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
message
string
required
newContacts
object[]
selectedExistingContacts
object[]
userIds
string[]

Legacy format - contact IDs

scheduleDate
string<date-time>
process
string
status
string
isAutopilot
boolean
type
string
segmentation
object
assignment
object
rawCsvData
object

Response

Campaign created

success
boolean
message
string
data
object
Example:
{
"_id": "665f1a0c0e0a4b001a2c9f10",
"organizationId": "64ee9a8b1e7f2a0011223344",
"name": "Q2 Lead Gen",
"message": "Hi {{firstName}}, are you still interested in a quote?",
"userIds": ["64ee9a8b1e7f2a0011223399"],
"scheduleDate": "2026-05-20T15:00:00.000Z",
"process": "64eea1110000000000000001",
"contactStatus": "New Lead",
"isAutopilot": false,
"type": "sms",
"status": "scheduled",
"createdBy": {
"_id": "64ee9a8b1e7f2a0011223399",
"fullName": "Alex Rep"
},
"failedUserIds": [],
"failedDetails": [],
"stats": {
"total": 250,
"sent": 0,
"failed": 0,
"successRate": "0%"
},
"createdAt": "2026-05-18T12:34:56.000Z",
"updatedAt": "2026-05-18T12:34:56.000Z"
}