Skip to main content

Update Campaign

Update a push campaign. Every field is optional; send only what changes.

Only campaigns in draft or scheduled status can be updated. Updating a campaign that is queued, sending, sent, paused, failed, or cancelled returns 400 bad_request.

Endpoint​

PATCH /push/campaigns/:id

Returns: 200 OK

Changing the send time

scheduled_at is not a field on this endpoint. To move a scheduled campaign to a different time, call send again with the new scheduled_at; you don't need to cancel first.

Every other field stays editable while the campaign is scheduled, until it starts fanning out.

Path Parameters​

ParameterTypeDescription
idstringCampaign ID

Headers​

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Body Parameters​

Any field accepted by Create Campaign, all optional.

{
"title": "Last chance — 2 hours left",
"throttle_minutes": 30
}

Response​

The updated campaign, same shape as the Create Campaign response.


Examples​

curl -X PATCH "https://api.arsel.sa/v1/push/campaigns/0192a1b2-c3d4-7e5f-9000-abcdef123456" \
-H "Authorization: Bearer $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Last chance — 2 hours left"
}'

Error Responses​

{
"status_code": 400,
"name": "bad_request",
"message": "Cannot edit a campaign that is sending or sent"
}