Send notifications with the API
The fields on POST /push/send, which audiences you can target, and what each error means.
text
POST /api/v1/push/sendSends a campaign for the app that owns the API key. See API authentication for the headers.
Example
bash
curl -X POST https://push.example.com/api/v1/push/send \
-H "x-app-id: app_49e692ad" \
-H "x-api-key: <your-api-key>" \
-H "x-tenant-id: <your-tenant-id>" \
-H "Content-Type: application/json" \
-d '{
"appId": "app_49e692ad",
"campaignName": "Market open",
"type": "simple",
"channels": ["android", "ios", "web"],
"payload": {
"title": "Nifty is up 1.2%",
"message": "Tap to see the top movers.",
"deepLink": "myapp://markets/nifty"
}
}'Request fields
| Field | Type | Description |
|---|---|---|
appId | string | Required. Your app id. It is set from your API key, but must be present. |
campaignName | string | Required. Names the campaign. |
type | string | Required. One of simple, rich, interactive, silent. |
channels | string[] | Required. Any of android, ios, web, whatsapp, or ["email"] on its own. |
payload | object | Required. The message content. See below. |
segmentId, segmentIds | string, string[] | Target one or more segments. Several segments reach the union of all of them. |
excludeSegmentId | string | Leave out the members of this segment. |
segmentQuery | object | Target with an inline filter instead of a saved segment. |
deviceIds | string[] | Send to specific devices by id. |
templateId | string | Records which saved template the campaign used. You still send payload. See Message templates. |
scheduleAt | ISO 8601 string | Send later instead of immediately. |
timezone | string | Timezone for scheduleAt, for example Asia/Kolkata. |
receiveMode | string | sameTime, or perUserTimezone to deliver at the same local time for everyone. |
abTest | object | Optional. { enabled, variants } with variant A and variant B. See A/B testing. Included on every plan. Not allowed when channels includes whatsapp or email. |
throttleRatePerMinute | integer | Optional. Push only. Overrides the app throttle. 0 sends this message at full speed. Omit it to use the app setting. |
retarget | object | Optional. A follow-up. { notificationId, category } where category is sent, confirmed, not_confirmed, clicked, not_clicked or failed. People who unsubscribed are left out. The follow-up can be sent while that message's events are still kept. |
payload
| Field | Type | Description |
|---|---|---|
title | string | Required. The heading. |
message | string | Required. The body. |
iconUrl, imageUrl, gifUrl, videoUrl, bannerUrl | string | Media for the notification. |
deepLink | string | Where a tap goes. |
actionButtons | object[] | Up to three buttons, each { id, title, url }. |
data | object | Your own key-value pairs, as strings. |
locale | string | The language of this message. |
whatsapp | object | Required when channels includes whatsapp. { templateName, language, variables? }. variables is a list of strings in template order. See WhatsApp. |
email | object | Required when channels is ["email"]. { subject, html, preheader?, text?, senderId? }. See Email. |
Response
Copy-paste samples for Go, Node.js, Java, Python, .NET, Ruby and PHP are in Server examples. Mobile setup for Kotlin, Java, Swift and Objective-C is in the Android and iOS guides.
A successful request returns 201 with the new campaign. The status is queued until delivery starts.
json
{
"id": "39E5801D-4E0A-41D2-986D-B9A692170C84",
"tenantId": "1b01d261-1eda-4a45-9c17-915752734330",
"appId": "app_49e692ad",
"campaignName": "Market open",
"status": "queued",
"createdAt": "2026-10-05T06:32:45.691Z"
}Errors
| Status | Meaning |
|---|---|
400 | A field is missing or invalid. The response lists each problem. |
403 | A header is missing, or the API key is invalid or revoked. |