Login / Register
GET
/api/public/v1/emails/{emailId}

Get an email

One message with its body in words: `text` is the plain-text part, or the HTML rendered down to text when that is all the message arrived with. Readable only if one of its two addresses belongs to the token’s employee.

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:read

Path Parameters

NameTypeRequiredDescription
emailIdstringRequiredEmail ID.

Query Parameters

NameTypeRequiredDescription
includeHtmlbooleanOptionalAlso return the HTML body as it arrived. Off by default — the text is the message.
includeHeadersbooleanOptionalAlso return the raw headers the provider passed along.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/emails/{emailId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Email retrieved successfully!",
  "content": {
    "email": {
      "id": "eml_3390",
      "threadId": "eml_3390",
      "from": "sam@acme.example",
      "to": "ap@northwind.example",
      "cc": null,
      "subject": "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."
    }
  }
}
403Example response
json
{
  "message": "That email is not in one of your mailboxes."
}

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 a message from the list.