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

# Resend: Inboxes List Threads

> Retrieve a list of inbox threads. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Retrieve a list of inbox threads.

> [!NOTE]
>
> Tool ID: `resend_inboxes_list_threads`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'resend_inboxes_list_threads',
  {
    "inbox_id": "inbox_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run resend_inboxes_list_threads --input '{
  "inbox_id": "inbox_123"
}'
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe resend_inboxes_list_threads --json` for the complete live contract.

## Input reference

Returns the threads in an inbox, most recently active first. A thread is a conversation made up of one or more emails. The `after` and `before` cursors take a thread ID, and only one of them can be passed. A cursor that is not a UUID, such as a date, returns a 422 validation\_error. A cursor thread that is not in the selected folders returns a 404. To find threads by text, sender, recipient, attachment, or date, use the search threads endpoint.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.inbox_id` | `string` | Yes | — | The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404. |
| `payload.folders` | `array` | No | — | Comma-separated folders to list, for example `inbox,sent`. Repeating the parameter returns a 422 validation\_error. A thread is returned when any of its emails is in one of the folders, so a thread in `inbox` with an email you sent matches both `inbox` and `sent`. Defaults to `inbox`, or to `inbox,archive,sent` when `labels` is set. `spam` and `trash` are only included when you name them. |
| `payload.labels` | `array` | No | — | Comma-separated label IDs. Returns threads with any of these labels. Up to 50 IDs. An ID that does not exist in the inbox returns a 404. Repeating the parameter returns a 422 validation\_error. Maximum items: 50. |
| `payload.read` | `boolean` | No | — | `true` returns threads where every email is read. `false` returns threads with at least one unread email. Only the literal values `true` and `false` are accepted. |
| `payload.limit` | `integer` | No | — | Number of items to return. Minimum: 1. Maximum: 100. |
| `payload.after` | `string` | No | — | Return items after this cursor. |
| `payload.before` | `string` | No | — | Return items before this cursor. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns the threads in an inbox, most recently active first. A thread is a conversation made up of one or more emails. The `after` and `before` cursors take a thread ID, and only one of them can be passed. A cursor that is not a UUID, such as a date, returns a 422 validation_error. A cursor thread that is not in the selected folders returns a 404. To find threads by text, sender, recipient, attachment, or date, use the search threads endpoint.",
    "properties": {
      "inbox_id": {
        "type": "string",
        "description": "The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404."
      },
      "folders": {
        "type": "array",
        "description": "Comma-separated folders to list, for example `inbox,sent`. Repeating the parameter returns a 422 validation_error. A thread is returned when any of its emails is in one of the folders, so a thread in `inbox` with an email you sent matches both `inbox` and `sent`. Defaults to `inbox`, or to `inbox,archive,sent` when `labels` is set. `spam` and `trash` are only included when you name them.",
        "items": {
          "type": "string",
          "enum": [
            "inbox",
            "archive",
            "spam",
            "sent",
            "trash"
          ]
        }
      },
      "labels": {
        "type": "array",
        "description": "Comma-separated label IDs. Returns threads with any of these labels. Up to 50 IDs. An ID that does not exist in the inbox returns a 404. Repeating the parameter returns a 422 validation_error.",
        "maxItems": 50,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      },
      "read": {
        "type": "boolean",
        "description": "`true` returns threads where every email is read. `false` returns threads with at least one unread email. Only the literal values `true` and `false` are accepted."
      },
      "limit": {
        "type": "integer",
        "description": "Number of items to return.",
        "minimum": 1,
        "maximum": 100
      },
      "after": {
        "type": "string",
        "description": "Return items after this cursor."
      },
      "before": {
        "type": "string",
        "description": "Return items before this cursor."
      }
    },
    "required": [
      "inbox_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `string` | Yes | — | Type of the response object. |
| `result.data.has_more` | `boolean` | Yes | — | Indicates if there are more results available. |
| `result.data.data` | `array` | Yes | — | The matching threads, most recently active first. |
| `result.data.data[].id` | `string` | Yes | — | The ID of the thread. Format: `uuid`. |
| `result.data.data[].subject` | `string \| null` | Yes | — | The subject of the thread. |
| `result.data.data[].from` | `string \| null` | Yes | — | The sender email address. Can include the display name. |
| `result.data.data[].to` | `array` | Yes | — | The recipients of the most recent email. For a received email, these are the addresses it was delivered to, not the full `To` header. |
| `result.data.data[].cc` | `array` | Yes | — | The CC recipients of the most recent email. |
| `result.data.data[].bcc` | `array` | Yes | — | The BCC recipients of the most recent email. Always empty for a received email. |
| `result.data.data[].labels` | `array` | Yes | — | The labels attached to the thread. |
| `result.data.data[].labels[].id` | `string` | Yes | — | The ID of the label. Format: `uuid`. |
| `result.data.data[].labels[].name` | `string` | Yes | — | The name of the label. |
| `result.data.data[].labels[].color` | `string` | Yes | — | The color of the label, as a `#RRGGBB` hex color in uppercase. Pattern: `^#[0-9A-Fa-f]&#123;6&#125;$`. |
| `result.data.data[].email_count` | `integer` | Yes | — | The number of emails in the thread. |
| `result.data.data[].has_attachment` | `boolean` | Yes | — | Whether the most recent email in the thread has an attachment. |
| `result.data.data[].has_draft` | `boolean` | Yes | — | Whether the thread has an unsent draft. |
| `result.data.data[].read` | `boolean` | Yes | — | True only when every email in the thread is read. |
| `result.data.data[].received_at` | `string` | Yes | — | Timestamp when the thread was last active. Format: `date-time`. |
| `result.data.data[].folder` | `"inbox" \| "archive" \| "spam" \| "sent" \| "trash"` | Yes | — | The folder the thread is in. Every thread is in exactly one folder. `inbox` holds threads with at least one received email. `archive` and `spam` hold threads moved there. `trash` holds threads scheduled for deletion in 30 days. `sent` holds threads whose emails are all outbound, and is assigned automatically. Allowed: `inbox`, `archive`, `spam`, `sent`, `trash`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Type of the response object."
          },
          "has_more": {
            "type": "boolean",
            "description": "Indicates if there are more results available."
          },
          "data": {
            "type": "array",
            "description": "The matching threads, most recently active first.",
            "items": {
              "type": "object",
              "description": "A thread as it appears in the list of an inbox's threads.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The ID of the thread.",
                  "format": "uuid"
                },
                "subject": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The subject of the thread."
                },
                "from": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The sender email address. Can include the display name."
                },
                "to": {
                  "type": "array",
                  "description": "The recipients of the most recent email. For a received email, these are the addresses it was delivered to, not the full `To` header.",
                  "items": {
                    "type": "string"
                  }
                },
                "cc": {
                  "type": "array",
                  "description": "The CC recipients of the most recent email.",
                  "items": {
                    "type": "string"
                  }
                },
                "bcc": {
                  "type": "array",
                  "description": "The BCC recipients of the most recent email. Always empty for a received email.",
                  "items": {
                    "type": "string"
                  }
                },
                "labels": {
                  "type": "array",
                  "description": "The labels attached to the thread.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The ID of the label.",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the label."
                      },
                      "color": {
                        "type": "string",
                        "description": "The color of the label, as a `#RRGGBB` hex color in uppercase.",
                        "pattern": "^#[0-9A-Fa-f]{6}$"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "color"
                    ],
                    "additionalProperties": false
                  }
                },
                "email_count": {
                  "type": "integer",
                  "description": "The number of emails in the thread."
                },
                "has_attachment": {
                  "type": "boolean",
                  "description": "Whether the most recent email in the thread has an attachment."
                },
                "has_draft": {
                  "type": "boolean",
                  "description": "Whether the thread has an unsent draft."
                },
                "read": {
                  "type": "boolean",
                  "description": "True only when every email in the thread is read."
                },
                "received_at": {
                  "type": "string",
                  "description": "Timestamp when the thread was last active.",
                  "format": "date-time"
                },
                "folder": {
                  "type": "string",
                  "description": "The folder the thread is in. Every thread is in exactly one folder. `inbox` holds threads with at least one received email. `archive` and `spam` hold threads moved there. `trash` holds threads scheduled for deletion in 30 days. `sent` holds threads whose emails are all outbound, and is assigned automatically.",
                  "enum": [
                    "inbox",
                    "archive",
                    "spam",
                    "sent",
                    "trash"
                  ]
                }
              },
              "required": [
                "id",
                "subject",
                "from",
                "to",
                "cc",
                "bcc",
                "labels",
                "email_count",
                "has_attachment",
                "has_draft",
                "read",
                "received_at",
                "folder"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "object",
          "has_more",
          "data"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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