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. Campaigns that are Queued, Sending, Sent, Paused, Failed, or Cancelled cannot be modified. Attempting to update a campaign in a non-editable status 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 — there is no need to cancel first.

Every other field stays editable for as long as the campaign is Scheduled, right up to the moment 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"
}