> ## 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 Create Draft

> Create a draft. Resend Inboxes Create Draft reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Create a draft.

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

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

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

### CLI

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

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "example",
    "id": "123e4567-e89b-42d3-a456-426614174000"
  }
}
```

Use `deepline describe resend_inboxes_create_draft --json` for the latest machine-readable contract.

## Input reference

At least one of `to`, `cc`, `bcc`, `subject`, `text`, `html` or `attachments` must be non-empty. The combined recipients of `to`, `cc` and `bcc` cannot exceed 50. `thread_id` and `reply_to_email_id` must be sent together or not at all.

| 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.to` | `string \| array \| null` | No | — | The recipients. For multiple addresses, send an array of strings. Each value can include a friendly name, for example `Ada Lovelace `. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422. |
| `payload.cc` | `string \| array \| null` | No | — | The CC recipients. For multiple addresses, send an array of strings. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422. |
| `payload.bcc` | `string \| array \| null` | No | — | The BCC recipients. For multiple addresses, send an array of strings. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422. |
| `payload.subject` | `string` | No | — | The subject. Max 2000 characters. A string that is only whitespace, or that contains a line break, is rejected. Minimum length: 1. Maximum length: 2000. |
| `payload.html` | `string` | No | — | The HTML body. |
| `payload.text` | `string` | No | — | The plain text body. |
| `payload.attachments` | `array` | No | — | Files to store on the draft. Each one needs a `filename` and either `content` or a `path` URL. A `path` file is downloaded when the request is made and stored on the draft. When both are sent, `path` is ignored. A `content_id` returns a 422. The files on a draft, downloaded ones included, can total at most 25 MB. A `path` that does not start with `http` or `https`, or that cannot be downloaded, returns a 422, and so does a request whose downloads take more than 20 seconds together. An empty file See the live schema for the complete constraint. |
| `payload.thread_id` | `string` | No | — | The Thread ID to reply in. Must be sent with `reply_to_email_id`. Format: `uuid`. |
| `payload.reply_to_email_id` | `string` | No | — | The Email ID to reply to, as returned in `data[].id` by the list thread emails endpoint. Must be sent with `thread_id`. Format: `uuid`. |
| `payload.idempotency_key` | `string` | No | — | Stable send identity for retries. Resend deduplicates for 24 hours. Plays derive a step key when omitted. Minimum length: 1. Maximum length: 256. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "At least one of `to`, `cc`, `bcc`, `subject`, `text`, `html` or `attachments` must be non-empty. The combined recipients of `to`, `cc` and `bcc` cannot exceed 50. `thread_id` and `reply_to_email_id` must be sent together or not at all.",
    "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."
      },
      "to": {
        "description": "The recipients. For multiple addresses, send an array of strings. Each value can include a friendly name, for example `Ada Lovelace `. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422.",
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "cc": {
        "description": "The CC recipients. For multiple addresses, send an array of strings. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422.",
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "bcc": {
        "description": "The BCC recipients. For multiple addresses, send an array of strings. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422.",
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string"
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "subject": {
        "type": [
          "string",
          "null"
        ],
        "description": "The subject. Max 2000 characters. A string that is only whitespace, or that contains a line break, is rejected.",
        "minLength": 1,
        "maxLength": 2000
      },
      "html": {
        "type": [
          "string",
          "null"
        ],
        "description": "The HTML body."
      },
      "text": {
        "type": [
          "string",
          "null"
        ],
        "description": "The plain text body."
      },
      "attachments": {
        "type": [
          "array",
          "null"
        ],
        "description": "Files to store on the draft. Each one needs a `filename` and either `content` or a `path` URL. A `path` file is downloaded when the request is made and stored on the draft. When both are sent, `path` is ignored. A `content_id` returns a 422. The files on a draft, downloaded ones included, can total at most 25 MB. A `path` that does not start with `http` or `https`, or that cannot be downloaded, returns a 422, and so does a request whose downloads take more than 20 seconds together. An empty file or a blocked file type returns a 422.",
        "items": {
          "type": "object",
          "description": "A file to store on a draft. Send either `content` or a `path` URL. Unlike `POST /emails` attachments, a `path` file is downloaded when the request is made, not when the draft is sent, and a draft attachment cannot use `content_id`. When both `content` and `path` are sent, `path` is ignored.",
          "properties": {
            "content": {
              "type": "string",
              "description": "The content of the file, encoded in base64. It cannot be empty. Required without `path`."
            },
            "path": {
              "type": "string",
              "description": "A URL to download the file from, starting with `http` or `https`. Required without `content`. A file that cannot be downloaded returns a 422, and so does a request whose downloads take more than 20 seconds together."
            },
            "filename": {
              "type": "string",
              "description": "The filename of the attachment. A blocked file type returns a 422.",
              "minLength": 1
            },
            "content_type": {
              "type": "string",
              "description": "The MIME type of the attachment. It must be a valid MIME type, such as `application/pdf`, or the request returns a 422. Required with `content`. With `path`, it defaults to the content type of the downloaded file.",
              "minLength": 1
            }
          },
          "required": [
            "filename"
          ],
          "additionalProperties": false
        }
      },
      "thread_id": {
        "type": "string",
        "description": "The Thread ID to reply in. Must be sent with `reply_to_email_id`.",
        "format": "uuid"
      },
      "reply_to_email_id": {
        "type": "string",
        "description": "The Email ID to reply to, as returned in `data[].id` by the list thread emails endpoint. Must be sent with `thread_id`.",
        "format": "uuid"
      },
      "idempotency_key": {
        "type": "string",
        "description": "Stable send identity for retries. Resend deduplicates for 24 hours; Plays derive a step key when omitted.",
        "minLength": 1,
        "maxLength": 256
      }
    },
    "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.id` | `string` | Yes | — | The ID of the draft. Format: `uuid`. |
| `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."
          },
          "id": {
            "type": "string",
            "description": "The ID of the draft.",
            "format": "uuid"
          }
        },
        "required": [
          "object",
          "id"
        ],
        "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.