> ## 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 Get All Leads For Campaign: Inputs, Cost & CLI

> This endpoint retrieves all leads associated with 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=emailbison_get_all_leads_for_campaign:{"campaign_id":"{{campaign_id}}"}' --json
```

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

## Input Schema

| Name                                    | Type      | Required | Default | Description                                                                                                                              |
| --------------------------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.campaign_id`                   | `integer` | Yes      |         | The ID of the campaign.                                                                                                                  |
| `payload.search`                        | `string`  | No       |         | Search term for filtering replies.                                                                                                       |
| `payload.filters`                       | `object`  | No       |         |                                                                                                                                          |
| `payload.filters.lead_campaign_status`  | `string`  | No       |         | Filter by lead campaign status. One of `in_sequence`, `sequence_finished`, `sequence_stopped`, `never_contacted`, `replied`.             |
| `payload.filters.emails_sent`           | `array`   | No       |         | Filter by the number of emails sent.                                                                                                     |
| `payload.filters.emails_sent.criteria`  | `string`  | No       |         | Comparison operator for emails sent. One of `=`, `&gt;=`, `&gt;`, `&lt;=`, `&lt;`.                                                       |
| `payload.filters.emails_sent.value`     | `integer` | No       |         | Value for the number of emails sent.                                                                                                     |
| `payload.filters.opens`                 | `object`  | No       |         |                                                                                                                                          |
| `payload.filters.opens.criteria`        | `string`  | No       |         | Comparison operator for email opens. One of `=`, `&gt;=`, `&gt;`, `&lt;=`, `&lt;`.                                                       |
| `payload.filters.opens.value`           | `integer` | No       |         | Value for the number of email opens.                                                                                                     |
| `payload.filters.replies`               | `object`  | No       |         |                                                                                                                                          |
| `payload.filters.replies.criteria`      | `string`  | No       |         | Comparison operator for replies. One of `=`, `&gt;=`, `&gt;`, `&lt;=`, `&lt;`.                                                           |
| `payload.filters.replies.value`         | `integer` | No       |         | Value for the number of replies.                                                                                                         |
| `payload.filters.verification_statuses` | `array`   | No       |         | A verification status. Accepted values: `verifying`, `verified`, `risky`, `unknown`, `unverified`, `inactive`, `bounced`, `unsubscribed` |
| `payload.filters.tag_ids`               | `array`   | No       |         | Filter by tag IDs.                                                                                                                       |
| `payload.filters.excluded_tag_ids`      | `array`   | No       |         | Exclude leads by tag IDs.                                                                                                                |
| `payload.filters.without_tags`          | `boolean` | No       |         | Only show leads that have no tags attached.                                                                                              |
| `payload.filters.created_at.criteria`   | `string`  | No       |         | Comparison operator for the created\_at date. One of `=`, `&gt;=`, `&gt;`, `&lt;=`, `&lt;`.                                              |
| `payload.filters.created_at.value`      | `string`  | No       |         | Value for the created\_at date. Must be a valid date in YYYY-MM-DD format.                                                               |
| `payload.filters.updated_at.criteria`   | `string`  | No       |         | Comparison operator for the updated\_at date. One of `=`, `&gt;=`, `&gt;`, `&lt;=`, `&lt;`.                                              |
| `payload.filters.updated_at.value`      | `string`  | No       |         | Value for the updated\_at date. Must be a valid date in YYYY-MM-DD format.                                                               |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "This endpoint retrieves all leads associated with a campaign.",
    "properties": {
      "campaign_id": {
        "type": "integer",
        "description": "The ID of the campaign."
      },
      "search": {
        "type": [
          "string",
          "null"
        ],
        "description": "Search term for filtering replies."
      },
      "filters": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "filters.lead_campaign_status": {
        "type": "string",
        "description": "Filter by lead campaign status. One of `in_sequence`, `sequence_finished`, `sequence_stopped`, `never_contacted`, `replied`."
      },
      "filters.emails_sent": {
        "type": "array",
        "description": "Filter by the number of emails sent.",
        "items": {
          "type": "string"
        }
      },
      "filters.emails_sent.criteria": {
        "type": "string",
        "description": "Comparison operator for emails sent. One of `=`, `>=`, `>`, `<=`, `<`."
      },
      "filters.emails_sent.value": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Value for the number of emails sent."
      },
      "filters.opens": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "filters.opens.criteria": {
        "type": "string",
        "description": "Comparison operator for email opens. One of `=`, `>=`, `>`, `<=`, `<`."
      },
      "filters.opens.value": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Value for the number of email opens."
      },
      "filters.replies": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "filters.replies.criteria": {
        "type": "string",
        "description": "Comparison operator for replies. One of `=`, `>=`, `>`, `<=`, `<`."
      },
      "filters.replies.value": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Value for the number of replies."
      },
      "filters.verification_statuses": {
        "type": "array",
        "description": "A verification status. Accepted values: `verifying`, `verified`, `risky`, `unknown`, `unverified`, `inactive`, `bounced`, `unsubscribed`",
        "items": {
          "type": "string"
        }
      },
      "filters.tag_ids": {
        "type": "array",
        "description": "Filter by tag IDs.",
        "items": {
          "type": "integer"
        }
      },
      "filters.excluded_tag_ids": {
        "type": "array",
        "description": "Exclude leads by tag IDs.",
        "items": {
          "type": "integer"
        }
      },
      "filters.without_tags": {
        "type": "boolean",
        "description": "Only show leads that have no tags attached."
      },
      "filters.created_at.criteria": {
        "type": "string",
        "description": "Comparison operator for the created_at date. One of `=`, `>=`, `>`, `<=`, `<`."
      },
      "filters.created_at.value": {
        "type": "string",
        "description": "Value for the created_at date. Must be a valid date in YYYY-MM-DD format."
      },
      "filters.updated_at.criteria": {
        "type": "string",
        "description": "Comparison operator for the updated_at date. One of `=`, `>=`, `>`, `<=`, `<`."
      },
      "filters.updated_at.value": {
        "type": "string",
        "description": "Value for the updated_at date. Must be a valid date in YYYY-MM-DD format."
      }
    },
    "required": [
      "campaign_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | 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": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "first_name": {
                  "type": "string"
                },
                "last_name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "company": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "custom_variables": {
                  "type": "array"
                },
                "lead_campaign_data": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "emails_sent": {
                      "type": "integer"
                    },
                    "replies": {
                      "type": "integer"
                    },
                    "opens": {
                      "type": "integer"
                    },
                    "interested": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "overall_stats": {
                  "type": "object",
                  "properties": {
                    "emails_sent": {
                      "type": "integer"
                    },
                    "opens": {
                      "type": "integer"
                    },
                    "replies": {
                      "type": "integer"
                    },
                    "unique_replies": {
                      "type": "integer"
                    },
                    "unique_opens": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": false
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "first": {
                "type": "string"
              },
              "last": {
                "type": "string"
              },
              "prev": {
                "type": "string"
              },
              "next": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "meta": {
            "type": "object",
            "properties": {
              "current_page": {
                "type": "integer"
              },
              "from": {
                "type": "integer"
              },
              "last_page": {
                "type": "integer"
              },
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "active": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "path": {
                "type": "string"
              },
              "per_page": {
                "type": "integer"
              },
              "to": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "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_get_all_leads_for_campaign --payload '{
  "campaign_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`.
