Campaigns
Create a campaign
Create a campaign
POST
/
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"
}'
[
{
"_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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Campaign created successfully
The response is of type object[]
.
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"
}'
[
{
"_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"
}
]