GET
/api/public/v1/emails

List emails

Messages in the token’s own mailboxes. 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. Somebody with no address gets an empty list rather than an error. `threadId` groups a back-and-forth, and the first message in a thread carries its own id there.

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

Query Parameters

NameTypeRequiredDescription
limitnumberOptionalMaximum number of items to return (1-100).Default: 20
offsetnumberOptionalNumber of items to skip before starting to collect the result set.Default: 0
sortBystringOptionalField to sort by. Allowed values vary by endpoint.Default: createdAt
sortOrderstring
asc
desc
OptionalSort direction.Default: desc
searchstringOptionalFree-text search across the resource’s primary fields.
createdAfterstringOptionalISO 8601 timestamp — only return items created after this time.
createdBeforestringOptionalISO 8601 timestamp — only return items created before this time.
updatedAfterstringOptionalISO 8601 timestamp — only return items updated after this time.
directionstring
INBOUND
OUTBOUND
OptionalReceived or sent.
folderstringOptional`inbox` for mail in its natural place; `archive`, `junk` or `trash` for the system folders; or a custom folder id.
threadIdstringOptionalOne conversation, in full.
unreadbooleanOptional
starredbooleanOptionalSet `true` for flagged mail.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/emails" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Emails retrieved successfully!",
  "content": {
    "emails": [
      {
        "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"
      }
    ],
    "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.