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

# Emailbison Compose New Email: Inputs, Cost & CLI Example

> This endpoint allows you to send a one-off email in a new email thread The user must provide a valid authentication token in the request header to access this

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=emailbison_compose_new_email:{"sender_email_id":"{{sender_email_id}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                        | Type      | Required | Default | Description                                                                                                     |
| --------------------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `payload.subject`           | `string`  | No       |         | The subject of the email                                                                                        |
| `payload.message`           | `string`  | No       |         | The contents of the reply                                                                                       |
| `payload.sender_email_id`   | `integer` | Yes      |         | The id of an existing record in the sender\_emails table.                                                       |
| `payload.use_dedicated_ips` | `boolean` | No       |         | Send using the dedicated campaign IPs instead of the instance IP                                                |
| `payload.content_type`      | `string`  | No       |         | Type of the email (html or text)                                                                                |
| `payload.to_emails`         | `array`   | No       |         | Array of people to send this email to.                                                                          |
| `payload.cc_emails`         | `array`   | No       |         |                                                                                                                 |
| `payload.bcc_emails`        | `array`   | No       |         |                                                                                                                 |
| `payload.attachments`       | `array`   | No       |         | optional Array of multi-part files that you want to attach. Combined max size: 25MB, individual max size: 10MB. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "This endpoint allows you to send a one-off email in a new email thread The user must provide a valid authentication token in the request header to access this endpoint. Please note that if you are sending an array of file attachments, your request must include a header of \"Content-Type\": \"multipart/form-data\". Otherwise your file attachments will not be processed.",
    "properties": {
      "subject": {
        "type": [
          "string",
          "null"
        ],
        "description": "The subject of the email"
      },
      "message": {
        "type": "string",
        "description": "The contents of the reply"
      },
      "sender_email_id": {
        "type": "integer",
        "description": "The id of an existing record in the sender_emails table."
      },
      "use_dedicated_ips": {
        "type": "boolean",
        "description": "Send using the dedicated campaign IPs instead of the instance IP"
      },
      "content_type": {
        "type": "string",
        "description": "Type of the email (html or text)"
      },
      "to_emails": {
        "type": "array",
        "description": "Array of people to send this email to.",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ],
              "description": "Name of the person (can be null)"
            },
            "email_address": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "cc_emails": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email_address": {
              "type": "string",
              "description": "Must be a valid email address."
            }
          },
          "required": [
            "email_address"
          ],
          "additionalProperties": false
        }
      },
      "bcc_emails": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email_address": {
              "type": "string",
              "description": "Must be a valid email address."
            }
          },
          "required": [
            "email_address"
          ],
          "additionalProperties": false
        }
      },
      "attachments": {
        "type": "array",
        "description": "optional Array of multi-part files that you want to attach. Combined max size: 25MB, individual max size: 10MB.",
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "sender_email_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `string` | Yes      |         | Provider response payload.                     |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "string",
        "description": "Provider response payload."
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute emailbison_compose_new_email --payload '{
  "sender_email_id": "integer"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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