Skip to main content
POST
/
campaigns
Create a new campaign
curl --request POST \
  --url https://{appId}.api-{region}.cometchat.io/v3/campaigns/campaigns \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'appid: <appid>' \
  --data '
{
  "name": "<string>",
  "templateId": "<string>",
  "templateVersion": 2,
  "variables": {
    "promoCode": "SUMMER25"
  },
  "config": {}
}
'

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

apikey
string
header
required

Your CometChat REST API Key.

Headers

appid
string
required

Tenant application ID

Body

application/json
name
string
required

Campaign name

templateId
string
required

Template ID (CUID or templateId slug)

templateVersion
number
required

Template version number to pin

Required range: x >= 1
variables
object

Campaign-level default variables — applied to every recipient as a fallback layer below per-user CSV values and above template variableSchema defaults. Example: { "promoCode": "SUMMER25", "supportEmail": "help@acme.io" }.

Example:
{ "promoCode": "SUMMER25" }
config
object

Additional campaign configuration (free-form)

Response

201

Campaign created