POST
/
public
/
campaigns
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"
}'
{
  "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

apiKey
string
header
required

Body

application/json
sender
string
required

The Clerk phone number or identifier from which campaign messages will be sent

Example:

"+1415456789"

listName
string
required

The name of the list containing the contacts the campaign will be sent to

Example:

"PremiumTierSubscribers"

mediaUrls
string[]
required

The media URLs to send with the campaign message

Example:
["https://example.com/image.jpg"]
body
string
required

The message text

Example:

"Hello, world!"

provider
enum<string>

The provider to send the message from

Available options:
twilio,
bandwidth,
msteams,
other,
non_voip,
whatsapp,
telnyx,
webex,
rcs
name
string

An optional name for the campaign

Example:

"Sale Reminder"

Response

201
application/json
The created campaign
data
object
required