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

# Instantly Email Operations: Inputs, Cost & CLI Example

> Listing Instantly emails with mailbox and campaign filters. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## 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=instantly_list_emails:{}' --json
```

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

## Input Schema

| Name                            | Type                                               | Required | Default | Description                                                                 |
| ------------------------------- | -------------------------------------------------- | -------- | ------- | --------------------------------------------------------------------------- |
| `payload.limit`                 | `integer`                                          | No       |         |                                                                             |
| `payload.starting_after`        | `string`                                           | No       |         |                                                                             |
| `payload.search`                | `string`                                           | No       |         |                                                                             |
| `payload.campaign_id`           | `string`                                           | No       |         |                                                                             |
| `payload.list_id`               | `string`                                           | No       |         |                                                                             |
| `payload.i_status`              | `integer`                                          | No       |         | Lead interest status filter. Allowed values: 1, 2, 3, 4, 0, -1, -2, -3, -4. |
| `payload.eaccount`              | `string`                                           | No       |         |                                                                             |
| `payload.is_unread`             | `boolean`                                          | No       |         |                                                                             |
| `payload.has_reminder`          | `boolean`                                          | No       |         |                                                                             |
| `payload.mode`                  | `"emode_focused" \| "emode_others" \| "emode_all"` | No       |         |                                                                             |
| `payload.preview_only`          | `boolean`                                          | No       |         |                                                                             |
| `payload.sort_order`            | `"asc" \| "desc"`                                  | No       |         |                                                                             |
| `payload.scheduled_only`        | `boolean`                                          | No       |         |                                                                             |
| `payload.assigned_to`           | `string`                                           | No       |         |                                                                             |
| `payload.lead`                  | `string`                                           | No       |         |                                                                             |
| `payload.company_domain`        | `string`                                           | No       |         |                                                                             |
| `payload.marked_as_done`        | `boolean`                                          | No       |         |                                                                             |
| `payload.email_type`            | `"received" \| "sent" \| "manual"`                 | No       |         |                                                                             |
| `payload.min_timestamp_created` | `string`                                           | No       |         |                                                                             |
| `payload.max_timestamp_created` | `string`                                           | No       |         |                                                                             |

### Allowed values

| Field                | Allowed values                               |
| -------------------- | -------------------------------------------- |
| `payload.mode`       | `emode_focused`, `emode_others`, `emode_all` |
| `payload.sort_order` | `asc`, `desc`                                |
| `payload.email_type` | `received`, `sent`, `manual`                 |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "List Instantly emails with optional query filters.",
    "properties": {
      "limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "starting_after": {
        "type": "string",
        "minLength": 1
      },
      "search": {
        "type": "string",
        "minLength": 1
      },
      "campaign_id": {
        "type": "string",
        "minLength": 1
      },
      "list_id": {
        "type": "string",
        "minLength": 1
      },
      "i_status": {
        "type": "integer",
        "description": "Lead interest status filter. Allowed values: 1, 2, 3, 4, 0, -1, -2, -3, -4."
      },
      "eaccount": {
        "type": "string",
        "minLength": 1,
        "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
      },
      "is_unread": {
        "type": "boolean"
      },
      "has_reminder": {
        "type": "boolean"
      },
      "mode": {
        "type": "string",
        "enum": [
          "emode_focused",
          "emode_others",
          "emode_all"
        ]
      },
      "preview_only": {
        "type": "boolean"
      },
      "sort_order": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "scheduled_only": {
        "type": "boolean"
      },
      "assigned_to": {
        "type": "string",
        "minLength": 1
      },
      "lead": {
        "type": "string",
        "minLength": 1
      },
      "company_domain": {
        "type": "string",
        "minLength": 1
      },
      "marked_as_done": {
        "type": "boolean"
      },
      "email_type": {
        "type": "string",
        "enum": [
          "received",
          "sent",
          "manual"
        ]
      },
      "min_timestamp_created": {
        "type": "string",
        "minLength": 1
      },
      "max_timestamp_created": {
        "type": "string",
        "minLength": 1
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

Output schema is not available yet.

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "description": "Raw Instantly list emails response."
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute instantly_list_emails --payload '{}' --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.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ```md theme={null}
  > **Rate Limit:** This endpoint has a rate limit of 20 requests per minute, unlike other API endpoints.

  Requires one of the following scopes: `emails:read`, `emails:all`, `all:read`, `all:all`

  ## 81. Mark all emails in a thread as read

  Source: https://developer.instantly.ai/api-reference/email/mark-all-emails-in-a-thread-as-read.md
  ```
</details>

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