Base URL
https://app.dmu.email/api/v1
Authentication
Bearer dmk_… API key
Rate limit
120 requests a minute per key

Delete a draft

DELETE/drafts/{id}

Discards a draft or, if it has been sent and is still waiting to go, cancels the send.

Needs the permissiondrafts:delete

A send waits 30 seconds before it goes, and a scheduled one waits until its time. Until then this pulls it back and says cancelled: true. Once it has started to go you get 409 already_sent: a cancel that said yes while the mail went anyway would be worse than one that says no.

Deleting a draft that’s already gone succeeds, so a retry after a lost response doesn’t look like a failure.

Path parameters

idstringrequired
The draft.

Returns

idstring
The draft.
deletedboolean
Always true.
cancelledboolean
True when a send was pulled back. Left out when the draft was already gone.

Errors

401invalid_key
The key is wrong, expired or revoked. With no Authorization header at all, the code is missing_credentials.
403missing_scope
The key doesn’t have drafts:delete. The X-Required-Scope header names what’s missing.
409already_sent
It has started to go and can’t be taken back.
409draft_locked
Somebody has the draft open in DMU Mail right now.
429rate_limited
More than 120 requests a minute from this key. Wait for Retry-After seconds.
curl https://app.dmu.email/api/v1/drafts/8c1e2f4a \
  -X DELETE \
  -H "Authorization: Bearer dmk_7f3a9c2e1b4d_Xq8v…"

Response

200 OK

{
  "data": {
    "id": "8c1e2f4a",
    "deleted": true,
    "cancelled": true
  }
}

Every response wraps its result in data. A page of threads adds nextCursor, which is null on the last page.