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": "<string>",
  "message": "<string>",
  "newContacts": [
    {}
  ],
  "selectedExistingContacts": [
    {}
  ],
  "userIds": [
    "<string>"
  ],
  "scheduleDate": "2023-11-07T05:31:56Z",
  "process": "<string>",
  "status": "<string>",
  "isAutopilot": true,
  "type": "<string>",
  "segmentation": {},
  "assignment": {},
  "rawCsvData": {}
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "organizationId": "<string>",
    "name": "<string>",
    "message": "<string>",
    "userIds": [
      "<string>"
    ],
    "scheduleDate": "2023-11-07T05:31:56Z",
    "process": "<string>",
    "contactStatus": "<string>",
    "isAutopilot": true,
    "type": "<string>",
    "status": "<string>",
    "createdBy": {},
    "failedUserIds": [
      "<string>"
    ],
    "failedDetails": [
      {}
    ],
    "segmentation": {},
    "assignment": {},
    "rawCsvData": {},
    "stats": {
      "total": 123,
      "sent": 123,
      "failed": 123,
      "successRate": "<string>"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

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