Skip to main content
POST
/
campaigns
/
{id}
/
recipients
Add recipients manually (user IDs)
curl --request POST \
  --url https://{appId}.api-{region}.cometchat.io/v3/campaigns/campaigns/{id}/recipients \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'appid: <appid>' \
  --data '
{
  "userIds": [
    "<string>"
  ],
  "userVariables": {
    "user_42": {
      "name": "Ajay"
    }
  }
}
'

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

Path Parameters

id
string
required

Body

application/json
userIds
string[]
required

Array of user IDs to add as recipients

Required array length: 1 - 10000 elements
userVariables
object

Per-user variables, keyed by userId. Persisted on each CampaignRecipient.variables row at insert time. Renderer substitutes these into template content per recipient. Example: { "user_42": { "name": "Ajay" }, "user_43": { "name": "Sam" } }.

Example:
{ "user_42": { "name": "Ajay" } }

Response

Recipients added