GET
/api/public/v1/email-drafts

List email drafts

Mail the token’s employee has written but not sent — the same Drafts folder the console composer saves into, so a draft an assistant writes is there for the person to read, and one they started by hand can be finished from here. Only their own: drafts belong to the person, not the company.

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

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.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/email-drafts" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Email drafts retrieved successfully!",
  "content": {
    "drafts": [
      {
        "id": "edr_88c1",
        "from": "sam@acme.example",
        "to": [
          "ap@northwind.example"
        ],
        "cc": [],
        "bcc": [],
        "subject": "Re: Invoice 1042",
        "text": "Thanks — confirming Friday works on our side.",
        "scheduledAt": null,
        "createdAt": "2026-08-23T09:30:00.000Z",
        "updatedAt": "2026-08-23T09:31: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.

Email → Drafts
/email/drafts