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

# Smartlead Update Lead By Campaign: Inputs, Cost & CLI

> Updating lead details inside a campaign. 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=smartlead_update_lead_by_campaign:{"campaign_id":"{{campaign_id}}","lead_id":"{{lead_id}}","email":"{{email}}"}' --json
```

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

## Input Schema

| Name                       | Type                | Required | Default | Description                                                        |
| -------------------------- | ------------------- | -------- | ------- | ------------------------------------------------------------------ |
| `payload.campaign_id`      | `string \| integer` | Yes      |         | Smartlead campaign identifier (number or positive numeric string). |
| `payload.lead_id`          | `string \| integer` | Yes      |         |                                                                    |
| `payload.email`            | `string`            | Yes      |         | Lead email address.                                                |
| `payload.first_name`       | `string`            | No       |         |                                                                    |
| `payload.last_name`        | `string`            | No       |         |                                                                    |
| `payload.phone_number`     | `string \| number`  | No       |         |                                                                    |
| `payload.company_name`     | `string`            | No       |         |                                                                    |
| `payload.website`          | `string`            | No       |         |                                                                    |
| `payload.location`         | `string`            | No       |         |                                                                    |
| `payload.linkedin_profile` | `string`            | No       |         |                                                                    |
| `payload.company_url`      | `string`            | No       |         |                                                                    |
| `payload.custom_fields`    | `record`            | No       |         |                                                                    |
| `payload.is_unsubscribed`  | `boolean`           | No       |         |                                                                    |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Smartlead update lead in campaign input.",
    "properties": {
      "campaign_id": {
        "description": "Smartlead campaign identifier (number or positive numeric string).",
        "anyOf": [
          {
            "type": "string",
            "description": "Smartlead campaign identifier (number or positive numeric string).",
            "minLength": 1,
            "pattern": "^\\d+$"
          },
          {
            "type": "integer",
            "description": "Smartlead campaign identifier (number or positive numeric string).",
            "minimum": 1
          }
        ]
      },
      "lead_id": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "type": "integer"
          }
        ]
      },
      "email": {
        "type": "string",
        "description": "Lead email address.",
        "minLength": 1,
        "format": "email"
      },
      "first_name": {
        "type": "string"
      },
      "last_name": {
        "type": "string"
      },
      "phone_number": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          }
        ]
      },
      "company_name": {
        "type": "string"
      },
      "website": {
        "type": "string",
        "format": "uri"
      },
      "location": {
        "type": "string"
      },
      "linkedin_profile": {
        "type": "string",
        "format": "uri"
      },
      "company_url": {
        "type": "string",
        "format": "uri"
      },
      "custom_fields": {
        "type": "object",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {}
            },
            {
              "type": "object",
              "additionalProperties": {}
            }
          ]
        }
      },
      "is_unsubscribed": {
        "type": "boolean"
      }
    },
    "required": [
      "campaign_id",
      "lead_id",
      "email"
    ],
    "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 Smartlead update lead payload."
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute smartlead_update_lead_by_campaign --payload '{
  "campaign_id": "string",
  "lead_id": "string",
  "email": "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.                      |

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