Campaigns

Create a new campaign

Changed on

Creates a campaign as a draft. To send it, use the send endpoint or provide scheduled_at. Subject lines cannot start with "RE:" or "FWD:". At least one list is required if scheduled_at is provided.

post/campaigns

Request

  • Base URL
    https://api.sendfox.com
  • Auth
    OAuth 2
    Authorization codehttps://sendfox.com/oauth/authorize
    Token URLhttps://sendfox.com/oauth/token

Request body

titlestring required
subjectstring required
preview_textstring nullable

Inbox preview snippet shown beneath the subject line. Optional.

htmlstring required

Email body HTML content. Unless the campaign uses the Code Your Own layout, tags outside the editor's set are removed on save, along with event-handler attributes (such as onclick) and javascript: links. Paragraphs, images and lists have no margin in the email. If the body has no blank paragraph (<p><br></p>) at all, one is added between adjacent paragraphs, images, lists and headings, as the editor writes them. A body that has one is kept as sent, as is content in tables, blockquotes, lists and flex or grid divs, and any block with its own margin or padding. On update, an email whose current body is stored with adjacent blocks and no blank paragraph keeps the spacing sent.

from_namestring

Required unless the account has saved a default sender in Account Settings. Omitted, it uses that default's name, else the last name sent from, else the account name.

from_emailstring email

Required unless the account has saved a default From email in Account Settings, which is used when this is omitted.

reply_to_emailstring email nullable

Where replies go. Empty uses the account's default reply-to, then from_email.

scheduled_atstring date-time

Schedule send time (omit for draft). Must include at least one list.

listsinteger[]

Array of list IDs to send to

excluded_listsinteger[]

List IDs whose contacts should be excluded from the send. Exclusion wins over inclusion.

to_contact_tagsinteger[]

Tag IDs whose contacts should receive the campaign. Can be combined with lists.

excluded_contact_tagsinteger[]

Tag IDs whose contacts should be excluded from the send. Exclusion wins over inclusion.

web_publishboolean

Publish the email to the web on your primary Smart Page once it sends. Requires a Smart Page. Omit it to list the email on every Smart Page whose Newsletters tab is on; send false to keep it off the web.

web_gateboolean

On a published email, ask new readers for their email address to read past the opening. The account-wide signup requirement in Settings overrides this choice when enabled, including when false is sent or this field is omitted.

Response

Campaign created successfully

idinteger
titlestring required
subjectstring required
preview_textstring nullable

Inbox preview snippet shown beneath the subject line in most email clients.

htmlstring required
from_namestring required
from_emailstring email required
reply_to_emailstring email nullable

Where replies go. Empty uses the account's default reply-to, then from_email.

scheduled_atstring date-time nullable
sent_atstring date-time nullable
timezonestring
is_web_gatedboolean

The saved per-issue signup requirement. Applies only to published web issues. If the account-wide signup requirement is enabled in Settings, the public page requires signup even when this field is false.

created_atstring date-time
updated_atstring date-time

Changes

    • info

      added the new optional request property

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status