Campaigns

Edit a draft

Permission required: campaigns:write. Changes a campaign with status draft: name, subject, preheader, kind, sender, content (content in blocks, or text). Nothing is sent. Any other status answers 409 conflict with the current status in details.status, and nothing is changed: what is scheduled, sending or sent is not rewritten.

patch/api/v1/campaigns/{id}

Request

  • Base URL: https://mailcheer.com
  • URL: https://mailcheer.com/api/v1/campaigns/{id}
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Api-Key

Path parameters

idstring required

Request body

namestring
subjectstring

The subject. It may stay empty on a draft, but the send will refuse it.

preheaderstring

Preview shown after the subject in the inbox.

kindstring

Your own classification label. Free text, no imposed value.

fromstring

The address of a sender already registered in the workspace — not any address on a verified domain, unlike an individual send. Unknown: 404, with the list of available addresses. GET /api/v1/me gives them in senders.

sender_idstring

The sender's identifier, if you know it (senders[].id from GET /api/v1/me). Takes precedence over from.

With neither from nor sender_id, Mailcheer takes the workspace's default sender; failing that, if a single sender exists, that one. If several exist with no default, the campaign is created without a sender and it is the send that will fail: designate one.

textstring

The content in plain text — the form to prefer from code or from an agent. A blank line separates two paragraphs, # at the start of a line makes a heading, ## a subheading. Ignored if content is provided.

Example request

{
  "name": "September newsletter",
  "subject": "What we changed this month",
  "preheader": "Three new things, and one we owed you.",
  "kind": "newsletter",
  "from": "hello@yourdomain.com",
  "sender_id": "snd_71a",
  "text": "# Three new things\n\nHere is what changed this month.\n\nEnjoy the read."
}

Response

The draft, as it is now.

idstring
object'campaign'
namestring
subjectstring nullable
kindstring
status'draft' | 'scheduled' | 'sending' | 'sent' | 'archived'
fromstring nullable
scheduled_atstring date-time nullable
sent_atstring date-time nullable
created_atstring date-time
schedule_errorstring nullable

Why a scheduled send did not go out.

Changes

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