Skip to content

Return a scheduled mailing to draft

On this page
POST/v1/mailings/{mailing_id}/cancelcancel_scheduled_mailing
Riskwrite
AuthenticationAPI key or OAuth access token
Scopesmailings:write
Idempotencynatural: repeating the call gives the same result
Dry runyes: add dry_run=true to the query
Success status200
Response typeapplication/json

What it does#

  • Use when: A mailing is scheduled for later and you need to change or stop it, more than 2 minutes before it sends.
  • Do not use when: the mailing is already sending or sent (it cannot be recalled) or it is only a draft.
  • Side effects: Removes the planned send; the mailing becomes an editable draft again.
  • Reversible: Yes, call preview_send then request_send.
  • Required scope: mailings:write.
  • Idempotency: safe to repeat (same result).
  • Typical next step: call update_mailing_draft, then preview_send.

Scopes#

  • mailings:write: Create, edit and delete draft mailings, and ask for a send to be approved.

Side effects#

  • Removes the planned send; the mailing becomes an editable draft again

Request#

Path parameters#

FieldTypeDescription
mailing_idstring

Query parameters#

None.

Every mutation also accepts dry_run=true: it runs every check and returns {"dry_run": true, "would": {...}} without writing anything.

Response#

The response has one of 2 shapes.

Result#

FieldTypeRequiredDescription
idstringyes
statusone of "draft", "scheduled"yes
revisioninteger, min -9007199254740991, max 9007199254740991yes

When dry_run=true#

FieldTypeRequiredDescription
dry_runexactly trueyes
wouldobjectyesWhat the real call would do.

Examples#

back to draft#

Request:

curl -X POST 'https://api.seemly.com/v1/mailings/cmp_4d8x2p0q7r4d8x2p0q7r4d8x/cancel' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"

Response: 200:

JSON
{
  "id": "cmp_4d8x2p0q7r4d8x2p0q7r4d8x",
  "status": "draft",
  "revision": 4
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.