POST
/api/public/v1/emails

Send an email

Sends from one of the token employee’s own addresses — sending as somebody else is refused. Attachments are not accepted here: they are uploads and this endpoint takes JSON. Everything else about the mailbox works through the API. Threading is resolved from the subject and the pair of addresses, so a reply lands in the existing conversation rather than starting a new one. If the recipient matches a customer of this company, the message is filed against that customer’s xRM conversation too, so the thread reads as one back-and-forth wherever it is opened.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

email:messages:write

Request Body

PropertyTypeDescription
fromstringMust be an address this employee owns.
tostringOne recipient.
subjectstring
textstringPlain-text body. Send this or `html`.
htmlstringHTML body.
ccarrayUp to 20 addresses.
bccarrayUp to 20 addresses.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/emails" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "sam@acme.example",
    "to": "ap@northwind.example",
    "subject": "Invoice 1042",
    "text": "Attached is the invoice for phase one."
  }'
200Example response
json
{
  "message": "Email sent successfully!",
  "content": {
    "email": {
      "id": "eml_3390",
      "from": "sam@acme.example",
      "to": "ap@northwind.example",
      "subject": "Invoice 1042",
      "text": "Attached is the invoice for phase one.",
      "html": null,
      "direction": "OUTBOUND",
      "threadId": "eml_3390",
      "unread": false,
      "starred": false,
      "folder": null,
      "accountId": "acc_7712",
      "createdAt": "2026-08-22T15:04:00.000Z",
      "updatedAt": "2026-08-22T15:04:00.000Z"
    }
  }
}
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
/email/inbox
  1. Open Email.
  2. Compose.
  3. Pick which of your addresses to send from.