Skip to main content
POST
Send a notification using a template

Authorizations

apikey
string
header
required

Your CometChat REST API Key.

Headers

appid
string
required

Tenant application ID

Body

application/json
templateId
string
required

Template CUID or templateId slug. Template must be in approved status.

Example:

"order_update"

receivers
string[]
required

Array of target user IDs. 1–10 = realtime (synchronous, returns notificationId immediately). 11–10,000 = batch (asynchronous, returns batchId; processing happens via queue).

Required array length: 1 - 10000 elements
variables
object

Per-user variables. Keyed by userId; values are { variableName: value } objects. Variables are applied to the template content at delivery time.

Example:
tag
string

Optional analytics tag attached to the send (passes through to delivery records).

Response

Realtime: { notificationId, channels[], mode: "realtime" }. Batch: { batchId, total, channels[], mode: "batch" }.