DELETE
/api/public/v1/email-drafts/{draftId}

Delete an email draft

Discard a draft. Nothing was sent, so nothing is lost but the words.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.

email:messages:write

Path Parameters

NameTypeRequiredDescription
draftIdstringRequiredDraft ID.
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/email-drafts/{draftId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Email draft deleted successfully!",
  "content": {
    "draftId": "edr_88c1"
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Email → Drafts
/email/drafts
  1. Open a draft.
  2. Discard.