POST
/
campaign
Create a campaign
curl --request POST \
  --url https://atoms-api.smallest.ai/api/v1/campaign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Campaign",
  "description": "This is a campaign to test the API",
  "audienceId": "60d0fe4f5311236168a109ca",
  "agentId": "60d0fe4f5311236168a109ca"
}'
{
  "status": true,
  "data": {
    "_id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "organization": "<string>",
    "agentId": "<string>",
    "createdBy": "<string>",
    "audienceId": "<string>",
    "participantsCount": 123,
    "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

The name of the campaign

Example:

"My Campaign"

audienceId
string
required

The ID of the audience

Example:

"60d0fe4f5311236168a109ca"

agentId
string
required

The ID of the agent

Example:

"60d0fe4f5311236168a109ca"

description
string

The description of the campaign

Example:

"This is a campaign to test the API"

Response

Campaign created successfully

status
boolean
Example:

true

data
object