POST
/api/public/v1/email-drafts/{draftId}/send

Send an email draft

The one step that reaches outside the company. The draft goes out exactly as it stands, from the token employee’s own address, and is then gone — the sent copy lives in the mailbox like any other message, threaded and filed the way a direct send is. A draft still missing a sender, a recipient, a subject or a body is refused with a 400 naming what it needs rather than patched up.

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.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/email-drafts/{draftId}/send" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Email sent successfully!",
  "content": {
    "draftId": "edr_88c1",
    "email": {
      "id": "eml_3392",
      "threadId": "eml_3390",
      "from": "sam@acme.example",
      "to": "ap@northwind.example",
      "cc": null,
      "subject": "Re: Invoice 1042",
      "snippet": "Attached is the invoice for phase one. Let me know if purchasing needs anything else.",
      "direction": "OUTBOUND",
      "unread": false,
      "starred": false,
      "folder": null,
      "accountId": "acc_7712",
      "hasAttachments": true,
      "attachments": [
        {
          "id": "eat_19",
          "fileName": "invoice-1042.pdf",
          "contentType": "application/pdf",
          "fileSize": 84210
        }
      ],
      "receivedAt": "2026-08-22T15:04:00.000Z",
      "createdAt": "2026-08-22T15:04:00.000Z",
      "updatedAt": "2026-08-22T15:04:00.000Z",
      "text": "Attached is the invoice for phase one. Let me know if purchasing needs anything else."
    }
  }
}
400Example response
json
{
  "message": "This draft still needs a recipient (to), a subject before it can be sent."
}
403Example response
json
{
  "message": "You cannot send from that address."
}

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. Send.