Skip to main content
POST
/
v3
/
campaigns
Create Campaign
curl --request POST \
  --url https://api4.kinbox.com.br/v3/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "channelId": "<string>",
  "operatorName": "<string>",
  "businessHoursId": "<string>",
  "channelType": "1",
  "leadType": "lead",
  "scheduledTo": "<string>",
  "originalScheduledTo": "<string>",
  "finishedAtPrediction": "<string>",
  "leadsAssetUrl": "<string>",
  "message": "<string>",
  "textRaw": "<string>",
  "assetsUrls": [
    "<string>"
  ],
  "chunksCount": 123,
  "secondsBetweenMessages": 123,
  "secondsBetweenChunks": 123,
  "chunkSize": 123,
  "template": {}
}'
{
  "id": "<string>",
  "_id": "<string>",
  "name": "<string>",
  "channelId": "<string>",
  "operatorId": "<string>",
  "operatorName": "<string>",
  "businessHoursId": "<string>",
  "channelType": "1",
  "leadType": "lead",
  "scheduledTo": "<string>",
  "nextScheduledTo": "<string>",
  "originalScheduledTo": "<string>",
  "finishedAtPrediction": "<string>",
  "leadsAssetUrl": "<string>",
  "message": "<string>",
  "textRaw": "<string>",
  "assetsUrls": [
    "<string>"
  ],
  "active": true,
  "shouldCreateConversation": true,
  "status": "processing",
  "chunksCount": 123,
  "leadsCount": 123,
  "secondsBetweenMessages": 123,
  "secondsBetweenChunks": 123,
  "trackAllChannels": true,
  "trackMaxHours": 123,
  "chunkSize": 123,
  "template": {},
  "progress": 123,
  "resultCounts": {
    "sent": 123,
    "received": 123,
    "read": 123,
    "answered": 123,
    "chunksExecuted": 123,
    "byChunkId": {}
  },
  "messagesProcessed": 123,
  "lastMessageProcessedAt": "2023-11-07T05:31:56Z",
  "healthCheckData": {
    "messagesProcessed": 123,
    "lastMessageProcessedAt": "2023-11-07T05:31:56Z",
    "healthCheckExecutions": 123,
    "jobId": "<string>",
    "chunkId": "<string>",
    "nextHealthCheckAt": "2023-11-07T05:31:56Z",
    "lastHealthCheckAt": "2023-11-07T05:31:56Z"
  },
  "workspaceId": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "lastUpdateAt": "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
channelId
string
operatorName
string
businessHoursId
string
channelType
enum<string>
Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9
leadType
enum<string>
Available options:
lead,
file
scheduledTo
string
originalScheduledTo
string
finishedAtPrediction
string
leadsAssetUrl
string
message
string
textRaw
string
assetsUrls
string[]
chunksCount
number
secondsBetweenMessages
number
secondsBetweenChunks
number
chunkSize
number
template
object

Response

201 - application/json
id
string
required
name
string
required
workspaceId
number
required
createdAt
string<date-time>
required
lastUpdateAt
string<date-time>
required
_id
string
channelId
string
operatorId
string
operatorName
string
businessHoursId
string
channelType
enum<string>
Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9
leadType
enum<string>
Available options:
lead,
file
scheduledTo
string
nextScheduledTo
string
originalScheduledTo
string
finishedAtPrediction
string
leadsAssetUrl
string
message
string
textRaw
string
assetsUrls
string[]
active
boolean
shouldCreateConversation
boolean
status
enum<string>
Available options:
processing,
scheduled,
executing,
paused,
awaiting-chunk,
awaiting-business-hours,
awaiting-other-campaign,
canceled,
failed,
done,
done-sent
chunksCount
number
leadsCount
number
secondsBetweenMessages
number
secondsBetweenChunks
number
trackAllChannels
boolean
trackMaxHours
number
chunkSize
number
template
object
progress
number
resultCounts
object
messagesProcessed
number
lastMessageProcessedAt
string<date-time>
healthCheckData
object
updatedAt
string<date-time>