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

Documentation Index

Fetch the complete documentation index at: https://cometchat-22654f5b-docs-campaigns-service-rest-api.mintlify.app/llms.txt

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

Authorizations

Authorization
string
header
required

Service-to-service basic auth

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