> ## 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 Scheduled Emails For Campaign

> List the scheduled emails in an EmailBison campaign, filterable by status and date. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List the scheduled emails in an EmailBison campaign, filterable by status and date.

> [!NOTE]
>
> Tool ID: `emailbison_get_all_scheduled_emails_for_campaign`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'emailbison_get_all_scheduled_emails_for_campaign',
  {
    "campaign_id": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute emailbison_get_all_scheduled_emails_for_campaign --input '{
  "campaign_id": 123
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {
        "id": 123,
        "thread_reply": true,
        "email_subject": "jane.doe@example.com"
      }
    ],
    "links": {
      "first": "example",
      "last": "example",
      "prev": "example"
    },
    "meta": {
      "current_page": 123,
      "from": 123,
      "last_page": 123
    }
  }
}
```

Use `deepline describe emailbison_get_all_scheduled_emails_for_campaign --json` for the latest machine-readable contract.

## Input reference

This endpoint retrieves all scheduled emails associated with a campaign.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.campaign_id` | `integer` | Yes | — | The ID of the campaign. |
| `payload.status` | `"scheduled" \| "sent" \| "failed" \| "paused" \| "stopped" \| "bounced" \| "unsubscribed"` | No | — | Allowed: `scheduled`, `sent`, `failed`, `paused`, `stopped`, `bounced`, `unsubscribed`. |
| `payload.scheduled_date` | `string` | No | — | Must be a valid date. |
| `payload.scheduled_date_local` | `string` | No | — | Must be a valid date. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "This endpoint retrieves all scheduled emails associated with a campaign.",
    "properties": {
      "campaign_id": {
        "type": "integer",
        "description": "The ID of the campaign."
      },
      "status": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "scheduled",
          "sent",
          "failed",
          "paused",
          "stopped",
          "bounced",
          "unsubscribed"
        ]
      },
      "scheduled_date": {
        "type": [
          "string",
          "null"
        ],
        "description": "Must be a valid date."
      },
      "scheduled_date_local": {
        "type": [
          "string",
          "null"
        ],
        "description": "Must be a valid date."
      }
    },
    "required": [
      "campaign_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `array` | No | — | — |
| `result.data.data[].id` | `integer` | No | — | — |
| `result.data.data[].thread_reply` | `boolean` | No | — | — |
| `result.data.data[].email_subject` | `string` | No | — | — |
| `result.data.data[].email_body` | `string` | No | — | — |
| `result.data.data[].status` | `string` | No | — | — |
| `result.data.data[].scheduled_date` | `string` | No | — | — |
| `result.data.data[].scheduled_date_local` | `string` | No | — | — |
| `result.data.data[].sent_at` | `string` | No | — | — |
| `result.data.data[].opens` | `integer` | No | — | — |
| `result.data.data[].clicks` | `integer` | No | — | — |
| `result.data.data[].replies` | `integer` | No | — | — |
| `result.data.data[].interested` | `boolean` | No | — | — |
| `result.data.data[].unique_replies` | `integer` | No | — | — |
| `result.data.data[].unique_opens` | `integer` | No | — | — |
| `result.data.data[].lead` | `object` | No | — | — |
| `result.data.data[].lead.id` | `integer` | No | — | — |
| `result.data.data[].lead.first_name` | `string` | No | — | — |
| `result.data.data[].lead.last_name` | `string` | No | — | — |
| `result.data.data[].lead.email` | `string` | No | — | — |
| `result.data.data[].lead.title` | `string` | No | — | — |
| `result.data.data[].lead.company` | `string` | No | — | — |
| `result.data.data[].lead.notes` | `string` | No | — | — |
| `result.data.data[].lead.status` | `string` | No | — | — |
| `result.data.data[].lead.custom_variables` | `array` | No | — | — |
| `result.data.data[].lead.custom_variables[].name` | `string` | No | — | — |
| `result.data.data[].lead.custom_variables[].value` | `string` | No | — | — |
| `result.data.data[].lead.lead_campaign_data` | `array` | No | — | — |
| `result.data.data[].lead.overall_stats` | `object` | No | — | — |
| `result.data.data[].lead.overall_stats.emails_sent` | `integer` | No | — | — |
| `result.data.data[].lead.overall_stats.opens` | `integer` | No | — | — |
| `result.data.data[].lead.overall_stats.replies` | `integer` | No | — | — |
| `result.data.data[].lead.overall_stats.unique_replies` | `integer` | No | — | — |
| `result.data.data[].lead.overall_stats.unique_opens` | `integer` | No | — | — |
| `result.data.data[].lead.created_at` | `string` | No | — | — |
| `result.data.data[].lead.updated_at` | `string` | No | — | — |
| `result.data.data[].sender_email` | `object` | No | — | — |
| `result.data.data[].sender_email.id` | `integer` | No | — | — |
| `result.data.data[].sender_email.name` | `string` | No | — | — |
| `result.data.data[].sender_email.email` | `string` | No | — | — |
| `result.data.data[].sender_email.email_signature` | `string` | No | — | — |
| `result.data.data[].sender_email.imap_server` | `string` | No | — | — |
| `result.data.data[].sender_email.imap_port` | `integer` | No | — | — |
| `result.data.data[].sender_email.smtp_server` | `string` | No | — | — |
| `result.data.data[].sender_email.smtp_port` | `integer` | No | — | — |
| `result.data.data[].sender_email.daily_limit` | `integer` | No | — | — |
| `result.data.data[].sender_email.type` | `string` | No | — | — |
| `result.data.data[].sender_email.status` | `string` | No | — | — |
| `result.data.data[].sender_email.emails_sent_count` | `integer` | No | — | — |

The table shows the first 50 fields. Expand the raw schema below for every field.

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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"
                },
                "thread_reply": {
                  "type": "boolean"
                },
                "email_subject": {
                  "type": "string"
                },
                "email_body": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "scheduled_date": {
                  "type": "string"
                },
                "scheduled_date_local": {
                  "type": "string"
                },
                "sent_at": {
                  "type": "string"
                },
                "opens": {
                  "type": "integer"
                },
                "clicks": {
                  "type": "integer"
                },
                "replies": {
                  "type": "integer"
                },
                "interested": {
                  "type": "boolean"
                },
                "unique_replies": {
                  "type": "integer"
                },
                "unique_opens": {
                  "type": "integer"
                },
                "lead": {
                  "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",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "lead_campaign_data": {
                      "type": "array"
                    },
                    "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
                },
                "sender_email": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "email_signature": {
                      "type": "string"
                    },
                    "imap_server": {
                      "type": "string"
                    },
                    "imap_port": {
                      "type": "integer"
                    },
                    "smtp_server": {
                      "type": "string"
                    },
                    "smtp_port": {
                      "type": "integer"
                    },
                    "daily_limit": {
                      "type": "integer"
                    },
                    "type": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "emails_sent_count": {
                      "type": "integer"
                    },
                    "total_replied_count": {
                      "type": "integer"
                    },
                    "total_opened_count": {
                      "type": "integer"
                    },
                    "unsubscribed_count": {
                      "type": "integer"
                    },
                    "bounced_count": {
                      "type": "integer"
                    },
                    "unique_replied_count": {
                      "type": "integer"
                    },
                    "unique_opened_count": {
                      "type": "integer"
                    },
                    "total_leads_contacted_count": {
                      "type": "integer"
                    },
                    "interested_leads_count": {
                      "type": "integer"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "default": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "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>

## Deepline cost

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

## Related documentation

* [EmailBison provider guide](https://deepline.com/docs/providers/emailbison/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.