Skip to main content

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​

ParameterTypeDescription
idstringCampaign ID

Headers​

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonWhen sending a body
Idempotency-KeyAny unique string, max 256 charsNo — makes a retry safe; see Idempotency

Body Parameters​

ParameterTypeRequiredDescription
scheduled_atstringNoISO 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​

Send now:

curl -X POST "https://api.arsel.sa/v1/push/campaigns/0192a1b2-c3d4-7e5f-9000-abcdef123456/send" \
-H "Authorization: Bearer $ARSEL_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 $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scheduled_at": "2026-09-01T09:00:00Z"
}'

Error Responses​

Only a Draft or Scheduled campaign can be sent:

{
"status_code": 400,
"name": "bad_request",
"message": "Campaign is already being processed"
}