Skip to main content
GET
Read an email that arrived on a case: the sender, the recipients, the subject, the body and the attachments. Use it after a webhook. The email.received change only carries the id of the email:
The change in the webhook
Call this endpoint with the id of the case and that email.id.
text is the body as plain text. The HTML version and the original email file are not available through the API.
Each attachment comes with a uri. Call it with Accept: application/octet-stream to download the file. See Get Attachment.
The email must belong to the case in the path. An email of another case answers 404, like an email that does not exist.

Authorizations

Authorization
string
header
required

API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}

Path Parameters

id
string<uuid>
required

Case UUID

email_id
string<uuid>
required

Email UUID, as sent in the email.received change of a case webhook

Response

Successful response

id
string<uuid>

Email UUID

created_at
string<date-time>

When Penbox received the email

case
object

The case the email belongs to

from
string | null

The sender, as written in the email header

Example:

"Julie Martin <julie.martin@example.com>"

to
string | null

The recipients, as written in the email header

Example:

"Claims team <claims@firm.example>"

subject
string | null

The subject

Example:

"Water damage in the kitchen"

text
string | null

The body of the email, as plain text

Example:

"Hello,\n\nPlease find the photos attached.\n\nJulie"

attachments
object[]

The files attached to the email. Images embedded in the body, such as signature logos, are left out.