> ## Documentation Index
> Fetch the complete documentation index at: https://docs.penbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Case Email

> Read an email received on a case

Read an email that arrived on a case: the sender, the recipients, the subject, the body and
the attachments.

Use it after a [webhook](https://docs.penbox.io/api-reference/webhooks.md). The `email.received` change only carries
the id of the email:

```json The change in the webhook theme={null}
{ "type": "email.received", "email": { "id": "7c2e9f41-0a3b-4d8e-9b1f-5e6a2c3d4f50" } }
```

Call this endpoint with the id of the case and that `email.id`.

> [!NOTE]
>
> `text` is the body as plain text. The HTML version and the original email file are not
> available through the API.

> [!NOTE]
>
> Each attachment comes with a `uri`. Call it with `Accept: application/octet-stream` to
> download the file. See [Get Attachment](https://docs.penbox.io/api-reference/attachments/get-attachment.md).

The email must belong to the case in the path. An email of another case answers 404, like
an email that does not exist.

```bash cURL theme={null}
curl --request GET \
  --url https://connect.penbox.io/v1/cases/{id}/emails/{email_id} \
  --header 'Authorization: Bearer <token>'
```

```json 200 theme={null}
{
  "id": "7c2e9f41-0a3b-4d8e-9b1f-5e6a2c3d4f50",
  "created_at": "2026-11-12T10:04:48.000Z",
  "case": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" },
  "from": "Julie Martin <julie.martin@example.com>",
  "to": "Claims team <claims@firm.example>",
  "subject": "Water damage in the kitchen",
  "text": "Hello,\n\nPlease find the photos attached.\n\nJulie",
  "attachments": [
    {
      "id": "0d6f1c2a-7f0e-4c4b-9a55-6f2a1b8e9c10",
      "name": "kitchen.jpg",
      "type": "image/jpeg",
      "size": 482113,
      "uri": "https://connect.penbox.io/v1/attachments/0d6f1c2a-7f0e-4c4b-9a55-6f2a1b8e9c10"
    }
  ]
}
```


## OpenAPI

````yaml GET /cases/{id}/emails/{email_id}
openapi: 3.0.0
info:
  title: Penbox API
  version: '1.0'
  description: >-
    The Penbox API provides programmatic access to Penbox's form management,
    case management, and document processing capabilities. Authenticate using
    Bearer tokens created at https://app.penbox.io/workspace/settings/api
servers:
  - url: https://connect.penbox.io/v1
    description: Production
security:
  - BearerAuth: []
paths:
  /cases/{id}/emails/{email_id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Case UUID
        schema:
          type: string
          format: uuid
      - name: email_id
        in: path
        required: true
        description: Email UUID, as sent in the `email.received` change of a case webhook
        schema:
          type: string
          format: uuid
    get:
      summary: Get Case Email
      description: >-
        Read an email received on a case: sender, recipients, subject,
        plain-text body and attachments. Use it after an `email.received`
        webhook, with the `email.id` of the change. An email of another case
        answers 404.
      operationId: get-case-email
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseEmail'
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Email not found on this case
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CaseEmail:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Email UUID
        created_at:
          type: string
          format: date-time
          description: When Penbox received the email
        case:
          type: object
          description: The case the email belongs to
          properties:
            id:
              type: string
              format: uuid
        from:
          type: string
          nullable: true
          description: The sender, as written in the email header
          example: Julie Martin <julie.martin@example.com>
        to:
          type: string
          nullable: true
          description: The recipients, as written in the email header
          example: Claims team <claims@firm.example>
        subject:
          type: string
          nullable: true
          description: The subject
          example: Water damage in the kitchen
        text:
          type: string
          nullable: true
          description: The body of the email, as plain text
          example: |-
            Hello,

            Please find the photos attached.

            Julie
        attachments:
          type: array
          description: >-
            The files attached to the email. Images embedded in the body, such
            as signature logos, are left out.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Attachment UUID
              name:
                type: string
                description: File name
                example: kitchen.jpg
              type:
                type: string
                description: MIME type
                example: image/jpeg
              size:
                type: integer
                nullable: true
                description: Size in bytes
                example: 482113
              uri:
                type: string
                format: uri
                description: >-
                  Download the file with `GET /attachments/{id}` and `Accept:
                  application/octet-stream`
                example: >-
                  https://connect.penbox.io/v1/attachments/0d6f1c2a-7f0e-4c4b-9a55-6f2a1b8e9c10
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        API token (starts with pnbx_). Create at
        https://app.penbox.io/workspace/settings/api. Include as: Authorization:
        Bearer {token}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.