> ## 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 Drafts

> Retrieve a list of drafts. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Retrieve a list of drafts.

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

## 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_drafts',
  {
    "inbox_id": "inbox_123"
  },
);

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

### CLI

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

## Example response

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

## Input reference

Returns the unsent drafts on the inbox, most recently updated first. The `after` and `before` cursors take a Draft ID from the current page, and only one of them can be passed. A cursor that is not a UUID, or both cursors together, return a 422. A cursor that is not an unsent draft on this inbox returns a 404.

| 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.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 unsent drafts on the inbox, most recently updated first. The `after` and `before` cursors take a Draft ID from the current page, and only one of them can be passed. A cursor that is not a UUID, or both cursors together, return a 422. A cursor that is not an unsent draft on this inbox returns a 404.",
    "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."
      },
      "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 unsent drafts on this page, most recently updated first. |
| `result.data.data[].id` | `string` | Yes | — | The ID of the draft. Format: `uuid`. |
| `result.data.data[].type` | `"standalone" \| "reply"` | Yes | — | `reply` when the draft replies to an email in an existing thread. `standalone` when the draft starts a new thread. Allowed: `standalone`, `reply`. |
| `result.data.data[].to` | `array \| null` | Yes | — | The recipients. `null` or empty when no recipients are set. |
| `result.data.data[].cc` | `array` | Yes | — | The CC recipients. |
| `result.data.data[].bcc` | `array` | Yes | — | The BCC recipients. |
| `result.data.data[].subject` | `string \| null` | Yes | — | The subject. |
| `result.data.data[].snippet` | `string \| null` | Yes | — | A short preview of the body. |
| `result.data.data[].thread_id` | `string \| null` | Yes | — | The Thread ID when the draft is a reply. `null` otherwise. Format: `uuid`. |
| `result.data.data[].reply_to_email_id` | `string \| null` | Yes | — | The Email ID the draft replies to. `null` otherwise. Format: `uuid`. |
| `result.data.data[].updated_at` | `string` | Yes | — | Timestamp when the draft was last saved. Format: `date-time`. |
| `result.data.data[].attachments` | `array` | Yes | — | The files stored on the draft. |
| `result.data.data[].attachments[].id` | `string` | Yes | — | The ID of the attachment. Format: `uuid`. |
| `result.data.data[].attachments[].filename` | `string` | Yes | — | The filename of the attachment. |
| `result.data.data[].attachments[].content_type` | `string` | Yes | — | The MIME type of the attachment. |
| `result.data.data[].attachments[].size` | `integer` | Yes | — | The size of the attachment in bytes. |
| `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 unsent drafts on this page, most recently updated first.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The ID of the draft.",
                  "format": "uuid"
                },
                "type": {
                  "type": "string",
                  "description": "`reply` when the draft replies to an email in an existing thread. `standalone` when the draft starts a new thread.",
                  "enum": [
                    "standalone",
                    "reply"
                  ]
                },
                "to": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "description": "The recipients. `null` or empty when no recipients are set.",
                  "items": {
                    "type": "string"
                  }
                },
                "cc": {
                  "type": "array",
                  "description": "The CC recipients.",
                  "items": {
                    "type": "string"
                  }
                },
                "bcc": {
                  "type": "array",
                  "description": "The BCC recipients.",
                  "items": {
                    "type": "string"
                  }
                },
                "subject": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The subject."
                },
                "snippet": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A short preview of the body."
                },
                "thread_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The Thread ID when the draft is a reply. `null` otherwise.",
                  "format": "uuid"
                },
                "reply_to_email_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The Email ID the draft replies to. `null` otherwise.",
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "description": "Timestamp when the draft was last saved.",
                  "format": "date-time"
                },
                "attachments": {
                  "type": "array",
                  "description": "The files stored on the draft.",
                  "items": {
                    "type": "object",
                    "description": "A file stored on a draft.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The ID of the attachment.",
                        "format": "uuid"
                      },
                      "filename": {
                        "type": "string",
                        "description": "The filename of the attachment."
                      },
                      "content_type": {
                        "type": "string",
                        "description": "The MIME type of the attachment."
                      },
                      "size": {
                        "type": "integer",
                        "description": "The size of the attachment in bytes."
                      }
                    },
                    "required": [
                      "id",
                      "filename",
                      "content_type",
                      "size"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "type",
                "to",
                "cc",
                "bcc",
                "subject",
                "snippet",
                "thread_id",
                "reply_to_email_id",
                "updated_at",
                "attachments"
              ],
              "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.