Send Campaign
Queue a push campaign for fan-out, immediately or at a scheduled time.
Endpoint
POST /push/campaigns/{id}/send
Returns: 200 OK
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Campaign ID |
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <your-api-key> | Yes |
Content-Type | application/json | Yes |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
scheduled_at | string | No | ISO 8601 date-time to schedule for. Must be in the future. Omit to send immediately. |
{
"scheduled_at": "2026-09-01T09:00:00Z"
}
Send an empty body — or no body at all — to send now.
How recipients are filtered
Every recipient passes the same push consent gate as a single Send Push. The difference is what happens when someone fails it:
- In a campaign, a contact who opted out or whose devices are all dead is skipped, not refused. A partially-reachable audience still sends to the reachable part.
- In a single send, the same contact returns
403.
If smart_sending_enabled is on, contacts who received a push too recently are also skipped, according to your organization's frequency cap.
A campaign whose audience resolves to zero reachable contacts is rejected with 400 rather than sent — see the error tabs below.
Response
{
"id": "0192a1b2-c3d4-7e5f-9000-abcdef123456"
}
The campaign moves to Queued (immediate) or Scheduled (with scheduled_at). A 200 means accepted for fan-out, not that notifications have been delivered.
To reschedule, call this endpoint again with a new scheduled_at — a campaign that is already Scheduled simply takes the new time. You do not need to cancel it first.
Examples
- cURL
- JavaScript
- Python
- C#
- PHP
# Send now
curl -X POST "https://api.arsel.sa/v1/push/campaigns/0192a1b2-c3d4-7e5f-9000-abcdef123456/send" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{}'
# Schedule
curl -X POST "https://api.arsel.sa/v1/push/campaigns/0192a1b2-c3d4-7e5f-9000-abcdef123456/send" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "scheduled_at": "2026-09-01T09:00:00Z" }'
const id = "0192a1b2-c3d4-7e5f-9000-abcdef123456";
const response = await fetch(
`https://api.arsel.sa/v1/push/campaigns/${id}/send`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer be_your_api_key",
},
body: JSON.stringify({}), // or { scheduled_at: "2026-09-01T09:00:00Z" }
},
);
console.log(await response.json());
import requests
campaign_id = "0192a1b2-c3d4-7e5f-9000-abcdef123456"
response = requests.post(
f"https://api.arsel.sa/v1/push/campaigns/{campaign_id}/send",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer be_your_api_key",
},
json={}, # or {"scheduled_at": "2026-09-01T09:00:00Z"}
)
print(response.json())
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer be_your_api_key");
var id = "0192a1b2-c3d4-7e5f-9000-abcdef123456";
var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync(
$"https://api.arsel.sa/v1/push/campaigns/{id}/send", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
<?php
$id = "0192a1b2-c3d4-7e5f-9000-abcdef123456";
$ch = curl_init("https://api.arsel.sa/v1/push/campaigns/$id/send");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer be_your_api_key"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(new stdClass()));
echo curl_exec($ch);
curl_close($ch);
Error Responses
- 400 Already Processing
- 400 Empty Audience
- 400 Schedule
- 429 Quota
- 404 Not Found
Only a Draft or Scheduled campaign can be sent:
{
"status_code": 400,
"name": "bad_request",
"message": "Campaign is already being processed"
}
{
"status_code": 400,
"name": "bad_request",
"message": "Campaign has no reachable recipients. Push only reaches contacts with a registered device — check the estimate before sending."
}
When Smart Sending is what emptied the audience, the message says so instead:
{
"status_code": 400,
"name": "bad_request",
"message": "All 1240 reachable recipients were skipped by Smart Sending (at least 24 hours must pass between sends). Disable Smart Sending for this campaign or try again later."
}
{
"status_code": 400,
"name": "bad_request",
"message": "Schedule time must be in the future"
}
A campaign that is already fanning out cannot be scheduled:
{
"status_code": 400,
"name": "bad_request",
"message": "Campaign cannot be scheduled — it is already being processed or sent"
}
{
"status_code": 429,
"name": "quota_exceeded",
"message": "Monthly push quota exhausted (50000/50000 used)."
}
{
"status_code": 404,
"name": "not_found",
"message": "Campaign not found"
}