Public
Public
Create and trigger a Campaign
Create and trigger a Campaign for a Cohort
POST
/
public
/
campaigns
Copy
curl --request POST \
--url https://web-api.clerk.chat/public/campaigns \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '{
"sender": "+1415456789",
"provider": "whatsapp",
"listName": "PremiumTierSubscribers",
"mediaUrls": [
"https://example.com/image.jpg"
],
"body": "Hello, world!",
"name": "Sale Reminder"
}'
Copy
{
"data": {
"id": 1,
"body": "Hello, world!",
"teamId": "1",
"userId": "1",
"name": "October Sale Reminder",
"inboxId": "00000000-0000-0000-0000-000000000000",
"status": "scheduled",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-01T00:00:00.000Z",
"error": "<string>"
}
}
Authorizations
Body
application/json
Response
201
application/json
The created campaign
The response is of type object
.
Copy
curl --request POST \
--url https://web-api.clerk.chat/public/campaigns \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '{
"sender": "+1415456789",
"provider": "whatsapp",
"listName": "PremiumTierSubscribers",
"mediaUrls": [
"https://example.com/image.jpg"
],
"body": "Hello, world!",
"name": "Sale Reminder"
}'
Copy
{
"data": {
"id": 1,
"body": "Hello, world!",
"teamId": "1",
"userId": "1",
"name": "October Sale Reminder",
"inboxId": "00000000-0000-0000-0000-000000000000",
"status": "scheduled",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-01T00:00:00.000Z",
"error": "<string>"
}
}
Assistant
Responses are generated using AI and may contain mistakes.