Create a mailing draft
On this page
POST
/v1/mailingscreate_mailing_draft| Risk | write |
| Authentication | API key or OAuth access token |
| Scopes | mailings:write |
| Idempotency | supported: send an Idempotency-Key header to make retries safe |
| Dry run | yes: add dry_run=true to the query |
| Success status | 201 |
| Response type | application/json |
What it does#
- Use when: You write a new mailing: send exactly one of the simple form (starter, skin, facts, sections of type heading, paragraph, image, button, book or divider) or a full design.
- Do not use when: you change an existing draft (call update_mailing_draft) or want to send (call request_send).
- Side effects: Creates a draft mailing; nothing is sent.
- Reversible: Yes, call delete_mailing_draft.
- Required scope: mailings:write.
- Idempotency: supported (Idempotency-Key header).
- Typical next step: fix the problems in render, then call preview_send.
Scopes#
mailings:write: Create, edit and delete draft mailings, and ask for a send to be approved.
Side effects#
- Creates a draft mailing; nothing is sent
Request#
Path parameters#
None.
Query parameters#
None.
Every mutation also accepts dry_run=true: it runs every check and returns {"dry_run": true, "would": {...}} without writing anything.
Body (application/json)#
| Field | Type | Required | Description |
|---|---|---|---|
subject | string, max 200 characters | yes | |
from_name | string, max 100 characters, default "" | no | The sender name readers see. When empty, the workspace sender_name is used (get_workspace shows it). |
sending_domain_id | string | no | |
from_local | string | no | The part before the @ when sending from your own domain |
audience | object | no | |
audience.list_ids | array of string, max 50 items or null | no | null or omitted means all subscribers |
audience.tag | string, max 200 characters | no | |
simple | object | no | |
simple.starter_id | string, max 41 characters, default "blank" | no | |
simple.skin_id | string, max 40 characters, default "neutral" | no | |
simple.preheader | string, max 150 characters | no | |
simple.facts | object | no | |
simple.facts.author_name | string, max 70 characters | no | The name in the masthead and the signature. The workspace sender_name (get_workspace) is usually the right value. Without it the starter shows an example name and the mailing cannot be sent. |
simple.facts.logo_url | string, max 2048 characters | no | |
simple.facts.portrait_url | string, max 2048 characters | no | |
simple.facts.book | object | no | |
simple.sections | array of object, max 30 items, default [] | no | Body sections in order. Each is an object whose type is one of heading, paragraph, image, button, book, divider, with these fields: heading: text (required), level (default 2), eyebrow; paragraph: text (required); image: src (required), alt (default ""), decorative, href, caption; button: label (required), href (required), width (default "auto"); book: title (required), blurb, cover_url, series, series_number, release_date, button_label (default "Get the book"), href (required), badge; divider: style (default "rule"). Leave sections out to keep the starter's own body, which still has example text until you replace it. |
simple.sections[type=heading].text | string, max 160 characters | yes | |
simple.sections[type=heading].level | one of 1, 2, 3, default 2 | no | |
simple.sections[type=heading].eyebrow | string, max 60 characters | no | |
simple.sections[type=paragraph].text | string, max 8000 characters | yes | Plain text. A blank line starts a new paragraph. Allowed inline marks: bold, _italic_, label. Merge fields look like {{first_name|there}} and are never allowed inside a link address. |
simple.sections[type=image].src | string, max 2048 characters | yes | An https address, or an address returned by upload_mailing_image |
simple.sections[type=image].alt | string, max 200 characters, default "" | no | |
simple.sections[type=image].decorative | boolean | no | |
simple.sections[type=image].href | string, max 2048 characters | no | |
simple.sections[type=image].caption | string, max 200 characters | no | |
simple.sections[type=button].label | string, max 40 characters | yes | |
simple.sections[type=button].href | string, max 2048 characters | yes | |
simple.sections[type=button].width | one of "auto", "full", default "auto" | no | |
simple.sections[type=book].title | string, max 120 characters | yes | |
simple.sections[type=book].blurb | string, max 2000 characters | no | |
simple.sections[type=book].cover_url | string, max 2048 characters | no | |
simple.sections[type=book].series | string, max 120 characters | no | |
simple.sections[type=book].series_number | string, max 20 characters | no | |
simple.sections[type=book].release_date | string, max 40 characters | no | |
simple.sections[type=book].button_label | string, max 40 characters, default "Get the book" | no | |
simple.sections[type=book].href | string, max 2048 characters | yes | |
simple.sections[type=book].badge | string, max 30 characters | no | |
simple.sections[type=divider].style | one of "rule", "ornament", "dots", "space", default "rule" | no | |
design | object | no | A full EmailDesignV1 document. Send exactly one of simple or design. |
Response#
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
status | one of "draft", "scheduled", "requires_approval", "sending", "sent", "paused", "failed" | yes | |
subject | string | yes | |
from_name | string | yes | |
from_email | string | yes | |
uses_platform_sender | boolean | yes | |
revision | integer, min -9007199254740991, max 9007199254740991 | yes | |
audience | object | yes | |
audience.description | string or null | yes | |
audience.list_ids | array of string or null | yes | |
audience.tag | string or null | yes | |
scheduled_at | string (date-time) or null | yes | |
sent_at | string (date-time) or null | yes | |
created_at | string (date-time) | yes | |
updated_at | string (date-time) | yes | |
total_recipients | integer, min -9007199254740991, max 9007199254740991 | yes | Readers the send was planned for. It is 0 on a draft because the audience is only counted when the send is planned. Call preview_send for the recipient count of a draft. |
hold_reasons | array of object | yes | |
hold_reasons[].code | string | yes | |
hold_reasons[].message | string | yes | |
dashboard_url | string | yes | Where the author opens the mailing. Use the value from the response: the host belongs to the environment you are calling. |
editable | boolean | yes | |
html | string | no | Only with fields=html |
render | object | yes | The render of the stored content: byte size against the 90 KiB cap, and every problem with a fix. |
render.html | string | yes | |
render.text | string | yes | |
render.bytes | integer, min -9007199254740991, max 9007199254740991 | yes | |
render.max_bytes | integer, min -9007199254740991, max 9007199254740991 | yes | |
render.sendable | boolean | yes | False while any error-severity problem remains |
render.problems | array of object | yes | |
render.problems[].severity | one of "error", "warning" | yes | |
render.problems[].code | string | yes | |
render.problems[].message | string | yes | |
render.problems[].block_id | string | no | |
render.problems[].field | string | no | The request field to change, for example simple.facts.author_name, when the problem comes from something you sent |
render.problems[].fix | string | yes | One imperative sentence: what to change |
Examples#
simple#
Request:
curl -X POST 'https://api.seemly.com/v1/mailings' \
-H "Authorization: Bearer $SEEMLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "New chapter is up",
"from_name": "Hollow Oak Books",
"simple": {
"starter_id": "blank",
"skin_id": "neutral",
"sections": [
{
"type": "paragraph",
"text": "Hello {{first_name|there}}, chapter two is up."
}
]
}
}'const response = await fetch("https://api.seemly.com/v1/mailings", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SEEMLY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"subject": "New chapter is up",
"from_name": "Hollow Oak Books",
"simple": {
"starter_id": "blank",
"skin_id": "neutral",
"sections": [
{
"type": "paragraph",
"text": "Hello {{first_name|there}}, chapter two is up."
}
]
}
}),
});
const result = await response.json();
console.log(response.status, result);import os
import requests
response = requests.post(
"https://api.seemly.com/v1/mailings",
headers={
"Authorization": f"Bearer {os.environ['SEEMLY_API_KEY']}",
},
json={
"subject": "New chapter is up",
"from_name": "Hollow Oak Books",
"simple": {
"starter_id": "blank",
"skin_id": "neutral",
"sections": [
{
"type": "paragraph",
"text": "Hello {{first_name|there}}, chapter two is up.",
},
],
},
},
)
print(response.status_code, response.json())Response: 201:
{
"id": "cmp_2c4e6g8j0m2p4r6t8w0y2a4c",
"status": "draft",
"subject": "New chapter is up",
"from_name": "Hollow Oak Books",
"from_email": "[email protected]",
"uses_platform_sender": true,
"revision": 1,
"audience": {
"description": null,
"list_ids": null,
"tag": null
},
"scheduled_at": null,
"sent_at": null,
"created_at": "2026-12-02T09:30:00Z",
"updated_at": "2026-12-02T09:30:00Z",
"total_recipients": 0,
"hold_reasons": [],
"dashboard_url": "https://app.seemly.com/dashboard/campaigns/cmp_2c4e6g8j0m2p4r6t8w0y2a4c",
"editable": true,
"render": {
"html": "<!doctype html><html><body><p>Hello</p></body></html>",
"text": "Hello",
"bytes": 52,
"max_bytes": 92160,
"sendable": true,
"problems": []
}
}Errors#
Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.