Skip to main content

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โ€‹

ParameterTypeDescription
idintegerThe campaign ID

Request Bodyโ€‹

All fields are optional โ€” include only the fields you want to change.

FieldTypeDescription
namestringCampaign name (max 255 chars)
descriptionstring|nullInternal description (max 500 chars)
email_subjectstring|nullEmail subject line (max 255 chars, supports merge tags)
email_bodystring|nullEmail body HTML (supports merge tags)
audience_typestringall_customers, selected_customers, or filter. Sending audience_filter without it switches the campaign to filter
audience_filterobject|nullFilter criteria โ€” see Audience Filter
template_keystring|nullplain, announcement, promo_blast, season_opener, or win_back
cta_textstring|nullButton label (max 255 chars)
cta_urlstring|nullButton 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โ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
401invalid_api_keyInvalid API key
403insufficient_scopeAPI key lacks campaigns:write scope
404resource_not_foundCampaign not found
422validation_errorInvalid request data
422invalid_stateCampaign has already been sent