Update Campaign
Update an existing campaign. Only draft and scheduled campaigns can be edited.
Endpointโ
PATCH /v1/campaigns/{id}
Authenticationโ
Requires an API key with the campaigns:write scope.
Path Parametersโ
| Parameter | Type | Description |
|---|---|---|
id | integer | The campaign ID |
Request Bodyโ
All fields are optional โ include only the fields you want to change.
| Field | Type | Description |
|---|---|---|
name | string | Campaign name (max 255 chars) |
description | string|null | Internal description (max 500 chars) |
email_subject | string|null | Email subject line (max 255 chars, supports merge tags) |
email_body | string|null | Email body HTML (supports merge tags) |
audience_type | string | all_customers, selected_customers, or filter. Sending audience_filter without it switches the campaign to filter |
audience_filter | object|null | Filter criteria โ see Audience Filter |
template_key | string|null | plain, announcement, promo_blast, season_opener, or win_back |
cta_text | string|null | Button label (max 255 chars) |
cta_url | string|null | Button link (valid URL, max 2048 chars) |
Example Requestโ
curl -X PATCH "https://app.equipdash.com/api/v1/campaigns/42" \
-H "Authorization: Bearer eqd_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Kayak Promo - Extended",
"email_subject": "Last days of summer, {customer_name}!"
}'
Response (200 OK)โ
Returns the updated campaign.
{
"data": {
"id": 42,
"name": "Summer Kayak Promo - Extended",
"description": "Promote summer kayak rentals",
"kind": "one_off",
"channel": "email",
"status": "draft",
"audience_type": "filter",
"audience_filter": {
"v": 2,
"preset": "recent"
},
"email_subject": "Last days of summer, {customer_name}!",
"email_body": "<p>Hi {customer_name}, book your kayak now.</p>",
"template_key": "promo_blast",
"cta_text": "Book now",
"cta_url": "https://example.com/book",
"scheduled_at": null,
"sent_at": null,
"total_recipients": 0,
"total_sent": 0,
"promo_codes": [],
"created_at": "2026-07-01T09:00:00+00:00",
"updated_at": "2026-07-20T09:30:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-07-20T09:30:00+00:00"
}
}
Errorsโ
| Status | Code | Description |
|---|---|---|
| 401 | authentication_required | No API key provided |
| 401 | invalid_api_key | Invalid API key |
| 403 | insufficient_scope | API key lacks campaigns:write scope |
| 404 | resource_not_found | Campaign not found |
| 422 | validation_error | Invalid request data |
| 422 | invalid_state | Campaign has already been sent |