Create a newsletter draft
Create a draft newsletter. Drafts must be tested and pass preflight before scheduling.
Request
- Base URL: https://shipmail.to/api/v1
- URL: https://shipmail.to/api/v1/newsletters
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://shipmail.to/api/auth/oauth2/authorize, token URL https://shipmail.to/api/auth/oauth2/token)
Headers
OAuth access tokens only. The organization ID this request acts on. Required when the OAuth connection was approved for several organizations (400 validation_error without it); optional with one. An organization the connection was not approved for returns 403 authorization_error. Ignored for API keys, which belong to one organization.
Request body
Full HTML body. Stored as one custom_html block when blocks are not provided.
Plain-text body. Becomes paragraph blocks when blocks are not provided. With blocks or body_html, sets the plain-text override.
Optional http(s) Atom entry destination. Overrides the public web archive link.
styled applies Shipmail's email theme. plain sends your HTML without injected styles, width, or centering, so the reader's email client styles it.
Track opens and clicks for this newsletter. Defaults to false. Returns 422 validation_error when open and click tracking is not available. Can only change while the newsletter is an editable draft or a future scheduled newsletter.
Add UTM tags to the links of this newsletter. Defaults to false. Adds utm_source=shipmail, utm_medium (email or feed) and utm_campaign (a slug of the subject) to the newsletter's http and https links. Links that already carry a utm_ parameter, links with a merge tag in the host, and Shipmail's own unsubscribe and archive links are left alone. The web archive is never tagged. Can only change while the newsletter is an editable draft or a future scheduled newsletter.
The body as Markdown, instead of blocks or body_html. Shipmail converts headings, paragraphs, lists, quotes, code, images, links, dividers and tables to blocks and stores blocks only. A callout starts with a line :::callout (optionally followed by info, warning or success, then a title) and ends with a line :::. Raw HTML stays visible text. Send only one of blocks, body_html or content_markdown.
A second subject to test against subject. Each goes to a slice of subject_test_percent of the subscribers; after subject_test_hours the one with more human clicks goes to the rest. Opens do not decide, because Apple Mail Privacy Protection opens every message. Requires track_engagement. Null removes the test.
Response
Newsletter draft created.
Rendered email HTML, derived from blocks for drafts. Read-only.
Plain-text body, derived from blocks unless a manual override was set. Read-only.
Optional http(s) Atom entry destination. Feed readers link the newsletter title here instead of to its Shipmail web archive, including when the archive is private.
styled applies Shipmail's email theme. plain sends your HTML without injected styles, width, or centering, so the reader's email client styles it.
Whether this newsletter tracks opens and clicks.
Whether this newsletter adds UTM tags to its links. Adds utm_source=shipmail, utm_medium (email or feed) and utm_campaign (a slug of the subject) to the newsletter's http and https links. Links that already carry a utm_ parameter, links with a merge tag in the host, and Shipmail's own unsubscribe and archive links are left alone. The web archive is never tagged.
Unique recipients with at least one counted open. Opens that Apple Mail Privacy Protection preloads are not counted. Null when track_engagement is false.
Unique recipients who clicked at least one tracked link, excluding clicks attributed to link scanners. Null when track_engagement is false.
The limit the newsletter was scheduled with: only this many of the most engaged subscribers went first. Null sends to everyone.
Subscribers held past send_limit. Send them the newsletter with POST /newsletters/{id}/send-more.
A second subject tested against subject. Requires track_engagement.
The share of subscribers each subject goes to first, from 1 to 25. Null when there is no subject test.
Hours after both test slices finish before the subject with more human clicks goes to the rest, from 1 to 72.
a is subject, b is subject_b. Null until the test decides. A tie keeps a.
Stable first-publication timestamp.
Canonical Shipmail public archive URL.
Changes
No recorded changes to this operation across all 1 revision of this API.