Update a campaign
Partial update: an omitted field is left untouched. Only DRAFT and SCHEDULED campaigns are editable — editing one that is already sending would change what half its recipients receive, so it answers 400.
Changing from re-verifies the sender domain. Changing the audience on a DRAFT campaign schedules a recipient recount, so stats.total_recipients converges shortly after the response.
A new audience_condition is checked as it is on create: an unsupported field or operator answers 400, and a list is targeted with audience_type: "LIST" and list_id, never a filter.
Requires the campaigns:write scope — Create, edit, and organize your campaigns.
AuthorizationBearer <API Key>API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
id*stringResource id.
uuidapplication/json- body
Body for PATCH /api/v1/campaigns/{id}. All fields optional.
name?string1 <= length <= 200description?stringlength <= 500subject?string1 <= lengthbody?string1 <= lengthfrom?stringSender address. Its domain must be verified for this project.
emailfrom_name?|length <= 100reply_to?|emailemail_category?string"TRANSACTIONAL""MARKETING""SELF_MANAGED_UNSUBSCRIBE"audience_type?string"ALL""FILTERED""SEGMENT""LIST"audience_condition?A filter condition: one or more groups combined with logic.
segment_id?stringuuidlist_id?stringRequired when audience_type is LIST. Only that list's CONFIRMED members receive the campaign.
uuidtopic_id?|The subject this campaign is about. A contact who unsubscribed from the topic is excluded WHATEVER the audience type — a topic opt-out is a standing answer, not an audience filter, so it cannot be routed around by selecting a different audience. Ignored for TRANSACTIONAL campaigns, which a marketing preference does not cancel.
uuidThe updated campaign
application/json- response
A campaign as exposed on the v1 API.
id*stringuuidname*stringstatus*string"DRAFT""SCHEDULED""SENDING""PAUSED""SENT""CANCELLED"subject*stringaudience_type*string"ALL""FILTERED""SEGMENT""LIST"list_id*|uuidtopic_id*|uuidscheduled_at*|date-timesent_at*|date-timecreated_at*stringdate-timestats*curl -X PATCH 'https://api.sendly.now/api/v1/campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "DRAFT", "subject": "string", "audience_type": "ALL", "list_id": "430bbdbc-9d7f-4d06-a273-67ca4ba4ae4b", "topic_id": "646807af-5da6-43aa-83d3-8ac1d15ab4e5", "scheduled_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "stats": { "total_recipients": 0, "sent": 0, "delivered": 0, "opened": 0, "clicked": 0, "bounced": 0 }}