Skip to content

Delete a mailing draft

On this page
DELETE/v1/mailings/{mailing_id}delete_mailing_draft
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 draft is no longer wanted; send If-Match with the ETag you last read.
  • Do not use when: the mailing is scheduled, sending or sent (cancel_scheduled_mailing for a scheduled one).
  • Side effects: Deletes the draft and its content.
  • Reversible: No.
  • Required scope: mailings:write.
  • Idempotency: safe to repeat (same result).
  • Typical next step: call list_mailings.

Scopes#

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

Side effects#

  • Deletes the draft and its content

Concurrency#

Send the revision you last read in an If-Match header. A stale revision returns revision_mismatch (HTTP 412) with the current revision.

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#

FieldTypeRequiredDescription
deletedexactly trueyes
idstringyes

Examples#

deleted#

Request:

curl -X DELETE 'https://api.seemly.com/v1/mailings/cmp_2c4e6g8j0m2p4r6t8w0y2a4c' \
  -H "Authorization: Bearer $SEEMLY_API_KEY" \
  -H 'If-Match: "1"'

Response: 200:

JSON
{
  "deleted": true,
  "id": "cmp_2c4e6g8j0m2p4r6t8w0y2a4c"
}

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.