---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Get a single inbox email

Look up one inbox email by its ID, including its content, metadata, and attachments.

## Before You Begin

🔗 **Use the [GraphQL Playground](https://app.pipefy.com/graphiql)** to execute the queries in this guide.

➡️ **New to GraphQL?** Learn how to navigate the Playground with our **[Playground Basics Guide](https://developers.pipefy.com/reference/exploring-the-playground)**.

## Prerequisites

1. **Authentication**: Use a [Service Account token](https://developers.pipefy.com/reference/service-accounts) (Personal Access Tokens are deprecated).
2. **Permissions**: Your token must be able to read the emails of the card the inbox email belongs to. Without that access the query returns a `Permission denied` error.
3. **Inbox email ID**: Identify the inbox email you want to fetch. If you only have the card, use [List emails from a card](https://developers.pipefy.com/reference/list-emails-from-a-card) to discover the inbox email IDs first.

## Step 1: Find the inbox email ID

The `inboxEmail` query takes a single argument, `inboxEmailId`. If you don't have it yet, list a card's emails and read the `id` of the one you need:

```graphql
{
  card(id: 10805973) {
    id
    inbox_emails {
      id
      subject
    }
  }
}
```

## Step 2: Fetch the inbox email

With the inbox email ID in hand, execute the query:

```graphql
query {
  inboxEmail(inboxEmailId: "547923445") {
    id
    from
    fromName
    to
    main_to
    cc
    bcc
    subject
    state
    origin
    sent_via_automation
    message_id
    clean_text
    clean_html
    card { id }
    pipe { id }
    attachments {
      filename
      public_url
      originalFilename
      downloadUrl
    }
  }
}
```

**Input explanation**

| Argument       | Type  | Required | Description                         |
| -------------- | ----- | -------- | ----------------------------------- |
| `inboxEmailId` | `ID!` | Yes      | The ID of the inbox email to fetch. |

**Sample response**

```json
{
  "data": {
    "inboxEmail": {
      "id": "547923445",
      "from": "laura.johnson@pipefy.com",
      "fromName": "Laura Johnson",
      "to": ["steve@pipefy.com"],
      "main_to": "steve@pipefy.com",
      "cc": [],
      "bcc": [],
      "subject": "Missing Document for Your Vacation Request",
      "state": "processed",
      "origin": "manual",
      "sent_via_automation": false,
      "message_id": "<abc123@mail.pipefy.com>",
      "clean_text": "Dear Steve, ...",
      "clean_html": "<div>Dear Steve, ...</div>",
      "card": { "id": "10805973" },
      "pipe": { "id": "301234567" },
      "attachments": [
        {
          "filename": "project-handover-form.pdf",
          "public_url": "https://app.pipefy.com/storage/v1/signed/uploads/8c1f.../project-handover-form.pdf?expires_on=1760000000&signature=...",
          "originalFilename": "project-handover-form.pdf",
          "downloadUrl": "https://app.pipefy.com/storage/v1/resources/email_attachment/0f7a.../uploads/8c1f.../project-handover-form.pdf?signature=..."
        }
      ]
    }
  }
}
```

You can request any field available on the `InboxEmail` type — the selection above is just a useful subset.

## Key Notes

* **Single record**: `inboxEmail` returns one inbox email (or `null` when the ID does not exist). To list every email on a card, use [List emails from a card](https://developers.pipefy.com/reference/list-emails-from-a-card) instead.
* **Authorization**: access is checked against the card the email belongs to. A token without read access to that card's emails receives a `Permission denied` error rather than the record.
* **Attachment URLs**: `public_url` is a signed link that expires after a few minutes and needs no session. `downloadUrl` is a signed private link that does not expire but only downloads from a Pipefy web session (browser login) authorized to read the card's emails; an API token cannot open it. It is `null` when the attachment has no stored file.
* **Field casing**: some fields on the `InboxEmail` type are snake\_case (`main_to`, `clean_text`, `clean_html`, `sent_via_automation`, `message_id`) while others are camelCase (`fromName`, `originalFilename`). Use each field exactly as shown above.