Campaigns

Create a draft

Permission required: campaigns:write. Nothing goes out: sending is a second action, deliberately kept separate.

Content is written either in blocks (content) or in plain text (text): a blank line separates two paragraphs, # at the start of a line makes a heading.

post/api/v1/campaigns

Request

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

Request body

namestring required

Required. Internal name, never seen by recipients.

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

Draft created.

idstring
object'campaign'
namestring
status'draft'

Changes

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