> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> API reference for ActiveTrail: every `activetrail.api.*` operation with input and output types.

Every `activetrail.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

<Info>
  **New to Corsair?** See [API access](/concepts/api), [authentication](/concepts/auth), and [error handling](/concepts/error-handling).
</Info>

## Account

### contactGrowth

`account.contactGrowth`

Retrieves daily contact growth statistics showing active (subscribed) and inactive (unsubscribed) contact counts over a specified date range. Use this to analyze contact acquisition trends and measure the growth of your subscriber base over time. Returns time-series data with daily breakdowns.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.contactGrowth({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### createContentCategory

`account.createContentCategory`

Tool to create a new content category in ActiveTrail account. Use when you need to add a new category for organizing campaigns and templates.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.account.createContentCategory({});
```

**Input**

| Name            | Type      | Required | Description |
| --------------- | --------- | -------- | ----------- |
| `name`          | `string`  | Yes      | —           |
| `is_default`    | `boolean` | No       | —           |
| `display_order` | `number`  | No       | —           |
| `body`          | `any`     | No       | —           |
| `query`         | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteAccountContentCategories

`account.deleteAccountContentCategories`

Tool to delete a specific content category by ID. Use when you need to remove a category from your ActiveTrail account.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.account.deleteAccountContentCategories({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAccountBalance

`account.getAccountBalance`

Tool to retrieve email and SMS credit balance for the account. Use when you need to check available email and SMS credits. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getAccountBalance({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAccountContentCategories2

`account.getAccountContentCategories2`

Tool to retrieve specific category details by ID. Use when you need to get information about a content category from your ActiveTrail account.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getAccountContentCategories2({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAccountIntegrationdata

`account.getAccountIntegrationdata`

Retrieves the account's ActiveCommerce integration configuration data including mailing list and group associations. This endpoint returns the integration settings that connect ActiveTrail with ActiveCommerce, showing which mailing list and group are configured for the integration. Use this when you need to verify ActiveCommerce integration setup or troubleshoot integration issues. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getAccountIntegrationdata({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAccountMerge

`account.getAccountMerge`

Check if the ActiveTrail account has any pending account merge operations. This action retrieves the current account merge status, indicating whether there are any account merges awaiting completion. Account merges are typically used when consolidating multiple ActiveTrail accounts into one. Returns information about pending merges including their status, source and target accounts, and creation dates. Use this when you need to: - Verify if any account merge operations are in progress - Monitor the status of account consolidation processes - Check for pending administrative merge tasks #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getAccountMerge({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactFields

`account.getContactFields`

Tool to retrieve account contact fields filtered by type. Use when you need to get contact field definitions from the ActiveTrail account.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getContactFields({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `fields_type` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContentCategories

`account.getContentCategories`

Tool to retrieve all content categories from the ActiveTrail account. Use when you need to get the list of categories used for organizing campaigns and templates. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getContentCategories({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getExecutiveReport

`account.getExecutiveReport`

Retrieve executive performance report for the ActiveTrail account, providing email marketing metrics over the past 12 months. Returns monthly statistics including emails sent, bounce rates, open rates, click rates, click-to-open rates, complaint rates, and unsubscribe rates for both marketing campaigns and transactional emails. Use this to analyze overall account performance trends and generate summary statistics. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getExecutiveReport({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getTwoWaySmsReplies

`account.getTwoWaySmsReplies`

Tool to retrieve virtual number SMS replies with filtering options. Use when you need to fetch two-way SMS responses for campaigns with optional filtering by search term, campaign ID, or date range.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.account.getTwoWaySmsReplies({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `campaign_id` | `number` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### putAccountContentCategories

`account.putAccountContentCategories`

Tool to update a specific content category by ID. Use when you need to modify the name or display order of a category in your ActiveTrail account.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.account.putAccountContentCategories({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `id`            | `number` | Yes      | —           |
| `name`          | `string` | Yes      | —           |
| `display_order` | `number` | Yes      | —           |
| `body`          | `any`    | No       | —           |
| `query`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Automations

### deleteAutomations

`automations.deleteAutomations`

Tool to delete one or more automations from Active Trail. Use when you need to remove automations by their IDs. Supports bulk deletion by providing comma-separated IDs.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.automations.deleteAutomations({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `ids`   | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationLog

`automations.getAutomationLog`

Tool to track contacts through automation journey by retrieving detailed logs. Use when you need to see which contacts started a specific automation and their progress through each step of the workflow.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomationLog({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationReportsLogAutomationQueue

`automations.getAutomationReportsLogAutomationQueue`

Tool to retrieve contacts that did not finish a specific automation. Use when you need to get the list of contacts remaining in the automation queue for a given automation ID.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomationReportsLogAutomationQueue({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomations

`automations.getAutomations`

Tool to list account automations with filtering and pagination. Use when you need to retrieve automations from the ActiveTrail account. Supports filtering by state and pagination parameters.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomations({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `page`       | `number` | No       | —           |
| `limit`      | `number` | No       | —           |
| `state_type` | `string` | No       | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationsDetails

`automations.getAutomationsDetails`

Tool to retrieve detailed configuration of a specific automation excluding step-by-step execution details. Use when you need metadata about automation behavior, scheduling, reporting settings, and operational constraints.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomationsDetails({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationsEmailCampaignSteps

`automations.getAutomationsEmailCampaignSteps`

Tool to retrieve all email campaign steps in an automation workflow. Use when you need to get details about all 'send email' steps configured within a specific automation, including email content, scheduling, and tracking settings.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomationsEmailCampaignSteps({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationsSmsCampaignSteps

`automations.getAutomationsSmsCampaignSteps`

Tool to retrieve all SMS campaign steps in an automation workflow. Use when you need to get details about all 'send SMS' steps configured within a specific automation, including SMS content, scheduling, and tracking settings.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomationsSmsCampaignSteps({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationTriggerTypes

`automations.getAutomationTriggerTypes`

Tool to retrieve all available start trigger options for automations. Use when you need to get the list of trigger types that can initiate automation workflows in ActiveTrail. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getAutomationTriggerTypes({});
```

**Input**

| Name    | Type               | Required | Description |
| ------- | ------------------ | -------- | ----------- |
| `id`    | `string \| number` | No       | —           |
| `body`  | `any`              | No       | —           |
| `query` | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getUpdateActions

`automations.getUpdateActions`

Retrieves all available update action types that can be applied to contacts within automation workflows. Each action type includes its ID, name, description, type category, and required parameters. Use this to discover what contact update operations are available when building or modifying automation workflows (e.g., updating contact fields, changing status, adding tags, etc.). #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.automations.getUpdateActions({});
```

**Input**

| Name    | Type               | Required | Description |
| ------- | ------------------ | -------- | ----------- |
| `id`    | `string \| number` | No       | —           |
| `body`  | `any`              | No       | —           |
| `query` | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Campaign Reports

### getAllCampaignReports

`campaignReports.getAllCampaignReports`

Tool to retrieve a full overview of all campaign reports with comprehensive metrics. Use when you need to get reports for all campaigns including send date, opened emails, number of clicks, CTO, bounces, unsubscribers, complaints, unopened and sent emails. Default behavior: Returns campaigns filtered by last update date within the previous 3 months when date parameters are not specified. Default limit is 20 records per page, maximum is 100.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getAllCampaignReports({});
```

**Input**

| Name        | Type               | Required | Description |
| ----------- | ------------------ | -------- | ----------- |
| `page`      | `number`           | No       | —           |
| `limit`     | `number`           | No       | —           |
| `to_date`   | `string`           | No       | —           |
| `from_date` | `string`           | No       | —           |
| `id`        | `string \| number` | No       | —           |
| `body`      | `any`              | No       | —           |
| `query`     | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAllSentCampaigns

`campaignReports.getAllSentCampaigns`

Tool to retrieve campaigns with optional filtering by date, mailing list, and search criteria. Use when you need to get campaigns filtered by date range (default is last 3 months), limited to a specific number (default is 100), or filtered by mailing list.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getAllSentCampaigns({});
```

**Input**

| Name                  | Type               | Required | Description |
| --------------------- | ------------------ | -------- | ----------- |
| `page`                | `number`           | No       | —           |
| `limit`               | `number`           | No       | —           |
| `to_date`             | `string`           | No       | —           |
| `from_date`           | `string`           | No       | —           |
| `send_type`           | `string`           | No       | —           |
| `search_term`         | `string`           | No       | —           |
| `mailing_list_id`     | `string`           | No       | —           |
| `content_category_id` | `string`           | No       | —           |
| `groupid`             | `string \| number` | No       | —           |
| `id`                  | `string \| number` | No       | —           |
| `body`                | `any`              | No       | —           |
| `query`               | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignBounces

`campaignReports.getCampaignBounces`

Tool to retrieve bounce details by domain for a specific campaign. Use when you need to analyze campaign bounce rates and identify problematic email domains. Defaults to campaigns updated in the last 3 months.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getCampaignBounces({});
```

**Input**

| Name          | Type               | Required | Description |
| ------------- | ------------------ | -------- | ----------- |
| `id`          | `string`           | Yes      | —           |
| `page`        | `number`           | No       | —           |
| `limit`       | `number`           | No       | —           |
| `to_date`     | `string`           | No       | —           |
| `from_date`   | `string`           | No       | —           |
| `bounce_type` | `string \| number` | No       | —           |
| `body`        | `any`              | No       | —           |
| `query`       | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignReportsBounced

`campaignReports.getCampaignReportsBounced`

Tool to retrieve bounced email details filtered by bounce type for a specific campaign. Use when you need detailed information about which contacts' emails bounced and why, with the ability to filter by hard or soft bounces.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getCampaignReportsBounced({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `string` | Yes      | —           |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `bounce_type` | `any`    | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignReportsComplaints

`campaignReports.getCampaignReportsComplaints`

Tool to retrieve contacts who reported a specific campaign as spam. Use when you need to identify which contacts flagged your campaign as unwanted. The default search window is the last 3 months; if the campaign wasn't sent during the specified dates, an empty list is returned.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getCampaignReportsComplaints({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `groupid`   | `string` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignReportsSent

`campaignReports.getCampaignReportsSent`

Tool to retrieve contacts who received a specific campaign email. Use when you need to identify which recipients successfully received your campaign. The default search window is the last 3 months; if the campaign wasn't sent during the specified dates, an empty list is returned.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getCampaignReportsSent({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `groupid`   | `string` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignReportsUnopened

`campaignReports.getCampaignReportsUnopened`

Tool to retrieve contacts who did not open a specific campaign. Use when you need to identify which recipients received but did not open your campaign email. The default search window is the last 3 months; if the campaign wasn't sent during the specified dates, an empty list is returned.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getCampaignReportsUnopened({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `groupid`   | `string` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignUnsubscribed

`campaignReports.getCampaignUnsubscribed`

Retrieves the list of contacts who unsubscribed from a specific email campaign. Use this action when you need to: - Identify which recipients opted out of receiving future communications from a campaign - Analyze unsubscribe patterns and reasons for a particular campaign - Track campaign unsubscribe metrics and contact details By default, searches campaigns updated within the last 3 months. If the campaign wasn't sent within the specified date range, an empty list is returned. Supports pagination for large unsubscribe lists.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getCampaignUnsubscribed({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `number` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getPushCampaignReports

`campaignReports.getPushCampaignReports`

Retrieves push notification campaign performance metrics and reports filtered by date range, send type, or search term. Returns analytics including sent count, delivered count, opened count, clicked count, open rate, click rate, and delivery status for each campaign. Default behavior: Returns the last 20 campaigns from the last 3 months when no parameters are specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaignReports.getPushCampaignReports({});
```

**Input**

| Name          | Type               | Required | Description |
| ------------- | ------------------ | -------- | ----------- |
| `page`        | `number`           | No       | —           |
| `limit`       | `number`           | No       | —           |
| `to_date`     | `string`           | No       | —           |
| `from_date`   | `string`           | No       | —           |
| `send_type`   | `string`           | No       | —           |
| `search_term` | `string`           | No       | —           |
| `id`          | `string \| number` | No       | —           |
| `body`        | `any`              | No       | —           |
| `query`       | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Campaigns

### createCampaign

`campaigns.createCampaign`

Create and return a new email campaign for specific groups. The campaign can be configured as an A/B split test, E-commerce campaign, or a regular campaign. Created in draft status unless is\_sent is set to true.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.createCampaign({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `carts`        | `object` | No       | —           |
| `pairs`        | `any[]`  | No       | —           |
| `design`       | `object` | Yes      | —           |
| `details`      | `object` | Yes      | —           |
| `segment`      | `object` | No       | —           |
| `template`     | `object` | No       | —           |
| `send_test`    | `string` | No       | —           |
| `scheduling`   | `object` | Yes      | —           |
| `a_b_settings` | `object` | No       | —           |
| `body`         | `any`    | No       | —           |
| `query`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="carts full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="design full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="details full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="segment full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="template full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="scheduling full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="a_b_settings full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### createCampaignForContacts

`campaigns.createCampaignForContacts`

Tool to create and send a new campaign to specific contacts in ActiveTrail. Use when you need to create campaigns targeted at selected recipients by contact IDs or email addresses. Supports regular campaigns, A/B split campaigns, and e-commerce campaigns.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.createCampaignForContacts({});
```

**Input**

| Name                | Type     | Required | Description |
| ------------------- | -------- | -------- | ----------- |
| `campaign`          | `object` | Yes      | —           |
| `campaign_contacts` | `object` | Yes      | —           |
| `body`              | `any`    | No       | —           |
| `query`             | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="campaign full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="campaign_contacts full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteCampaign

`campaigns.deleteCampaign`

Tool to remove a campaign from ActiveTrail account. Use when you need to delete a campaign that is no longer needed.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.campaigns.deleteCampaign({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignDesign

`campaigns.getCampaignDesign`

Tool to retrieve campaign design configuration including visual layout and HTML content. Use when you need to get the design details of a specific email campaign.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getCampaignDesign({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignScheduling

`campaigns.getCampaignScheduling`

Retrieves the scheduling configuration for a specific email campaign, including send status and scheduled datetime. Use this action when you need to check if a campaign is scheduled to send, when it's scheduled to send (in UTC), or verify the send status of a campaign. The response includes is\_sent flag (whether campaign is dispatched) and scheduled\_date\_utc (planned send datetime). Campaign ID can be obtained from campaign list actions.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getCampaignScheduling({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignsDetails

`campaigns.getCampaignsDetails`

Tool to retrieve detailed campaign information including name, subject, and settings. Use when you need to get comprehensive details about a specific email campaign.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getCampaignsDetails({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignsSegment

`campaigns.getCampaignsSegment`

Tool to retrieve campaign sending settings including target groups and sending restrictions. Use when you need to get the segmentation configuration for a specific campaign.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getCampaignsSegment({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignsSentCampaigns

`campaigns.getCampaignsSentCampaigns`

Tool to retrieve a list of all sent campaigns from ActiveTrail. Use when you need to view all campaigns that have been sent, including their details such as name, subject, send status, and delivery metrics. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getCampaignsSentCampaigns({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignTemplate

`campaigns.getCampaignTemplate`

Retrieves template details (design, content, subject line, sender info) for a specific email campaign. Use this action when you need to: - View the template configuration used in a campaign - Get HTML/plain text content of a campaign template - Retrieve sender information (from name, from email, reply-to) - Access template metadata like category, creation/modification dates Note: Requires a valid campaign ID which can be obtained from the 'Get Sent Campaigns' action.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getCampaignTemplate({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getPushCampaigns

`campaigns.getPushCampaigns`

Tool to retrieve push notification campaigns with optional filtering by date, campaign ID, and search criteria. Use when you need to get push campaigns filtered by date range (default is last 6 months and last 20 campaigns), or filtered by specific campaign ID or search term.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getPushCampaigns({});
```

**Input**

| Name               | Type      | Required | Description |
| ------------------ | --------- | -------- | ----------- |
| `to_date`          | `string`  | No       | —           |
| `from_date`        | `string`  | No       | —           |
| `page_size`        | `number`  | No       | —           |
| `campaign_id`      | `string`  | No       | —           |
| `filter_type`      | `string`  | No       | —           |
| `page_number`      | `number`  | No       | —           |
| `search_term`      | `string`  | No       | —           |
| `include_deleted`  | `boolean` | No       | —           |
| `include_not_sent` | `boolean` | No       | —           |
| `body`             | `any`     | No       | —           |
| `query`            | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getTemplate

`campaigns.getTemplate`

Tool to retrieve detailed information about a specific template from the account's saved templates. Use when you need to fetch template details including name, subject, content, category, and encoding settings.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.getTemplate({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### listSmsCampaigns

`campaigns.listSmsCampaigns`

Tool to retrieve SMS campaigns with optional filtering by date, search term, and type. Use when you need to get SMS campaigns filtered by date range (default is last 3 months) or other criteria. Returns up to 20 campaigns per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.campaigns.listSmsCampaigns({});
```

**Input**

| Name                  | Type      | Required | Description |
| --------------------- | --------- | -------- | ----------- |
| `page`                | `number`  | No       | —           |
| `limit`               | `number`  | No       | —           |
| `to_date`             | `string`  | No       | —           |
| `from_date`           | `string`  | No       | —           |
| `filter_type`         | `string`  | No       | —           |
| `search_term`         | `string`  | No       | —           |
| `is_include_not_sent` | `boolean` | No       | —           |
| `body`                | `any`     | No       | —           |
| `query`               | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### putCampaignsSegment

`campaigns.putCampaignsSegment`

Tool to update campaign sending settings including groups and sending restrictions. Use when you need to modify which groups receive a campaign. Note: Only campaigns in draft mode can be updated.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.putCampaignsSegment({});
```

**Input**

| Name                   | Type     | Required | Description |
| ---------------------- | -------- | -------- | ----------- |
| `id`                   | `number` | Yes      | —           |
| `group_ids`            | `any[]`  | Yes      | —           |
| `restricted_group_ids` | `any[]`  | No       | —           |
| `body`                 | `any`    | No       | —           |
| `query`                | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateCampaignDesign

`campaigns.updateCampaignDesign`

Tool to update the design and HTML content of an email campaign in ActiveTrail. Use when you need to modify a campaign's visual layout, HTML content, or encoding settings. Important: Only campaigns in draft mode can be updated through this endpoint.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.updateCampaignDesign({});
```

**Input**

| Name                          | Type      | Required | Description |
| ----------------------------- | --------- | -------- | ----------- |
| `id`                          | `number`  | Yes      | —           |
| `content`                     | `string`  | Yes      | —           |
| `language_type`               | `string`  | No       | —           |
| `is_add_print_email`          | `boolean` | No       | —           |
| `is_auto_css_inliner`         | `boolean` | No       | —           |
| `is_remove_system_links`      | `boolean` | No       | —           |
| `header_footer_language_type` | `string`  | No       | —           |
| `body`                        | `any`     | No       | —           |
| `query`                       | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateCampaignScheduling

`campaigns.updateCampaignScheduling`

Tool to configure send schedule for draft campaigns. Use when you need to update the scheduling configuration of a campaign. Only campaigns in draft mode can be updated.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.updateCampaignScheduling({});
```

**Input**

| Name                 | Type      | Required | Description |
| -------------------- | --------- | -------- | ----------- |
| `id`                 | `number`  | Yes      | —           |
| `is_sent`            | `boolean` | Yes      | —           |
| `scheduled_date_utc` | `string`  | Yes      | —           |
| `body`               | `any`     | No       | —           |
| `query`              | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateCampaignSDetails

`campaigns.updateCampaignSDetails`

Updates an email campaign's core details including name, subject line, sender profile, category, and delivery settings. Important: Only campaigns in DRAFT status can be updated. Attempting to update sent or scheduled campaigns will fail. Use 'Get Campaign by ID' first to verify the campaign is in draft mode before updating.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.updateCampaignSDetails({});
```

**Input**

| Name                    | Type      | Required | Description |
| ----------------------- | --------- | -------- | ----------- |
| `id`                    | `number`  | Yes      | —           |
| `name`                  | `string`  | Yes      | —           |
| `subject`               | `string`  | Yes      | —           |
| `preheader`             | `string`  | No       | —           |
| `user_profile_id`       | `number`  | Yes      | —           |
| `content_category_id`   | `number`  | Yes      | —           |
| `predictive_delivery`   | `boolean` | Yes      | —           |
| `google_analytics_name` | `string`  | No       | —           |
| `body`                  | `any`     | No       | —           |
| `query`                 | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateCampaignTemplate

`campaigns.updateCampaignTemplate`

Tool to update the template associated with an email campaign in ActiveTrail. Use when you need to assign or change a template for a campaign. Important: Only campaigns in draft mode can be updated through this endpoint.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.campaigns.updateCampaignTemplate({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `campaign_id` | `number` | Yes      | —           |
| `template_id` | `number` | Yes      | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Commerce

### createOrder

`commerce.createOrder`

Tool to create new orders in ActiveTrail commerce system. Use when you need to add order records with customer information, products, and transaction details. Accepts an array of order objects for batch creation.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.commerce.createOrder({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `orders` | `any[]`  | Yes      | —           |
| `body`   | `any`    | No       | —           |
| `query`  | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCommerceSchema

`commerce.getCommerceSchema`

Tool to retrieve order fields schema information from the ActiveTrail commerce API. Use when you need to get information about available order fields, their types, and custom names for commerce/order management. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.commerce.getCommerceSchema({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getOrder

`commerce.getOrder`

Tool to retrieve complete details of a specific order from ActiveTrail commerce system. Use when you need to fetch order information including customer details, financial data, products, and shipping information.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.commerce.getOrder({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `order_id` | `string` | Yes      | —           |
| `body`     | `any`    | No       | —           |
| `query`    | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateOrder

`commerce.updateOrder`

Updates an existing order in the ActiveTrail commerce system. Use this action to modify order details including customer information (name, email, phone), shipping address, order status, pricing (amounts, tax, currency), or product items. You must provide the existing order\_id - this action cannot create new orders. Common use cases: - Update order status (e.g., from "pending" to "shipped") - Modify customer contact information - Adjust pricing or add/remove items - Update shipping addresses - Change order metadata (dates, custom fields)

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.commerce.updateOrder({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `tax`          | `number` | No       | —           |
| `city`         | `string` | No       | —           |
| `email`        | `string` | No       | —           |
| `items`        | `any[]`  | No       | —           |
| `mobile`       | `string` | No       | —           |
| `status`       | `string` | No       | —           |
| `address`      | `string` | No       | —           |
| `orderId`      | `string` | No       | —           |
| `currency`     | `string` | No       | —           |
| `lastName`     | `string` | No       | —           |
| `order_id`     | `string` | Yes      | —           |
| `firstName`    | `string` | No       | —           |
| `netAmount`    | `number` | No       | —           |
| `orderName`    | `string` | No       | —           |
| `totalPrice`   | `number` | No       | —           |
| `totalAmount`  | `number` | No       | —           |
| `purchaseDate` | `string` | No       | —           |
| `body`         | `any`    | No       | —           |
| `query`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Contacts

### createContact

`contacts.createContact`

Creates a new contact in ActiveTrail with the provided information. At least one of email or sms must be provided as the primary identifier. All other fields are optional and can be used to enrich the contact profile. Important: Newly created contacts are not automatically assigned to any group. To enable email/SMS campaigns for this contact, you must add them to a group using a separate action after creation. Returns the complete contact record including the assigned contact ID.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.contacts.createContact({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `fax`          | `string` | No       | —           |
| `sms`          | `string` | No       | —           |
| `city`         | `string` | No       | —           |
| `ext1`         | `string` | No       | —           |
| `ext2`         | `string` | No       | —           |
| `ext3`         | `string` | No       | —           |
| `ext4`         | `string` | No       | —           |
| `ext5`         | `string` | No       | —           |
| `ext6`         | `string` | No       | —           |
| `ext7`         | `string` | No       | —           |
| `ext8`         | `string` | No       | —           |
| `ext9`         | `string` | No       | —           |
| `num1`         | `number` | No       | —           |
| `num2`         | `number` | No       | —           |
| `num3`         | `number` | No       | —           |
| `num4`         | `number` | No       | —           |
| `num5`         | `number` | No       | —           |
| `date1`        | `string` | No       | —           |
| `date2`        | `string` | No       | —           |
| `date3`        | `string` | No       | —           |
| `date4`        | `string` | No       | —           |
| `date5`        | `string` | No       | —           |
| `email`        | `string` | No       | —           |
| `ext10`        | `string` | No       | —           |
| `ext11`        | `string` | No       | —           |
| `ext12`        | `string` | No       | —           |
| `ext13`        | `string` | No       | —           |
| `ext14`        | `string` | No       | —           |
| `ext15`        | `string` | No       | —           |
| `ext16`        | `string` | No       | —           |
| `ext17`        | `string` | No       | —           |
| `ext18`        | `string` | No       | —           |
| `ext19`        | `string` | No       | —           |
| `ext20`        | `string` | No       | —           |
| `ext21`        | `string` | No       | —           |
| `ext22`        | `string` | No       | —           |
| `ext23`        | `string` | No       | —           |
| `ext24`        | `string` | No       | —           |
| `ext25`        | `string` | No       | —           |
| `phone1`       | `string` | No       | —           |
| `phone2`       | `string` | No       | —           |
| `street`       | `string` | No       | —           |
| `birthday`     | `string` | No       | —           |
| `zip_code`     | `string` | No       | —           |
| `last_name`    | `string` | No       | —           |
| `first_name`   | `string` | No       | —           |
| `anniversary`  | `string` | No       | —           |
| `subscribe_ip` | `string` | No       | —           |
| `body`         | `any`    | No       | —           |
| `query`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteContact

`contacts.deleteContact`

Tool to permanently remove a contact from the ActiveTrail account by their unique contact ID. Use when you need to delete a specific contact. This operation is destructive and cannot be undone. Returns success status and optional message.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.contacts.deleteContact({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignReportsEmailActivity

`contacts.getCampaignReportsEmailActivity`

Tool to retrieve all contacts' activity on a specific campaign. Use when you need comprehensive activity data including opens, clicks, bounces, and other engagement metrics for each contact in a campaign. By default, the search covers campaigns updated in the last 3 months; if the campaign wasn't sent in the specified date range, an error will be returned.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getCampaignReportsEmailActivity({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactActivity

`contacts.getContactActivity`

Tool to retrieve contact's email engagement history including opens and clicks. Use when you need detailed activity data showing which campaigns were sent to a contact and their engagement metrics.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactActivity({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactDetails

`contacts.getContactDetails`

Tool to retrieve complete details of a specific contact by their ID. Use when you need full contact information including personal data, contact fields, subscription status, and all custom extended fields.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactDetails({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactGroups

`contacts.getContactGroups`

Tool to retrieve all groups associated with a specific contact. Returns group details including group ID, name, member counts, and creation dates. Use when you need to list a contact's group memberships by contact ID.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactGroups({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactList

`contacts.getContactList`

Tool to retrieve account contacts filtered by status and date range. Use when you need to get a list of contacts filtered by customer status (active, unsubscribed, bounced, etc.) or by registration date. Default behavior: retrieves contacts modified within the last three months with a limit of 100 contacts per page.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactList({});
```

**Input**

| Name              | Type               | Required | Description |
| ----------------- | ------------------ | -------- | ----------- |
| `page`            | `number`           | No       | —           |
| `limit`           | `number`           | No       | —           |
| `to_date`         | `string`           | No       | —           |
| `from_date`       | `string`           | No       | —           |
| `search_term`     | `string`           | No       | —           |
| `customer_states` | `string`           | No       | —           |
| `id`              | `string \| number` | No       | —           |
| `body`            | `any`              | No       | —           |
| `query`           | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsErrors

`contacts.getContactsErrors`

Tool to retrieve bounce and error history for a specific contact. Use when you need to understand delivery issues or bounce patterns for a contact's email address.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsErrors({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsMailinglists

`contacts.getContactsMailinglists`

Tool to retrieve all mailing lists associated with a specific contact. Use when you need to list a contact's mailing list memberships by contact ID.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsMailinglists({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsMerges

`contacts.getContactsMerges`

Tool to retrieve contacts experiencing merge conflicts with filtering options. Use when you need to get the list of contacts with merge conflicts, filtered by status, date range, or limited to a specific number of conflicts.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsMerges({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `page`       | `number` | No       | —           |
| `limit`      | `number` | No       | —           |
| `to_date`    | `string` | No       | —           |
| `from_date`  | `string` | No       | —           |
| `state_type` | `string` | No       | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactSmsStatistics

`contacts.getContactSmsStatistics`

Tool to retrieve contact interaction statistics for a specific transactional SMS. Use when you need to see how a contact interacted with a transactional/operational SMS including delivery status, bounce information, and unsubscribe actions.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactSmsStatistics({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `contact_id` | `number` | Yes      | —           |
| `message_id` | `number` | Yes      | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsStatisticsCampaign

`contacts.getContactsStatisticsCampaign`

Tool to retrieve contact's interaction statistics for a specific campaign. Use when you need to see how a specific contact engaged with a campaign including opens, clicks, bounces, unsubscribes, and spam complaints.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsStatisticsCampaign({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `number` | Yes      | —           |
| `campaign_id` | `number` | Yes      | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsSubscriptionAllContacts

`contacts.getContactsSubscriptionAllContacts`

Tool to get contacts' subscription status and the source of their status (if known). Use when you need to retrieve all contacts with their subscription status information filtered by creation date. Defaults to three months back if date range is not specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsSubscriptionAllContacts({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsSubscriptionCustomersStatus

`contacts.getContactsSubscriptionCustomersStatus`

Get daily breakdown of contact status statistics over a date range. Returns counts of active, unsubscribed, bounced, quarantined, spam complaints, inactive, and user-requested removal contacts for each day in the specified period. Defaults to recent days when no date range is provided.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsSubscriptionCustomersStatus({});
```

**Input**

| Name        | Type               | Required | Description |
| ----------- | ------------------ | -------- | ----------- |
| `to_date`   | `string`           | No       | —           |
| `from_date` | `string`           | No       | —           |
| `page`      | `string \| number` | No       | —           |
| `limit`     | `string \| number` | No       | —           |
| `body`      | `any`              | No       | —           |
| `query`     | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsSubscriptionSubscribers

`contacts.getContactsSubscriptionSubscribers`

Tool to retrieve all contacts who subscribed and the source of their subscription status. Use when you need to get a comprehensive list of subscribers. The search defaults to 3 months back if date range is not specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsSubscriptionSubscribers({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsSubscriptionUnsubscribers

`contacts.getContactsSubscriptionUnsubscribers`

Tool to retrieve all contacts who unsubscribed and the source of their unsubscription status. Use when you need to get a comprehensive list of unsubscribers. The search defaults to 3 months back if date range is not specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsSubscriptionUnsubscribers({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsUnsubscribersSms

`contacts.getContactsUnsubscribersSms`

Tool to retrieve all contacts who unsubscribed from receiving SMS messages. Use when you need to get a list of SMS unsubscribers with optional filtering by date range and pagination support.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsUnsubscribersSms({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getContactsWithSmsState

`contacts.getContactsWithSmsState`

Tool to retrieve account's contacts list with SMS subscription state. Use when you need to get contacts filtered by customer status (active, unsubscribed, bounced, etc.) and by state change date range, with default filtering to three months back.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getContactsWithSmsState({});
```

**Input**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `page`            | `number` | No       | —           |
| `limit`           | `number` | No       | —           |
| `to_date`         | `string` | No       | —           |
| `from_date`       | `string` | No       | —           |
| `search_term`     | `string` | No       | —           |
| `customer_states` | `string` | No       | —           |
| `body`            | `any`    | No       | —           |
| `query`           | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCustomerStatsForTransactionalMessage

`contacts.getCustomerStatsForTransactionalMessage`

Tool to retrieve customer interaction statistics for a specific transactional message. Use when you need to see how a contact engaged with a transactional/operational message including delivery status, opens, clicks, and other interaction metrics.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.getCustomerStatsForTransactionalMessage({});
```

**Input**

| Name               | Type               | Required | Description |
| ------------------ | ------------------ | -------- | ----------- |
| `contact_id`       | `number`           | Yes      | —           |
| `transactional_id` | `number`           | Yes      | —           |
| `message_id`       | `string \| number` | No       | —           |
| `body`             | `any`              | No       | —           |
| `query`            | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### importNewContacts

`contacts.importNewContacts`

Tool to import new contacts into a group in ActiveTrail. Use when you need to bulk import contacts with customer information (limited to 1000 contacts per call). Returns success count and any errors for failed contact imports.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.contacts.importNewContacts({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `group`        | `number` | Yes      | —           |
| `contacts`     | `any[]`  | Yes      | —           |
| `mailing_list` | `number` | No       | —           |
| `body`         | `any`    | No       | —           |
| `query`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### listTransactionalSmsMessages

`contacts.listTransactionalSmsMessages`

Tool to retrieve all SMS transactional messages with pagination support. Use when you need to fetch the list of operational SMS campaigns configured in the account.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.contacts.listTransactionalSmsMessages({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `page`  | `number` | No       | —           |
| `limit` | `number` | No       | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## External

### createSmsOperationalMessage

`external.createSmsOperationalMessage`

Tool to create a new operational SMS transactional message. Use when you need to create an SMS campaign for later use or editing.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.external.createSmsOperationalMessage({});
```

**Input**

| Name               | Type      | Required | Description |
| ------------------ | --------- | -------- | ----------- |
| `name`             | `string`  | Yes      | —           |
| `content`          | `string`  | Yes      | —           |
| `from_name`        | `string`  | Yes      | —           |
| `can_unsubscribe`  | `boolean` | No       | —           |
| `unsubscribe_text` | `string`  | No       | —           |
| `body`             | `any`     | No       | —           |
| `query`            | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteMailingList

`external.deleteMailingList`

Tool to permanently remove a mailing list from the ActiveTrail account by its unique ID. Use when you need to delete a mailing list that is no longer needed. This operation is destructive and cannot be undone. Returns success status and confirmation message.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.external.deleteMailingList({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getExternalSchema

`external.getExternalSchema`

Tool to retrieve contact field schema information for the account. Use when you need to get the structure and metadata of all available contact fields. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.external.getExternalSchema({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSendingProfiles

`external.getSendingProfiles`

Tool to retrieve account email sending profiles. Use when you need to get sending profile configurations including sender names, email addresses, and reply-to settings. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.external.getSendingProfiles({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsSendingProfiles

`external.getSmsSendingProfiles`

Tool to retrieve SMS sending profiles configured for the account. Use when you need to get SMS sender profile configurations including sender names and phone numbers. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.external.getSmsSendingProfiles({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### removeExternalContactFromGroup

`external.removeExternalContactFromGroup`

Tool to remove contacts from a group via external ID. Use when you need to delete external contacts from a specific group in ActiveTrail. Limited to 1000 contacts per call.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.external.removeExternalContactFromGroup({});
```

**Input**

| Name                | Type     | Required | Description |
| ------------------- | -------- | -------- | ----------- |
| `group_id`          | `string` | Yes      | —           |
| `external_contacts` | `any[]`  | Yes      | —           |
| `body`              | `any`    | No       | —           |
| `query`             | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### sendOperationalMessage

`external.sendOperationalMessage`

Create and send a new operational message via the external API (limited to 500 messages per request). Recipients will be created as contacts if they don't already exist.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.external.sendOperationalMessage({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `bcc`           | `object` | No       | —           |
| `design`        | `object` | Yes      | —           |
| `details`       | `object` | Yes      | —           |
| `email_package` | `any[]`  | No       | —           |
| `body`          | `any`    | No       | —           |
| `query`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="bcc full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="design full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="details full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### sendOperationalMessageEmail

`external.sendOperationalMessageEmail`

Send an email operational message to individual emails (limited to 500). Supports dynamic text replacement via email\_package key-value pairs.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.external.sendOperationalMessageEmail({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `bcc`           | `object` | No       | —           |
| `design`        | `object` | Yes      | —           |
| `details`       | `object` | Yes      | —           |
| `email_package` | `any[]`  | Yes      | —           |
| `body`          | `any`    | No       | —           |
| `query`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="bcc full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="design full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="details full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateContact

`external.updateContact`

Tool to update an existing contact's information by ID. Use when you need to modify contact details such as name, email, phone, address, or custom fields. Only the fields you include in the request will be updated; other fields remain unchanged.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.external.updateContact({});
```

**Input**

| Name                   | Type               | Required | Description |
| ---------------------- | ------------------ | -------- | ----------- |
| `id`                   | `number`           | Yes      | —           |
| `fax`                  | `string`           | No       | —           |
| `sms`                  | `string`           | No       | —           |
| `city`                 | `string`           | No       | —           |
| `ext1`                 | `string`           | No       | —           |
| `ext2`                 | `string`           | No       | —           |
| `ext3`                 | `string`           | No       | —           |
| `ext4`                 | `string`           | No       | —           |
| `ext5`                 | `string`           | No       | —           |
| `ext6`                 | `string`           | No       | —           |
| `ext7`                 | `string`           | No       | —           |
| `ext8`                 | `string`           | No       | —           |
| `ext9`                 | `string`           | No       | —           |
| `num1`                 | `number`           | No       | —           |
| `num2`                 | `number`           | No       | —           |
| `num3`                 | `number`           | No       | —           |
| `num4`                 | `number`           | No       | —           |
| `num5`                 | `number`           | No       | —           |
| `date1`                | `string`           | No       | —           |
| `date2`                | `string`           | No       | —           |
| `date3`                | `string`           | No       | —           |
| `date4`                | `string`           | No       | —           |
| `date5`                | `string`           | No       | —           |
| `email`                | `string`           | No       | —           |
| `ext10`                | `string`           | No       | —           |
| `ext11`                | `string`           | No       | —           |
| `ext12`                | `string`           | No       | —           |
| `ext13`                | `string`           | No       | —           |
| `ext14`                | `string`           | No       | —           |
| `ext15`                | `string`           | No       | —           |
| `ext16`                | `string`           | No       | —           |
| `ext17`                | `string`           | No       | —           |
| `ext18`                | `string`           | No       | —           |
| `ext19`                | `string`           | No       | —           |
| `ext20`                | `string`           | No       | —           |
| `ext21`                | `string`           | No       | —           |
| `ext22`                | `string`           | No       | —           |
| `ext23`                | `string`           | No       | —           |
| `ext24`                | `string`           | No       | —           |
| `ext25`                | `string`           | No       | —           |
| `phone1`               | `string`           | No       | —           |
| `phone2`               | `string`           | No       | —           |
| `status`               | `string`           | No       | —           |
| `street`               | `string`           | No       | —           |
| `birthday`             | `string`           | No       | —           |
| `zip_code`             | `string`           | No       | —           |
| `last_name`            | `string`           | No       | —           |
| `first_name`           | `string`           | No       | —           |
| `is_deleted`           | `boolean`          | No       | —           |
| `sms_status`           | `string`           | No       | —           |
| `anniversary`          | `string`           | No       | —           |
| `subscribe_ip`         | `string`           | No       | —           |
| `double_opt_in_config` | `object`           | No       | —           |
| `external_name`        | `string \| number` | No       | —           |
| `external_id`          | `string \| number` | No       | —           |
| `body`                 | `any`              | No       | —           |
| `query`                | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="double_opt_in_config full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Groups

### addGroupMember

`groups.addGroupMember`

Tool to add a member to a group in ActiveTrail. Creates a new contact or adds an existing contact to the specified group. Supports comprehensive contact information including names, phone numbers, addresses, dates, and custom extension fields. The API will not return errors if the contact is already in the group (idempotent operation).

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.groups.addGroupMember({});
```

**Input**

| Name                | Type      | Required | Description |
| ------------------- | --------- | -------- | ----------- |
| `fax`               | `string`  | No       | —           |
| `city`              | `string`  | No       | —           |
| `ext1`              | `string`  | No       | —           |
| `ext2`              | `string`  | No       | —           |
| `ext3`              | `string`  | No       | —           |
| `ext4`              | `string`  | No       | —           |
| `ext5`              | `string`  | No       | —           |
| `ext6`              | `string`  | No       | —           |
| `email`             | `string`  | Yes      | —           |
| `phone1`            | `string`  | No       | —           |
| `phone2`            | `string`  | No       | —           |
| `status`            | `string`  | No       | —           |
| `street`            | `string`  | No       | —           |
| `birthday`          | `string`  | No       | —           |
| `group_id`          | `number`  | Yes      | —           |
| `zip_code`          | `string`  | No       | —           |
| `last_name`         | `string`  | No       | —           |
| `first_name`        | `string`  | No       | —           |
| `anniversary`       | `string`  | No       | —           |
| `campaign_id`       | `number`  | No       | —           |
| `encryptedext1`     | `string`  | No       | —           |
| `encryptedext2`     | `string`  | No       | —           |
| `encryptedext3`     | `string`  | No       | —           |
| `encryptedext4`     | `string`  | No       | —           |
| `is_do_not_mail`    | `boolean` | No       | —           |
| `is_trigger_events` | `boolean` | No       | —           |
| `body`              | `any`     | No       | —           |
| `query`             | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### createANewGroup

`groups.createANewGroup`

Creates a new contact group in ActiveTrail for organizing and segmenting contacts. Groups are containers for contacts that allow you to: - Organize contacts by category, campaign, or segment - Target specific groups for email/SMS campaigns - Manage contact memberships independently The newly created group will be empty. Use the "Add Group Member" action to add contacts to this group. Returns the complete group details including the assigned group ID.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.groups.createANewGroup({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `name`  | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteAMemberInAGroup

`groups.deleteAMemberInAGroup`

Tool to delete a group member by ID. Use when you need to remove a contact from a specific group in ActiveTrail.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.groups.deleteAMemberInAGroup({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `group_id`   | `number` | Yes      | —           |
| `contact_id` | `number` | Yes      | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteGroupById

`groups.deleteGroupById`

Tool to delete a group by ID. Use when you need to permanently remove a group from ActiveTrail. This is a destructive operation that cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.groups.deleteGroupById({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `group_id` | `number` | Yes      | —           |
| `body`     | `any`    | No       | —           |
| `query`    | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAllGroups

`groups.getAllGroups`

Tool to retrieve the full list of account groups with pagination and filtering. Use when you need to get all groups or search for groups by name. Default limit is 100 groups per page.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.groups.getAllGroups({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getGroup

`groups.getGroup`

Tool to retrieve detailed information about a specific group by its unique identifier. Use when you need to fetch group details including name, contact counters, and timestamps.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.groups.getGroup({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getGroupContentsById

`groups.getGroupContentsById`

Tool to retrieve all group members by group ID with pagination and filtering. Use when you need to get complete information about contacts in a specific group. Returns up to 100 contacts per page with optional filtering by status and date range.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.groups.getGroupContentsById({});
```

**Input**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `page`            | `number` | No       | —           |
| `limit`           | `number` | No       | —           |
| `to_date`         | `string` | No       | —           |
| `group_id`        | `number` | Yes      | —           |
| `from_date`       | `string` | No       | —           |
| `search_term`     | `string` | No       | —           |
| `customer_states` | `string` | No       | —           |
| `body`            | `any`    | No       | —           |
| `query`           | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getGroupsEvents

`groups.getGroupsEvents`

Tool to retrieve all events for a specific group with optional filtering by event type, event date, and subscriber creation date. Use when you need to analyze group engagement metrics like opens, clicks, and unsubscribes. Default date range is 3 months back if not specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.groups.getGroupsEvents({});
```

**Input**

| Name                | Type     | Required | Description |
| ------------------- | -------- | -------- | ----------- |
| `id`                | `number` | Yes      | —           |
| `event_type`        | `string` | No       | —           |
| `event_to_date`     | `string` | No       | —           |
| `created_to_date`   | `string` | No       | —           |
| `event_from_date`   | `string` | No       | —           |
| `created_from_date` | `string` | No       | —           |
| `body`              | `any`    | No       | —           |
| `query`             | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateGroup

`groups.updateGroup`

Updates an existing group in ActiveTrail by its ID. Primary use case: Rename a group by updating its name field. Important notes: - Only the 'name' field is reliably updateable via this endpoint - The API typically returns HTTP 204 (No Content) on success - Group must exist or will return 404 error Use 'Get All Groups' or 'Get Group by ID' actions to find the group ID first.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.groups.updateGroup({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `name`  | `string` | No       | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Landingpage

### getLandingPages

`landingpage.getLandingPages`

Tool to retrieve landing pages from the ActiveTrail account with pagination support. Use when you need to get all landing pages or fetch paginated results.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.landingpage.getLandingPages({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `page`  | `number` | No       | —           |
| `limit` | `number` | No       | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Mailing List

### addMailinglistMember

`mailingList.addMailinglistMember`

Tool to add a member to a mailing list in ActiveTrail. Creates a new contact or adds an existing contact to the specified mailing list and groups. Either email or SMS must be provided.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.mailingList.addMailinglistMember({});
```

**Input**

| Name             | Type      | Required | Description |
| ---------------- | --------- | -------- | ----------- |
| `fax`            | `string`  | No       | —           |
| `sms`            | `string`  | No       | —           |
| `city`           | `string`  | No       | —           |
| `ext1`           | `string`  | No       | —           |
| `ext2`           | `string`  | No       | —           |
| `ext3`           | `string`  | No       | —           |
| `ext4`           | `string`  | No       | —           |
| `ext5`           | `string`  | No       | —           |
| `ext6`           | `string`  | No       | —           |
| `ext7`           | `string`  | No       | —           |
| `ext8`           | `string`  | No       | —           |
| `ext9`           | `string`  | No       | —           |
| `num1`           | `string`  | No       | —           |
| `num2`           | `string`  | No       | —           |
| `num3`           | `string`  | No       | —           |
| `num4`           | `string`  | No       | —           |
| `num5`           | `string`  | No       | —           |
| `date1`          | `string`  | No       | —           |
| `date2`          | `string`  | No       | —           |
| `date3`          | `string`  | No       | —           |
| `date4`          | `string`  | No       | —           |
| `date5`          | `string`  | No       | —           |
| `email`          | `string`  | No       | —           |
| `ext10`          | `string`  | No       | —           |
| `ext11`          | `string`  | No       | —           |
| `ext12`          | `string`  | No       | —           |
| `ext13`          | `string`  | No       | —           |
| `ext14`          | `string`  | No       | —           |
| `ext15`          | `string`  | No       | —           |
| `ext16`          | `string`  | No       | —           |
| `ext17`          | `string`  | No       | —           |
| `ext18`          | `string`  | No       | —           |
| `ext19`          | `string`  | No       | —           |
| `ext20`          | `string`  | No       | —           |
| `ext21`          | `string`  | No       | —           |
| `ext22`          | `string`  | No       | —           |
| `ext23`          | `string`  | No       | —           |
| `ext24`          | `string`  | No       | —           |
| `ext25`          | `string`  | No       | —           |
| `phone1`         | `string`  | No       | —           |
| `phone2`         | `string`  | No       | —           |
| `status`         | `string`  | No       | —           |
| `street`         | `string`  | No       | —           |
| `birthday`       | `string`  | No       | —           |
| `zip_code`       | `string`  | No       | —           |
| `group_ids`      | `any[]`   | Yes      | —           |
| `last_name`      | `string`  | No       | —           |
| `first_name`     | `string`  | No       | —           |
| `is_deleted`     | `boolean` | No       | —           |
| `sms_status`     | `string`  | No       | —           |
| `anniversary`    | `string`  | No       | —           |
| `subscribe_ip`   | `string`  | No       | —           |
| `mailinglist_id` | `number`  | Yes      | —           |
| `body`           | `any`     | No       | —           |
| `query`          | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### createNewMailingList

`mailingList.createNewMailingList`

Tool to create a new mailing list in ActiveTrail. Use when you need to add a new mailing list to organize and manage contacts.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.mailingList.createNewMailingList({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `name`  | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getMailingList

`mailingList.getMailingList`

Tool to retrieve basic information about a specific mailing list by its unique identifier. Returns the mailing list ID and name. Use when you need to verify a mailing list exists or get its name by ID.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.mailingList.getMailingList({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getMailingListMembers

`mailingList.getMailingListMembers`

Tool to retrieve all members belonging to a specific mailing list. Use when you need to get contacts from a mailing list, with optional filtering by contact status and state change date range.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.mailingList.getMailingListMembers({});
```

**Input**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `id`              | `string` | Yes      | —           |
| `page`            | `number` | No       | —           |
| `limit`           | `number` | No       | —           |
| `to_date`         | `string` | No       | —           |
| `from_date`       | `string` | No       | —           |
| `customer_states` | `string` | No       | —           |
| `body`            | `any`    | No       | —           |
| `query`           | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getMailingLists

`mailingList.getMailingLists`

Tool to retrieve all mailing lists from the ActiveTrail account. Use when you need to get the list of mailing lists associated with the account. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.mailingList.getMailingLists({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### removeAContactFromAMailingList

`mailingList.removeAContactFromAMailingList`

Removes a specific contact from a mailing list in ActiveTrail. Use this action to unsubscribe or remove a contact from a particular mailing list without deleting the contact from your account entirely. The contact will no longer receive campaigns sent to this specific mailing list, but will remain in other lists they belong to. Note: This is a destructive operation that cannot be undone via API. To re-add the contact to the list, use the 'Import New Contacts' action.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.mailingList.removeAContactFromAMailingList({});
```

**Input**

| Name             | Type     | Required | Description |
| ---------------- | -------- | -------- | ----------- |
| `contact_id`     | `string` | Yes      | —           |
| `mailinglist_id` | `string` | Yes      | —           |
| `body`           | `any`    | No       | —           |
| `query`          | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Operational Message

### getTransactionalMessagesClassification

`operationalMessage.getTransactionalMessagesClassification`

Tool to retrieve all classification options for operational/transactional messages. Use when you need to get available classifications for categorizing and filtering transactional message reports. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.operationalMessage.getTransactionalMessagesClassification({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Push Campaign Report

### getPushCampaignReportDelivered

`pushCampaignReport.getPushCampaignReportDelivered`

Tool to retrieve contacts who successfully received a specific push notification campaign. Use when you need to identify which recipients had the push campaign delivered to their devices. The campaign must have been sent within the specified date range (defaults to last 3 months); if not sent during these dates, an empty list is returned.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.pushCampaignReport.getPushCampaignReportDelivered({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `string` | Yes      | —           |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `send_type`   | `string` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getPushCampaignReportFailed

`pushCampaignReport.getPushCampaignReportFailed`

Tool to retrieve the failed delivery report for a specific push campaign. Use when you need to see which contacts experienced delivery failures and why. The campaign must be sent in the specified date range (defaults to last 3 months).

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.pushCampaignReport.getPushCampaignReportFailed({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `string` | Yes      | —           |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `send_type`   | `string` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getPushCampaignReportSent

`pushCampaignReport.getPushCampaignReportSent`

Tool to retrieve the list of contacts who were sent a specific push notification campaign, including contact details, device types, and sent timestamps. Use when you need to see the complete list of recipients for a push campaign with their delivery information. Supports filtering by date range (defaults to last 3 months), send type, and search terms. Returns paginated results with contact details for each recipient.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.pushCampaignReport.getPushCampaignReportSent({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `string` | Yes      | —           |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `send_type`   | `string` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Segmentation

### createSegmentation

`segmentation.createSegmentation`

Create a new contact segmentation in ActiveTrail. Segmentations are rule-based filters that define target audiences based on contact field values (e.g., email equals specific value, city contains text, etc.). Use this to create dynamic segments for campaign targeting, automation workflows, or contact organization. Requires a unique name and at least one base rule with field, operator, and values.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.segmentation.createSegmentation({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `name`          | `string` | Yes      | —           |
| `rules_segment` | `object` | Yes      | —           |
| `body`          | `any`    | No       | —           |
| `query`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="rules_segment full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSegmentationRuleFieldTypes

`segmentation.getSegmentationRuleFieldTypes`

Retrieve a reference dictionary of all available field types that can be used in segmentation rules for ActiveTrail automation. Returns field type definitions including their identifiers, names, data types, and descriptions. This endpoint provides the foundational metadata needed to understand which contact fields (email, phone, custom fields, behavioral data, etc.) can be evaluated when constructing segmentation conditions in marketing automations. Use this when you need to discover what field types are available before building or validating segmentation rules. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.segmentation.getSegmentationRuleFieldTypes({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSegmentationRuleOperations

`segmentation.getSegmentationRuleOperations`

Retrieves available rule operations for segmentation by field type. Returns operations categorized by field types (Info, Date, Action, Numeric, etc.) with their corresponding operation types (Is, IsNot, Contain, GreaterThan, etc.). Use this to understand which operations are valid when building segmentation rules based on field types. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.segmentation.getSegmentationRuleOperations({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSegmentationRuleTypes

`segmentation.getSegmentationRuleTypes`

Tool to retrieve available segmentation rule types for automation. Returns a list of rule type names that can be used when creating or editing automation segmentations. Use this to discover what types of rules are available (e.g., Info, Numeric, Date, Group, Action, Order-related, Cart, Catalog, etc.). #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.segmentation.getSegmentationRuleTypes({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSegmentationRuleTypesMapping

`segmentation.getSegmentationRuleTypesMapping`

Tool to retrieve the complete mapping of segmentation rule types with their associated field types and operations from ActiveTrail. Use this when building segmentation rules to understand which field types and operations are available for each rule type (e.g., Info rules support Email fields with 'Is' operation). #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.segmentation.getSegmentationRuleTypesMapping({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSegmentations

`segmentation.getSegmentations`

Retrieve all contact segmentations from your ActiveTrail account. Segmentations are rule-based filters that define target audiences for campaigns and automations (e.g., contacts who opened specific campaigns, belong to certain groups, or match demographic criteria). Use this to list all configured segmentations and their IDs for use in campaign targeting or automation workflows. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.segmentation.getSegmentations({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateSegmentation

`segmentation.updateSegmentation`

Tool to update an existing segmentation's name and/or rules by its ID. Use when you need to modify segmentation criteria or rename a segment. Segmentations are rule-based filters that define target audiences based on contact attributes, behaviors, or campaign interactions.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.segmentation.updateSegmentation({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `id`            | `number` | Yes      | —           |
| `name`          | `string` | No       | —           |
| `rules_segment` | `object` | No       | —           |
| `body`          | `any`    | No       | —           |
| `query`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="rules_segment full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Signup Forms

### getSignupForms

`signupForms.getSignupForms`

Tool to retrieve all signup forms from the ActiveTrail account. Use when you need to get the list of signup forms associated with the account. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.signupForms.getSignupForms({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Smart Code Site

### createSmartCodeSite

`smartCodeSite.createSmartCodeSite`

Creates a new Smart Code tracking site in ActiveTrail. Smart Code is ActiveTrail's web analytics and visitor tracking solution that monitors visitor behavior on your website. Use this action to register a website for Smart Code tracking by providing a site name and domain(s).

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.smartCodeSite.createSmartCodeSite({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `name`    | `string` | Yes      | —           |
| `domains` | `string` | Yes      | —           |
| `body`    | `any`    | No       | —           |
| `query`   | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteSmartCodeSite

`smartCodeSite.deleteSmartCodeSite`

Tool to remove a Smart Code site from ActiveTrail. Use when you need to permanently delete a Smart Code site identified by its unique ID.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.smartCodeSite.deleteSmartCodeSite({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmartCodeSites

`smartCodeSite.getSmartCodeSites`

Retrieves all Smart Code tracking sites configured in the ActiveTrail account. Smart Code is ActiveTrail's web analytics and visitor tracking solution. Use this action to list all registered websites with Smart Code tracking, including their IDs, names, and associated domains. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smartCodeSite.getSmartCodeSites({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateSmartCodeSite

`smartCodeSite.updateSmartCodeSite`

Updates an existing Smart Code tracking site in ActiveTrail. Use this action to modify a site's name and domain configuration. Both name and domains must be provided in the update request (the API does not support partial updates).

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.smartCodeSite.updateSmartCodeSite({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `id`      | `string` | Yes      | —           |
| `name`    | `string` | Yes      | —           |
| `domains` | `string` | Yes      | —           |
| `body`    | `any`    | No       | —           |
| `query`   | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Sms Campaign

### createSmsCampaign

`smsCampaign.createSmsCampaign`

Tool to create a new SMS campaign in ActiveTrail. Use when you need to send SMS messages to segments of your audience with customizable content, sender name, and scheduling options.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.createSmsCampaign({});
```

**Input**

| Name               | Type      | Required | Description |
| ------------------ | --------- | -------- | ----------- |
| `name`             | `string`  | Yes      | —           |
| `content`          | `string`  | Yes      | —           |
| `segment`          | `object`  | Yes      | —           |
| `from_name`        | `string`  | No       | —           |
| `scheduling`       | `object`  | Yes      | —           |
| `can_unsubscribe`  | `boolean` | No       | —           |
| `is_link_tracking` | `boolean` | No       | —           |
| `unsubscribe_text` | `string`  | Yes      | —           |
| `body`             | `any`     | No       | —           |
| `query`            | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="segment full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="scheduling full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignClicks

`smsCampaign.getCampaignClicks`

Retrieves detailed click-through data for all links in a campaign or optionally for a specific link. Returns comprehensive information including contact details (name, email), click timestamps, device information (browser, OS, device type), and click counts. Default date range: last 3 months from current date. Use this for aggregate click analysis across multiple links; for detailed analysis of a single link, consider using 'Get Click Details by Link ID' action instead. Returns an error if the campaign wasn't sent within the specified date range.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getCampaignClicks({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `link_id`   | `string` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignOpens

`smsCampaign.getCampaignOpens`

Tool to retrieve contacts who opened a specific campaign email. Use when you need to identify which recipients opened your campaign, track open rates, and analyze campaign engagement. Default search covers campaigns updated in the last 3 months; if the campaign wasn't sent during the specified date range, an empty list is returned. Supports pagination and filtering by group.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getCampaignOpens({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `groupid`     | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `campaign_id` | `number` | Yes      | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignSDetails

`smsCampaign.getCampaignSDetails`

Tool to retrieve complete campaign information including send settings, design, template, and A/B test configuration. Use when you need comprehensive details about a specific email campaign.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getCampaignSDetails({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `campaign_id` | `number` | Yes      | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getPushCampaignOpens

`smsCampaign.getPushCampaignOpens`

Retrieves a list of contacts who opened a specific push notification campaign, including contact details and when they opened the notification. Use this action to: - Track engagement metrics for push campaigns - Identify which recipients interacted with your push notifications - Filter opens by date range, send type, or search for specific contacts Note: The campaign must have been sent within the date range (defaults to last 3 months from current date if not specified). Results are paginated for campaigns with many opens.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getPushCampaignOpens({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `string` | Yes      | —           |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `send_type`   | `string` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaign

`smsCampaign.getSmsCampaign`

Tool to retrieve detailed information about a specific SMS campaign by its unique identifier. Use when you need to fetch campaign details including message content, sender, status, and delivery metrics.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getSmsCampaign({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignClickers

`smsCampaign.getSmsCampaignClickers`

Retrieve contacts who clicked links in an SMS campaign with detailed click analytics. Returns contact information (name, email, phone), click timestamps, link details, and click counts. Supports filtering by specific links, date ranges, and contact search. Note: If the SMS was sent using "add numbers manually" instead of groups/mailing lists, you'll receive click counts but mobile numbers may not be available. Default search window is 3 months from today.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getSmsCampaignClickers({});
```

**Input**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `id`                 | `string` | Yes      | —           |
| `page`               | `number` | No       | —           |
| `limit`              | `number` | No       | —           |
| `link_id`            | `string` | No       | —           |
| `to_date`            | `string` | No       | —           |
| `from_date`          | `string` | No       | —           |
| `send_type`          | `string` | No       | —           |
| `search_term`        | `string` | No       | —           |
| `rows_affected`      | `number` | No       | —           |
| `previous_row_count` | `number` | No       | —           |
| `body`               | `any`    | No       | —           |
| `query`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignEstimate

`smsCampaign.getSmsCampaignEstimate`

Tool to calculate the estimated number of messages for a given SMS campaign. Use when you need to get message count estimates for campaigns that have not been sent yet. Cannot be used for already-sent campaigns.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getSmsCampaignEstimate({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReports

`smsCampaign.getSmsCampaignReports`

Tool to retrieve SMS campaign performance metrics and reports with filtering options. Use when you need to access SMS campaign analytics including sent, delivered, failed, clicks, and engagement statistics. Returns the last 20 campaigns from the last 6 months by default when no date range or filters are specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getSmsCampaignReports({});
```

**Input**

| Name                 | Type               | Required | Description |
| -------------------- | ------------------ | -------- | ----------- |
| `page`               | `number`           | No       | —           |
| `limit`              | `number`           | No       | —           |
| `to_date`            | `string`           | No       | —           |
| `from_date`          | `string`           | No       | —           |
| `send_type`          | `string`           | No       | —           |
| `search_term`        | `string`           | No       | —           |
| `rows_affected`      | `number`           | No       | —           |
| `previous_row_count` | `number`           | No       | —           |
| `id`                 | `string \| number` | No       | —           |
| `body`               | `any`              | No       | —           |
| `query`              | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getTransactionalSmsMessage

`smsCampaign.getTransactionalSmsMessage`

Tool to retrieve detailed information about a specific transactional SMS message by its unique identifier. Use when you need to fetch SMS message content, delivery statistics, and metadata for operational SMS messages.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.getTransactionalSmsMessage({});
```

**Input**

| Name                   | Type               | Required | Description |
| ---------------------- | ------------------ | -------- | ----------- |
| `transactional_sms_id` | `number`           | Yes      | —           |
| `id`                   | `string \| number` | No       | —           |
| `body`                 | `any`              | No       | —           |
| `query`                | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateCampaign

`smsCampaign.updateCampaign`

Tool to update draft campaigns in ActiveTrail. Use when you need to modify campaign properties such as name, subject, content, or design settings. IMPORTANT: Only campaigns in draft mode can be updated - campaigns that have been sent or are scheduled cannot be modified.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.updateCampaign({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `number` | Yes      | —           |
| `design`    | `object` | Yes      | —           |
| `details`   | `object` | Yes      | —           |
| `send_test` | `string` | No       | —           |
| `send_type` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="design full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="details full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateSmsOperationalMessage

`smsCampaign.updateSmsOperationalMessage`

Tool to update an operational SMS transactional message by ID. Use when you need to modify the name, sender, or content of an existing SMS campaign. Important: You cannot update a campaign that has already been sent.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.smsCampaign.updateSmsOperationalMessage({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `number` | Yes      | —           |
| `name`      | `string` | Yes      | —           |
| `content`   | `string` | Yes      | —           |
| `from_name` | `string` | Yes      | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Sms Campaign Report

### getAutomationReportsSmsCampaignSummary

`smsCampaignReport.getAutomationReportsSmsCampaignSummary`

Tool to retrieve SMS campaigns' summary reports for a specific automation. Use when you need to analyze SMS campaign performance including sent, delivered, failed, credits consumed, unsubscribe, and click metrics within an automation.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getAutomationReportsSmsCampaignSummary({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `number` | Yes      | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getAutomationReportsSummaryReport

`smsCampaignReport.getAutomationReportsSummaryReport`

Tool to retrieve email campaigns' summary reports for a specific automation. Use when you need to analyze email campaign performance metrics including opens, clicks, click-to-open rate, conversions, bounces, unsubscribes, and spam complaints within an automation for a given date range.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getAutomationReportsSummaryReport({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `number` | Yes      | —           |
| `to_date`   | `string` | Yes      | —           |
| `from_date` | `string` | Yes      | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignDomainsReport

`smsCampaignReport.getCampaignDomainsReport`

Tool to retrieve a report by domain for a specific campaign. Use when you need to analyze campaign performance grouped by recipient email domains, including sends, opens, clicks, bounces, and engagement metrics per domain. Defaults to campaigns updated in the last 3 months.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getCampaignDomainsReport({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `campaign_id` | `string` | Yes      | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getCampaignReport

`smsCampaignReport.getCampaignReport`

Retrieves comprehensive performance metrics for a specific email campaign by its ID. Returns detailed statistics including send count, open rate, click rate, click-to-open rate (CTO), bounce rate, unsubscribe rate, spam complaints, and conversion data. Use this when you need detailed performance analytics for a single campaign. Default behavior: Returns data for campaigns updated in the last 3 months when date parameters are not specified. Note: Returns an error if the campaign wasn't sent/updated within the specified date range.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getCampaignReport({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `page`      | `number` | No       | —           |
| `limit`     | `number` | No       | —           |
| `to_date`   | `string` | No       | —           |
| `from_date` | `string` | No       | —           |
| `body`      | `any`    | No       | —           |
| `query`     | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getPushCampaignReportSummary

`smsCampaignReport.getPushCampaignReportSummary`

Tool to retrieve aggregated summary statistics for push notification campaigns filtered by date range. Returns total counts across all campaigns including total sent, opens, clicks, clickers, unsubscribes, failed deliveries, and total devices. Use this when you need overall push campaign performance metrics rather than individual campaign details. Default behavior: Returns aggregate statistics for campaigns from the last 3 months when date parameters are not specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getPushCampaignReportSummary({});
```

**Input**

| Name          | Type               | Required | Description |
| ------------- | ------------------ | -------- | ----------- |
| `page`        | `number`           | No       | —           |
| `limit`       | `number`           | No       | —           |
| `to_date`     | `string`           | No       | —           |
| `from_date`   | `string`           | No       | —           |
| `send_type`   | `string`           | No       | —           |
| `search_term` | `string`           | No       | —           |
| `id`          | `string \| number` | No       | —           |
| `body`        | `any`              | No       | —           |
| `query`       | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignDelivered

`smsCampaignReport.getSmsCampaignDelivered`

Tool to retrieve delivery confirmations for a specific SMS campaign. Use when you need to see which contacts successfully received the SMS message. The campaign must be sent in the specified date range (defaults to last 3 months). Note: If SMS was sent using manual number entry instead of a group, only the delivery count is returned without specific mobile numbers.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignDelivered({});
```

**Input**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `id`                 | `string` | Yes      | —           |
| `page`               | `number` | No       | —           |
| `limit`              | `number` | No       | —           |
| `to_date`            | `string` | No       | —           |
| `from_date`          | `string` | No       | —           |
| `send_type`          | `string` | No       | —           |
| `search_term`        | `string` | No       | —           |
| `rows_affected`      | `number` | No       | —           |
| `previous_row_count` | `number` | No       | —           |
| `body`               | `any`    | No       | —           |
| `query`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReport

`smsCampaignReport.getSmsCampaignReport`

Tool to retrieve summary report for a specific SMS campaign by ID. Use when you need detailed metrics about an SMS campaign's performance including sent count, delivery rate, clicks, and errors.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignReport({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReportClicks

`smsCampaignReport.getSmsCampaignReportClicks`

Tool to retrieve detailed click event data for links in SMS campaigns. Returns individual click records (not unique clickers) with contact information, timestamps, link details, and device/browser information. Use when you need granular click-level analytics for SMS campaign links. Note: By default, searches for clicks within the last 3 months. If the campaign wasn't sent in the specified date range, no data will be returned. If SMS recipients were added manually (not from a group), you may get click counts but not all contact details.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignReportClicks({});
```

**Input**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `id`                 | `string` | Yes      | —           |
| `page`               | `number` | No       | —           |
| `limit`              | `number` | No       | —           |
| `to_date`            | `string` | No       | —           |
| `from_date`          | `string` | No       | —           |
| `send_type`          | `string` | No       | —           |
| `search_term`        | `string` | No       | —           |
| `rows_affected`      | `number` | No       | —           |
| `previous_row_count` | `number` | No       | —           |
| `body`               | `any`    | No       | —           |
| `query`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReportFailed

`smsCampaignReport.getSmsCampaignReportFailed`

Tool to retrieve the failed delivery report for a specific SMS campaign. Use when you need to see which contacts experienced delivery failures and why. The campaign must be sent in the specified date range (defaults to last 3 months). Note: If SMS was sent using manual number entry instead of a group, only the failure count is returned without specific mobile numbers.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignReportFailed({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `id`          | `string` | Yes      | —           |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `to_date`     | `string` | No       | —           |
| `from_date`   | `string` | No       | —           |
| `send_type`   | `string` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReportSent

`smsCampaignReport.getSmsCampaignReportSent`

Tool to retrieve all contacts that an SMS campaign was sent to. Use when you need to see the list of recipients for a specific SMS campaign. The campaign must be sent in the specified date range (defaults to last 3 months). Note: If SMS was sent using manual number entry instead of a group, only the contact count is returned without specific mobile numbers.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignReportSent({});
```

**Input**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `id`                 | `string` | Yes      | —           |
| `page`               | `number` | No       | —           |
| `limit`              | `number` | No       | —           |
| `to_date`            | `string` | No       | —           |
| `from_date`          | `string` | No       | —           |
| `send_type`          | `string` | No       | —           |
| `search_term`        | `string` | No       | —           |
| `rows_affected`      | `number` | No       | —           |
| `previous_row_count` | `number` | No       | —           |
| `body`               | `any`    | No       | —           |
| `query`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReportSummary

`smsCampaignReport.getSmsCampaignReportSummary`

Retrieve aggregate summary metrics for SMS campaigns across a filtered date range. Returns total counts for sent messages, failed deliveries, clicks, unique clicks, unsubscribes, and credits consumed. Use this to get high-level performance statistics across all SMS campaigns in a given period. Default behavior: Returns aggregate metrics for the last 3 months when date parameters are not specified.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignReportSummary({});
```

**Input**

| Name          | Type               | Required | Description |
| ------------- | ------------------ | -------- | ----------- |
| `to_date`     | `string`           | No       | —           |
| `from_date`   | `string`           | No       | —           |
| `send_type`   | `string`           | No       | —           |
| `search_term` | `string`           | No       | —           |
| `id`          | `string \| number` | No       | —           |
| `body`        | `any`              | No       | —           |
| `query`       | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getSmsCampaignReportUnsubscribed

`smsCampaignReport.getSmsCampaignReportUnsubscribed`

Tool to retrieve contacts who unsubscribed from a specific SMS campaign. Use when you need to identify recipients who opted out of receiving future SMS messages. Note: For manually added numbers, only the count is returned, not individual phone numbers. Default search range is last 3 months; if campaign wasn't sent in the given range, no information will be returned.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.smsCampaignReport.getSmsCampaignReportUnsubscribed({});
```

**Input**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `id`                 | `string` | Yes      | —           |
| `page`               | `number` | No       | —           |
| `limit`              | `number` | No       | —           |
| `to_date`            | `string` | No       | —           |
| `from_date`          | `string` | No       | —           |
| `send_type`          | `string` | No       | —           |
| `search_term`        | `string` | No       | —           |
| `rows_affected`      | `number` | No       | —           |
| `previous_row_count` | `number` | No       | —           |
| `body`               | `any`    | No       | —           |
| `query`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Templates

### deleteTemplate

`templates.deleteTemplate`

Tool to remove a template from ActiveTrail account. Use when you need to delete a template that is no longer needed.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.templates.deleteTemplate({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteTemplatesTemplateCategory

`templates.deleteTemplatesTemplateCategory`

Tool to delete a template category by ID. Use when you need to remove a template category. Warning: Deleting a category will cascade-delete all templates within that category.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.templates.deleteTemplatesTemplateCategory({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getTemplateContent

`templates.getTemplateContent`

Tool to retrieve HTML content of a specific template. Use when you need to get the HTML markup or design content of a template by its ID.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.templates.getTemplateContent({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getTemplates

`templates.getTemplates`

Tool to retrieve saved templates from the ActiveTrail account. Use when you need to list all templates or search for templates by name. Supports pagination and filtering.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.templates.getTemplates({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `page`        | `number` | No       | —           |
| `limit`       | `number` | No       | —           |
| `search_term` | `string` | No       | —           |
| `body`        | `any`    | No       | —           |
| `query`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getTemplatesTemplateCategory

`templates.getTemplatesTemplateCategory`

Tool to retrieve all template categories from 'my templates' section. Use when you need to get the list of categories for organizing email templates. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.templates.getTemplatesTemplateCategory({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### postTemplatesCampaign

`templates.postTemplatesCampaign`

Creates a new email campaign from an existing template. The campaign will be created in draft status. Prerequisites: - A valid template ID (obtain from 'Get Templates' action) - A valid sending profile ID (obtain from 'Get Sending Profiles' action) Use this when you need to quickly create a campaign using a pre-designed template rather than building from scratch.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.templates.postTemplatesCampaign({});
```

**Input**

| Name               | Type               | Required | Description |
| ------------------ | ------------------ | -------- | ----------- |
| `template_id`      | `number`           | Yes      | —           |
| `campaign_details` | `object`           | Yes      | —           |
| `Id`               | `string \| number` | Yes      | —           |
| `body`             | `any`              | No       | —           |
| `query`            | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="campaign_details full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### postTemplatesTemplateCategory

`templates.postTemplatesTemplateCategory`

Tool to create a new template category in ActiveTrail. Use when you need to add a new category for organizing email templates.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.templates.postTemplatesTemplateCategory({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `name`     | `string` | Yes      | —           |
| `name_key` | `string` | No       | —           |
| `body`     | `any`    | No       | —           |
| `query`    | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateTemplate

`templates.updateTemplate`

Tool to update an existing email template in ActiveTrail account. Use this action to modify template properties including: - Template name and subject line - HTML content/body - Editor type and display settings - Template categorization - Character encoding settings All fields except 'id' are optional - only provide the fields you want to update. The template will be updated with the new values while preserving any fields not specified. Note: To update only the HTML content of a template, consider using the 'Update Template Content' action instead.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.templates.updateTemplate({});
```

**Input**

| Name                   | Type      | Required | Description |
| ---------------------- | --------- | -------- | ----------- |
| `id`                   | `number`  | Yes      | —           |
| `name`                 | `string`  | No       | —           |
| `content`              | `string`  | No       | —           |
| `subject`              | `string`  | No       | —           |
| `editor_type`          | `string`  | No       | —           |
| `AddPrintButton`       | `boolean` | No       | —           |
| `campaign_encoding`    | `number`  | No       | —           |
| `template_category_id` | `number`  | No       | —           |
| `body`                 | `any`     | No       | —           |
| `query`                | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateTemplateCategory

`templates.updateTemplateCategory`

Tool to update an existing template category in ActiveTrail. Use when you need to modify the name of a template category used for organizing email templates.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.templates.updateTemplateCategory({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `id`       | `number` | Yes      | —           |
| `name`     | `string` | Yes      | —           |
| `name_key` | `string` | No       | —           |
| `body`     | `any`    | No       | —           |
| `query`    | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateTemplateContent

`templates.updateTemplateContent`

Tool to update the HTML content of an email template in ActiveTrail. Use when you need to modify the design or layout of an existing template.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.templates.updateTemplateContent({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `id`      | `string` | Yes      | —           |
| `content` | `string` | Yes      | —           |
| `body`    | `any`    | No       | —           |
| `query`   | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## User Social

### getUserSocialAccountsGet

`userSocial.getUserSocialAccountsGet`

Retrieve social media accounts (Facebook, Instagram, etc.) connected to the ActiveTrail account. Returns a list of connected social media accounts with details like platform, username, status, and connection date. Note: Social media integration is only available for ActiveTrail Plus plan customers. #### Output | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `data` | string | Yes | Data from the action execution | | `error` | string | No | Error if any occurred during the execution of the action | | `successful` | boolean | Yes | Whether or not the action execution was successful or not |

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.userSocial.getUserSocialAccountsGet({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

## Webhooks

### createWebhook

`webhooks.createWebhook`

Create a new webhook for event notifications in ActiveTrail. Webhooks enable real-time notifications for events like contact changes or campaign activities. After creating the webhook, use the 'Update Webhook Parameter' action to add custom parameters (headers, query params, body data) if needed.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.webhooks.createWebhook({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `url`        | `string` | Yes      | —           |
| `name`       | `string` | Yes      | —           |
| `event_type` | `string` | Yes      | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteWebhook

`webhooks.deleteWebhook`

Tool to remove a webhook from ActiveTrail account by its ID. Use when you need to delete a webhook that is no longer needed.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.webhooks.deleteWebhook({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### deleteWebhooksParameters

`webhooks.deleteWebhooksParameters`

Removes a specific parameter from a webhook configuration in ActiveTrail. Use this when you need to delete custom headers, query parameters, or body parameters that were previously added to a webhook. Requires both the webhook ID and the specific parameter ID to delete.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.activetrail.api.webhooks.deleteWebhooksParameters({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `webhook_id`   | `number` | Yes      | —           |
| `parameter_id` | `number` | Yes      | —           |
| `body`         | `any`    | No       | —           |
| `query`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getWebhook

`webhooks.getWebhook`

Tool to retrieve detailed information about a specific webhook by its unique identifier. Use when you need to fetch complete webhook configuration including event type, target URL, state, and associated parameters.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.webhooks.getWebhook({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `webhook_id` | `number` | Yes      | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getWebhooks

`webhooks.getWebhooks`

Tool to list account webhooks with optional filtering. Use when you need to retrieve webhooks configured for the ActiveTrail account with filtering by event type, state, or target type.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.webhooks.getWebhooks({});
```

**Input**

| Name                   | Type      | Required | Description |
| ---------------------- | --------- | -------- | ----------- |
| `event_type`           | `string`  | No       | —           |
| `state_type`           | `string`  | No       | —           |
| `target_type`          | `string`  | No       | —           |
| `is_ignore_parameters` | `boolean` | No       | —           |
| `body`                 | `any`     | No       | —           |
| `query`                | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### getWebhooksParameters

`webhooks.getWebhooksParameters`

Retrieves custom parameters configured for a specific webhook. Parameters define additional data (headers, query parameters, or body fields) that ActiveTrail includes when calling the webhook URL. Use this to inspect webhook configuration details including parameter keys, values, types, and dynamic field mappings.

**Risk:** `read`

```ts theme={null}
await corsair.activetrail.api.webhooks.getWebhooksParameters({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `webhook_id` | `number` | Yes      | —           |
| `body`       | `any`    | No       | —           |
| `query`      | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### postWebhooksParameters

`webhooks.postWebhooksParameters`

Tool to add a new parameter to an existing webhook in your ActiveTrail account. Use when you need to configure additional parameters for webhook events, such as authentication headers, custom query parameters, or body fields. Each parameter can have either a static value or dynamically pull from contact fields.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.webhooks.postWebhooksParameters({});
```

**Input**

| Name                   | Type     | Required | Description |
| ---------------------- | -------- | -------- | ----------- |
| `key`                  | `string` | Yes      | —           |
| `value`                | `string` | Yes      | —           |
| `user_field`           | `string` | No       | —           |
| `webhook_id`           | `number` | Yes      | —           |
| `event_value_type`     | `string` | Yes      | —           |
| `event_parameter_type` | `string` | Yes      | —           |
| `body`                 | `any`    | No       | —           |
| `query`                | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### postWebhooksTest2

`webhooks.postWebhooksTest2`

Tool to send a test webhook request with configurable URL and parameters. Use when you need to validate webhook configurations by sending a test request to a specified URL with custom event types, parameters, and target types.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.webhooks.postWebhooksTest2({});
```

**Input**

| Name          | Type               | Required | Description |
| ------------- | ------------------ | -------- | ----------- |
| `url`         | `string`           | Yes      | —           |
| `format`      | `number`           | Yes      | —           |
| `user_id`     | `number`           | No       | —           |
| `event_type`  | `string`           | Yes      | —           |
| `parameters`  | `any[]`            | No       | —           |
| `target_type` | `string`           | Yes      | —           |
| `id`          | `string \| number` | No       | —           |
| `body`        | `any`              | No       | —           |
| `query`       | `object`           | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### testWebhook

`webhooks.testWebhook`

Send a test request to a configured webhook to verify it's working correctly. This action triggers a test event for the specified webhook without waiting for actual events to occur. Use this to validate that the webhook URL is reachable, properly configured, and able to receive notifications from ActiveTrail. The webhook must already exist in your ActiveTrail account.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.webhooks.testWebhook({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `number` | Yes      | —           |
| `body`  | `any`    | No       | —           |
| `query` | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateWebhook

`webhooks.updateWebhook`

Tool to update an existing webhook configuration in ActiveTrail. Use when you need to modify webhook properties such as name, URL, event type, format, or active status.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.webhooks.updateWebhook({});
```

**Input**

| Name         | Type      | Required | Description |
| ------------ | --------- | -------- | ----------- |
| `id`         | `number`  | Yes      | —           |
| `url`        | `string`  | Yes      | —           |
| `name`       | `string`  | Yes      | —           |
| `format`     | `string`  | No       | —           |
| `typeid`     | `number`  | No       | —           |
| `stateid`    | `number`  | No       | —           |
| `is_active`  | `boolean` | No       | —           |
| `event_type` | `string`  | No       | —           |
| `body`       | `any`     | No       | —           |
| `query`      | `object`  | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***

### updateWebhookParameter

`webhooks.updateWebhookParameter`

Tool to update an existing webhook parameter in your ActiveTrail account. Use when you need to modify parameter properties such as key, value, type, or field mappings for webhook events.

**Risk:** `write`

```ts theme={null}
await corsair.activetrail.api.webhooks.updateWebhookParameter({});
```

**Input**

| Name                   | Type     | Required | Description |
| ---------------------- | -------- | -------- | ----------- |
| `key`                  | `string` | No       | —           |
| `value`                | `string` | No       | —           |
| `user_field`           | `string` | No       | —           |
| `webhook_id`           | `number` | Yes      | —           |
| `parameter_id`         | `number` | Yes      | —           |
| `event_value_type`     | `string` | No       | —           |
| `event_parameter_type` | `string` | No       | —           |
| `body`                 | `any`    | No       | —           |
| `query`                | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="query full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `any`

***
