Campaigns

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.

patch/api/v1/campaigns/{id}

Request

  • Base URL: https://api.sendly.now
  • URL: https://api.sendly.now/api/v1/campaigns/{id}
  • Auth: one of:
    • HTTP bearer
    • API key in cookie better-auth.session_token
    • OAuth 2 (authorization code, authorization URL https://app.sendly.now/api/auth/oauth2/authorize, token URL https://app.sendly.now/api/auth/oauth2/token, scopes: campaigns:write)

Path parameters

idstring uuid required

Resource id.

Request body

audience_type'ALL' | 'FILTERED' | 'SEGMENT' | 'LIST'
bodystring
descriptionstring
email_category'TRANSACTIONAL' | 'MARKETING' | 'SELF_MANAGED_UNSUBSCRIBE'
fromstring email

Sender address. Its domain must be verified for this project.

from_namestring nullable
list_idstring uuid

Required when audience_type is LIST. Only that list's CONFIRMED members receive the campaign.

namestring
reply_tostring email nullable
segment_idstring uuid
subjectstring
topic_idstring uuid nullable

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.

Response

The updated campaign

audience_type'ALL' | 'FILTERED' | 'SEGMENT' | 'LIST' required
created_atstring date-time required
idstring uuid required
list_idstring uuid nullable required
namestring required
scheduled_atstring date-time nullable required
sent_atstring date-time nullable required
status'DRAFT' | 'SCHEDULED' | 'SENDING' | 'PAUSED' | 'SENT' | 'CANCELLED' required
subjectstring required
topic_idstring uuid nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.