/api/public/v1/emailsList emails
Messages in the token’s own mailboxes, summarized — the fields that identify a message and a ~300-character `snippet` of its body, never the HTML or the headers. The boundary is the employee’s addresses rather than the company’s: this returns mail sent to or from an address that employee owns, and nothing else. The response names the mailboxes it searched (`searchedMailboxes`) beside every mailbox the employee owns, so an empty page says which inbox was looked in. `mailbox` narrows to one of those addresses — the support inbox, say — and is ignored for any address the employee does not own. `threadId` groups a back-and-forth, and the first message in a thread carries its own id there. `search` matches the subject, the addresses and the body.
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.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | Optional | Maximum number of items to return (1-100).Default: 20 |
offset | number | Optional | Number of items to skip before starting to collect the result set.Default: 0 |
sortBy | string | Optional | Field to sort by. Allowed values vary by endpoint.Default: createdAt |
sortOrder | string asc desc | Optional | Sort direction.Default: desc |
search | string | Optional | Free-text search across the resource’s primary fields. |
createdAfter | string | Optional | ISO 8601 timestamp — only return items created after this time. |
createdBefore | string | Optional | ISO 8601 timestamp — only return items created before this time. |
updatedAfter | string | Optional | ISO 8601 timestamp — only return items updated after this time. |
mailbox | string | Optional | Only mail in this address of yours. Repeatable. |
direction | string INBOUND OUTBOUND | Optional | Received or sent. |
to | string | Optional | Exact recipient address. |
from | string | Optional | Exact sender address. |
folder | string | Optional | `inbox` for mail in its natural place; `archive`, `junk` or `trash` for the system folders; or a custom folder id. |
threadId | string | Optional | One conversation, in full. |
unread | boolean | Optional | |
starred | boolean | Optional | Set `true` for flagged mail. |
includeText | boolean | Optional | Add each message’s full plain-text body to the summary. |
curl -X GET "https://www.pxb.app/api/public/v1/emails" \
-H "Authorization: Bearer your_access_token"{
"message": "Emails retrieved successfully!",
"content": {
"emails": [
{
"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"
}
],
"mailboxes": [
"sam@acme.example",
"support@acme.example"
],
"searchedMailboxes": [
"sam@acme.example",
"support@acme.example"
],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.