> ## 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 Lead Operations: Inputs, Cost & CLI Example

> Updating fields for an existing Instantly lead by id. 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_patch_lead:{"lead_id":"{{lead_id}}"}' --json
```

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

## Input Schema

| Name                         | Type      | Required | Default | Description                                                          |
| ---------------------------- | --------- | -------- | ------- | -------------------------------------------------------------------- |
| `payload.lead_id`            | `string`  | Yes      |         | Instantly lead id.                                                   |
| `payload.personalization`    | `string`  | No       |         |                                                                      |
| `payload.website`            | `string`  | No       |         |                                                                      |
| `payload.last_name`          | `string`  | No       |         |                                                                      |
| `payload.first_name`         | `string`  | No       |         |                                                                      |
| `payload.company_name`       | `string`  | No       |         |                                                                      |
| `payload.phone`              | `string`  | No       |         |                                                                      |
| `payload.lt_interest_status` | `integer` | No       |         | Lead interest status. Allowed values: 1, 2, 3, 4, 0, -1, -2, -3, -4. |
| `payload.pl_value_lead`      | `string`  | No       |         |                                                                      |
| `payload.assigned_to`        | `string`  | No       |         |                                                                      |
| `payload.custom_variables`   | `record`  | No       |         |                                                                      |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Patch an Instantly lead by id.",
    "properties": {
      "lead_id": {
        "type": "string",
        "description": "Instantly lead id.",
        "minLength": 1
      },
      "personalization": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "website": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "last_name": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "first_name": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "company_name": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "phone": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "lt_interest_status": {
        "type": "integer",
        "description": "Lead interest status. Allowed values: 1, 2, 3, 4, 0, -1, -2, -3, -4."
      },
      "pl_value_lead": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "assigned_to": {
        "type": [
          "string",
          "null"
        ],
        "minLength": 1
      },
      "custom_variables": {
        "type": "object",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "required": [
      "lead_id"
    ],
    "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 patch lead response."
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute instantly_patch_lead --payload '{
  "lead_id": "string"
}' --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}
  > Requires one of the following scopes: `leads:update`, `leads:all`, `all:update`, `all:all`

  ## 141. Remove a lead from a subsequence

  Source: https://developer.instantly.ai/api-reference/lead/remove-a-lead-from-a-subsequence.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`.
