> ## 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 ActiveCampaign: every `activecampaign.api.*` operation with input and output types.

Every `activecampaign.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 Contacts

### create

`accountContacts.create`

Link a contact to an account with an optional job title

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountContacts.create({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `contact`  | `string` | Yes      | —           |
| `account`  | `string` | Yes      | —           |
| `jobTitle` | `string` | No       | —           |

**Output**

| Name             | Type     | Required | Description |
| ---------------- | -------- | -------- | ----------- |
| `accountContact` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="accountContact full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      account?: string | null,
      jobTitle?: string | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`accountContacts.delete`

Remove the link between an account and a contact

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.accountContacts.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`accountContacts.get`

Retrieve an account-contact association by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accountContacts.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name             | Type     | Required | Description |
| ---------------- | -------- | -------- | ----------- |
| `accountContact` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="accountContact full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      account?: string | null,
      jobTitle?: string | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`accountContacts.list`

List associations between accounts and contacts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accountContacts.list({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `limit`   | `number` | No       | —           |
| `offset`  | `number` | No       | —           |
| `contact` | `string` | No       | —           |
| `account` | `string` | No       | —           |

**Output**

| Name              | Type       | Required | Description |
| ----------------- | ---------- | -------- | ----------- |
| `accountContacts` | `object[]` | Yes      | —           |
| `meta`            | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="accountContacts full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      account?: string | null,
      jobTitle?: string | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`accountContacts.update`

Update an account-contact association

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountContacts.update({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `contact`  | `string` | No       | —           |
| `account`  | `string` | No       | —           |
| `jobTitle` | `string` | No       | —           |
| `id`       | `string` | Yes      | —           |

**Output**

| Name             | Type     | Required | Description |
| ---------------- | -------- | -------- | ----------- |
| `accountContact` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="accountContact full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      account?: string | null,
      jobTitle?: string | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Account Custom Field Data

### create

`accountCustomFieldData.create`

Set a custom field value on an account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.create({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `accountId`     | `number` | Yes      | —           |
| `customFieldId` | `number` | Yes      | —           |
| `fieldValue`    | `string` | Yes      | —           |

**Output**

| Name                      | Type  | Required | Description |
| ------------------------- | ----- | -------- | ----------- |
| `accountCustomFieldDatum` | `any` | Yes      | —           |

***

### createBulk

`accountCustomFieldData.createBulk`

Set many account custom field values in one request

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.createBulk({});
```

**Input**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `items` | `object[]` | Yes      | —           |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      accountId: number,
      customFieldId: number,
      fieldValue: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output:** *empty object*

***

### delete

`accountCustomFieldData.delete`

Delete a custom field value from an account

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`accountCustomFieldData.get`

Retrieve an account custom field value by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name                      | Type  | Required | Description |
| ------------------------- | ----- | -------- | ----------- |
| `accountCustomFieldDatum` | `any` | Yes      | —           |

***

### list

`accountCustomFieldData.list`

List custom field values stored against accounts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.list({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `limit`     | `number` | No       | —           |
| `offset`    | `number` | No       | —           |
| `accountId` | `string` | No       | —           |

**Output**

| Name                     | Type     | Required | Description |
| ------------------------ | -------- | -------- | ----------- |
| `accountCustomFieldData` | `any[]`  | Yes      | —           |
| `meta`                   | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`accountCustomFieldData.update`

Update a custom field value on an account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.update({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `id`         | `string` | Yes      | —           |
| `fieldValue` | `string` | Yes      | —           |

**Output**

| Name                      | Type  | Required | Description |
| ------------------------- | ----- | -------- | ----------- |
| `accountCustomFieldDatum` | `any` | Yes      | —           |

***

### updateBulk

`accountCustomFieldData.updateBulk`

Update many account custom field values in one request

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldData.updateBulk({});
```

**Input**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `items` | `object[]` | Yes      | —           |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      accountId?: number,
      customFieldId?: number,
      fieldValue?: string,
      id: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output:** *empty object*

***

## Account Custom Field Meta

### create

`accountCustomFieldMeta.create`

Define a new custom field for accounts

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldMeta.create({});
```

**Input**

| Name                   | Type       | Required | Description |
| ---------------------- | ---------- | -------- | ----------- |
| `fieldLabel`           | `string`   | Yes      | —           |
| `fieldType`            | `string`   | Yes      | —           |
| `fieldOptions`         | `string[]` | No       | —           |
| `fieldDefault`         | `string`   | No       | —           |
| `fieldDefaultCurrency` | `string`   | No       | —           |
| `isFormVisible`        | `number`   | No       | —           |
| `isRequired`           | `number`   | No       | —           |
| `displayOrder`         | `number`   | No       | —           |

**Output**

| Name                      | Type     | Required | Description |
| ------------------------- | -------- | -------- | ----------- |
| `accountCustomFieldMetum` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="accountCustomFieldMetum full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`accountCustomFieldMeta.delete`

Delete an account custom field definition

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldMeta.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`accountCustomFieldMeta.get`

Retrieve an account custom field definition by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldMeta.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name                      | Type     | Required | Description |
| ------------------------- | -------- | -------- | ----------- |
| `accountCustomFieldMetum` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="accountCustomFieldMetum full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`accountCustomFieldMeta.list`

List custom field definitions for accounts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldMeta.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                     | Type       | Required | Description |
| ------------------------ | ---------- | -------- | ----------- |
| `accountCustomFieldMeta` | `object[]` | Yes      | —           |
| `meta`                   | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="accountCustomFieldMeta full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`accountCustomFieldMeta.update`

Update an account custom field definition

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accountCustomFieldMeta.update({});
```

**Input**

| Name                   | Type       | Required | Description |
| ---------------------- | ---------- | -------- | ----------- |
| `fieldLabel`           | `string`   | No       | —           |
| `fieldType`            | `string`   | No       | —           |
| `fieldOptions`         | `string[]` | No       | —           |
| `fieldDefault`         | `string`   | No       | —           |
| `fieldDefaultCurrency` | `string`   | No       | —           |
| `isFormVisible`        | `number`   | No       | —           |
| `isRequired`           | `number`   | No       | —           |
| `displayOrder`         | `number`   | No       | —           |
| `id`                   | `string`   | Yes      | —           |

**Output**

| Name                      | Type     | Required | Description |
| ------------------------- | -------- | -------- | ----------- |
| `accountCustomFieldMetum` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="accountCustomFieldMetum full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Accounts

### create

`accounts.create`

Create a CRM account with a unique name

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accounts.create({});
```

**Input**

| Name         | Type       | Required | Description |
| ------------ | ---------- | -------- | ----------- |
| `name`       | `string`   | Yes      | —           |
| `accountUrl` | `string`   | No       | —           |
| `owner`      | `string`   | No       | —           |
| `fields`     | `object[]` | No       | —           |

<AccordionGroup>
  <Accordion title="fields full type">
    ```ts theme={null}
    {
      customFieldId: number,
      fieldValue: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `account` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      accountUrl?: string | null,
      owner?: string | null,
      contactCount?: string | number | null,
      dealCount?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`accounts.delete`

Delete a CRM account and its associated data

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.accounts.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### deleteBulk

`accounts.deleteBulk`

Delete many CRM accounts in one request

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.accounts.deleteBulk({});
```

**Input**

| Name  | Type                   | Required | Description |
| ----- | ---------------------- | -------- | ----------- |
| `ids` | `(string \| number)[]` | Yes      | —           |

**Output**

| Name  | Type                   | Required | Description |
| ----- | ---------------------- | -------- | ----------- |
| `ids` | `(string \| number)[]` | Yes      | —           |

***

### get

`accounts.get`

Retrieve a CRM account by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accounts.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `account` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      accountUrl?: string | null,
      owner?: string | null,
      contactCount?: string | number | null,
      dealCount?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`accounts.list`

List CRM accounts, optionally filtered by name

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.accounts.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `search` | `string` | No       | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `accounts` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="accounts full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      accountUrl?: string | null,
      owner?: string | null,
      contactCount?: string | number | null,
      dealCount?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`accounts.update`

Update an existing CRM account by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accounts.update({});
```

**Input**

| Name         | Type       | Required | Description |
| ------------ | ---------- | -------- | ----------- |
| `name`       | `string`   | No       | —           |
| `accountUrl` | `string`   | No       | —           |
| `owner`      | `string`   | No       | —           |
| `fields`     | `object[]` | No       | —           |
| `id`         | `string`   | Yes      | —           |

<AccordionGroup>
  <Accordion title="fields full type">
    ```ts theme={null}
    {
      customFieldId: number,
      fieldValue: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `account` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      accountUrl?: string | null,
      owner?: string | null,
      contactCount?: string | number | null,
      dealCount?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### upsert

`accounts.upsert`

Create a CRM account, or update the one with the same name

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.accounts.upsert({});
```

**Input**

| Name         | Type       | Required | Description |
| ------------ | ---------- | -------- | ----------- |
| `name`       | `string`   | Yes      | —           |
| `accountUrl` | `string`   | No       | —           |
| `owner`      | `string`   | No       | —           |
| `fields`     | `object[]` | No       | —           |

<AccordionGroup>
  <Accordion title="fields full type">
    ```ts theme={null}
    {
      customFieldId: number,
      fieldValue: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `account` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      accountUrl?: string | null,
      owner?: string | null,
      contactCount?: string | number | null,
      dealCount?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Activities

### list

`activities.list`

List account activity, optionally narrowed to one contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.activities.list({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `limit`   | `number` | No       | —           |
| `offset`  | `number` | No       | —           |
| `contact` | `string` | No       | —           |
| `after`   | `string` | No       | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `activities` | `any[]`  | Yes      | —           |
| `meta`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Addresses

### create

`addresses.create`

Create a company address for campaign footers

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.addresses.create({});
```

**Input**

| Name          | Type      | Required | Description |
| ------------- | --------- | -------- | ----------- |
| `companyName` | `string`  | Yes      | —           |
| `address1`    | `string`  | Yes      | —           |
| `address2`    | `string`  | No       | —           |
| `city`        | `string`  | Yes      | —           |
| `state`       | `string`  | No       | —           |
| `zip`         | `string`  | No       | —           |
| `country`     | `string`  | Yes      | —           |
| `allgroups`   | `boolean` | No       | —           |
| `groupid`     | `string`  | No       | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `address` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="address full type">
    ```ts theme={null}
    {
      id: string,
      companyName?: string | null,
      address1?: string | null,
      address2?: string | null,
      city?: string | null,
      state?: string | null,
      district?: string | null,
      zip?: string | null,
      country?: string | null,
      isDefault?: string | number | null,
      allgroup?: string | null,
      smsName?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`addresses.delete`

Delete a company address by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.addresses.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`addresses.get`

Retrieve a company address by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.addresses.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `address` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="address full type">
    ```ts theme={null}
    {
      id: string,
      companyName?: string | null,
      address1?: string | null,
      address2?: string | null,
      city?: string | null,
      state?: string | null,
      district?: string | null,
      zip?: string | null,
      country?: string | null,
      isDefault?: string | number | null,
      allgroup?: string | null,
      smsName?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`addresses.list`

List the company addresses used in campaigns

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.addresses.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name        | Type       | Required | Description |
| ----------- | ---------- | -------- | ----------- |
| `addresses` | `object[]` | Yes      | —           |
| `meta`      | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="addresses full type">
    ```ts theme={null}
    {
      id: string,
      companyName?: string | null,
      address1?: string | null,
      address2?: string | null,
      city?: string | null,
      state?: string | null,
      district?: string | null,
      zip?: string | null,
      country?: string | null,
      isDefault?: string | number | null,
      allgroup?: string | null,
      smsName?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`addresses.update`

Update an existing company address

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.addresses.update({});
```

**Input**

| Name          | Type      | Required | Description |
| ------------- | --------- | -------- | ----------- |
| `companyName` | `string`  | No       | —           |
| `address1`    | `string`  | No       | —           |
| `address2`    | `string`  | No       | —           |
| `city`        | `string`  | No       | —           |
| `state`       | `string`  | No       | —           |
| `zip`         | `string`  | No       | —           |
| `country`     | `string`  | No       | —           |
| `allgroups`   | `boolean` | No       | —           |
| `groupid`     | `string`  | No       | —           |
| `id`          | `string`  | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `address` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="address full type">
    ```ts theme={null}
    {
      id: string,
      companyName?: string | null,
      address1?: string | null,
      address2?: string | null,
      city?: string | null,
      state?: string | null,
      district?: string | null,
      zip?: string | null,
      country?: string | null,
      isDefault?: string | number | null,
      allgroup?: string | null,
      smsName?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Address Groups

### delete

`addressGroups.delete`

Delete an address group by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.addressGroups.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

## Automations

### list

`automations.list`

List automation workflows

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.automations.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `automations` | `object[]` | Yes      | —           |
| `meta`        | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="automations full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      status?: string | null,
      entered?: string | null,
      exited?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Brandings

### get

`brandings.get`

Retrieve a branding configuration by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.brandings.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `branding` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="branding full type">
    ```ts theme={null}
    {
      id: string,
      siteName?: string | null,
      groupid?: string | null,
      siteLogo?: string | null,
      siteLogoSmall?: string | null,
      favicon?: string | null,
      copyright?: string | null,
      license?: string | null,
      help?: string | null,
      version?: string | null,
      headerHtmlValue?: string | null,
      headerTextValue?: string | null,
      footerHtmlValue?: string | null,
      footerTextValue?: string | null,
      publicTemplateCss?: string | null,
      publicTemplateHtm?: string | null,
      adminTemplateCss?: string | null,
      adminTemplateHtm?: string | null,
      admin_template_css_backup?: string | null,
      admin_template_htm_backup?: string | null,
      zendeskWidgetEnabled?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`brandings.update`

Update branding such as site name, logo and favicon

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.brandings.update({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `siteName`  | `string` | No       | —           |
| `siteLogo`  | `string` | No       | —           |
| `favicon`   | `string` | No       | —           |
| `copyright` | `string` | No       | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `branding` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="branding full type">
    ```ts theme={null}
    {
      id: string,
      siteName?: string | null,
      groupid?: string | null,
      siteLogo?: string | null,
      siteLogoSmall?: string | null,
      favicon?: string | null,
      copyright?: string | null,
      license?: string | null,
      help?: string | null,
      version?: string | null,
      headerHtmlValue?: string | null,
      headerTextValue?: string | null,
      footerHtmlValue?: string | null,
      footerTextValue?: string | null,
      publicTemplateCss?: string | null,
      publicTemplateHtm?: string | null,
      adminTemplateCss?: string | null,
      adminTemplateHtm?: string | null,
      admin_template_css_backup?: string | null,
      admin_template_htm_backup?: string | null,
      zendeskWidgetEnabled?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Browse Sessions

### addToCart

`browseSessions.addToCart`

Flag a browse session as having items added to cart

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.browseSessions.addToCart({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `connectionId` | `string` | Yes      | —           |
| `email`        | `string` | Yes      | —           |

**Output:** *empty object*

***

### save

`browseSessions.save`

Create a browse session in a specified state

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.browseSessions.save({});
```

**Input**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `connectionId` | `string`   | Yes      | —           |
| `email`        | `string`   | Yes      | —           |
| `status`       | `string`   | Yes      | —           |
| `products`     | `object[]` | No       | —           |

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

**Output:** *empty object*

***

### search

`browseSessions.search`

Search browse sessions for a contact and connection

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.browseSessions.search({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `connectionId` | `string` | Yes      | —           |
| `email`        | `string` | No       | —           |
| `status`       | `string` | No       | —           |

**Output**

| Name             | Type    | Required | Description |
| ---------------- | ------- | -------- | ----------- |
| `browseSessions` | `any[]` | No       | —           |

***

### testEvent

`browseSessions.testEvent`

Simulate a tracking event and return its debug output

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.browseSessions.testEvent({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `connectionId` | `string` | Yes      | —           |
| `url`          | `string` | Yes      | —           |
| `email`        | `string` | No       | —           |

**Output:** *empty object*

***

## Calendars

### create

`calendars.create`

Create a calendar feed for external calendar apps

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.calendars.create({});
```

**Input**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `title`       | `string`   | Yes      | —           |
| `type`        | `string`   | No       | —           |
| `description` | `string`   | No       | —           |
| `isglobal`    | `boolean`  | No       | —           |
| `inviteusers` | `string[]` | No       | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `calendar` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="calendar full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      type?: string | null,
      token?: string | null,
      userid?: string | null,
      notification?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`calendars.delete`

Delete a calendar feed by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.calendars.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`calendars.get`

Retrieve a calendar feed by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.calendars.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `calendar` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="calendar full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      type?: string | null,
      token?: string | null,
      userid?: string | null,
      notification?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`calendars.list`

List calendar feeds configured on the account

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.calendars.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name        | Type       | Required | Description |
| ----------- | ---------- | -------- | ----------- |
| `calendars` | `object[]` | Yes      | —           |
| `meta`      | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="calendars full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      type?: string | null,
      token?: string | null,
      userid?: string | null,
      notification?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`calendars.update`

Update a calendar feed by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.calendars.update({});
```

**Input**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `title`       | `string`   | No       | —           |
| `type`        | `string`   | No       | —           |
| `description` | `string`   | No       | —           |
| `isglobal`    | `boolean`  | No       | —           |
| `inviteusers` | `string[]` | No       | —           |
| `id`          | `string`   | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `calendar` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="calendar full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      type?: string | null,
      token?: string | null,
      userid?: string | null,
      notification?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Campaigns

### create

`campaigns.create`

Create a broadcast or automation campaign

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.campaigns.create({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `type`      | `string` | Yes      | —           |
| `name`      | `string` | Yes      | —           |
| `status`    | `number` | No       | —           |
| `sdate`     | `string` | No       | —           |
| `segmentid` | `number` | No       | —           |
| `p`         | `object` | No       | —           |
| `m`         | `object` | No       | —           |

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

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

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `campaign` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="campaign full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      type?: string | null,
      status?: string | null,
      sdate?: string | null,
      mdate?: string | null,
      ldate?: string | null,
      send_amt?: string | null,
      total_amt?: string | null,
      opens?: string | null,
      uniqueopens?: string | null,
      linkclicks?: string | null,
      uniquelinkclicks?: string | null,
      subscriberclicks?: string | null,
      unsubscribes?: string | null,
      hardbounces?: string | null,
      softbounces?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### duplicate

`campaigns.duplicate`

Duplicate a campaign with its content and configuration

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.campaigns.duplicate({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `campaign` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="campaign full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      type?: string | null,
      status?: string | null,
      sdate?: string | null,
      mdate?: string | null,
      ldate?: string | null,
      send_amt?: string | null,
      total_amt?: string | null,
      opens?: string | null,
      uniqueopens?: string | null,
      linkclicks?: string | null,
      uniquelinkclicks?: string | null,
      subscriberclicks?: string | null,
      unsubscribes?: string | null,
      hardbounces?: string | null,
      softbounces?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### get

`campaigns.get`

Retrieve a campaign by its ID with engagement metrics

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `campaign` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="campaign full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      type?: string | null,
      status?: string | null,
      sdate?: string | null,
      mdate?: string | null,
      ldate?: string | null,
      send_amt?: string | null,
      total_amt?: string | null,
      opens?: string | null,
      uniqueopens?: string | null,
      linkclicks?: string | null,
      uniquelinkclicks?: string | null,
      subscriberclicks?: string | null,
      unsubscribes?: string | null,
      hardbounces?: string | null,
      softbounces?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getAutomationLists

`campaigns.getAutomationLists`

List the lists a campaign automation sends to

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.getAutomationLists({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `campaignLists` | `any[]`  | Yes      | —           |
| `meta`          | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getAutomations

`campaigns.getAutomations`

List automations linked to a campaign

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.getAutomations({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `automations` | `any[]`  | Yes      | —           |
| `meta`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getLinks

`campaigns.getLinks`

List the tracked links belonging to a campaign

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.getLinks({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `links` | `any[]`  | Yes      | —           |
| `meta`  | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getMessages

`campaigns.getMessages`

List the messages attached to a campaign

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.getMessages({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name               | Type     | Required | Description |
| ------------------ | -------- | -------- | ----------- |
| `campaignMessages` | `any[]`  | Yes      | —           |
| `meta`             | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getUser

`campaigns.getUser`

Retrieve the user who owns a campaign

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.getUser({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name   | Type  | Required | Description |
| ------ | ----- | -------- | ----------- |
| `user` | `any` | Yes      | —           |

***

### list

`campaigns.list`

List campaigns with pagination and filters

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.campaigns.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `type`   | `string` | No       | —           |
| `status` | `string` | No       | —           |

**Output**

| Name        | Type       | Required | Description |
| ----------- | ---------- | -------- | ----------- |
| `campaigns` | `object[]` | Yes      | —           |
| `meta`      | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="campaigns full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      type?: string | null,
      status?: string | null,
      sdate?: string | null,
      mdate?: string | null,
      ldate?: string | null,
      send_amt?: string | null,
      total_amt?: string | null,
      opens?: string | null,
      uniqueopens?: string | null,
      linkclicks?: string | null,
      uniquelinkclicks?: string | null,
      subscriberclicks?: string | null,
      unsubscribes?: string | null,
      hardbounces?: string | null,
      softbounces?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`campaigns.update`

Edit an existing campaign, such as its name

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.campaigns.update({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `name`   | `string` | No       | —           |
| `status` | `number` | No       | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `campaign` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="campaign full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      type?: string | null,
      status?: string | null,
      sdate?: string | null,
      mdate?: string | null,
      ldate?: string | null,
      send_amt?: string | null,
      total_amt?: string | null,
      opens?: string | null,
      uniqueopens?: string | null,
      linkclicks?: string | null,
      uniquelinkclicks?: string | null,
      subscriberclicks?: string | null,
      unsubscribes?: string | null,
      hardbounces?: string | null,
      softbounces?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Configs

### update

`configs.update`

Update an account configuration value

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.configs.update({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `value` | `string` | Yes      | —           |

**Output**

| Name     | Type  | Required | Description |
| -------- | ----- | -------- | ----------- |
| `config` | `any` | Yes      | —           |

***

## Connections

### create

`connections.create`

Create a connection to an external e-commerce service

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.connections.create({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `service`    | `string` | Yes      | —           |
| `externalid` | `string` | Yes      | —           |
| `name`       | `string` | Yes      | —           |
| `logoUrl`    | `string` | No       | —           |
| `linkUrl`    | `string` | No       | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `connection` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="connection full type">
    ```ts theme={null}
    {
      id: string,
      service?: string | null,
      serviceName?: string | null,
      externalid?: string | null,
      name?: string | null,
      logoUrl?: string | null,
      linkUrl?: string | null,
      status?: string | null,
      syncStatus?: string | null,
      connectionType?: string | null,
      isInternal?: string | number | null,
      listId?: string | number | null,
      planTier?: string | null,
      lastSync?: string | null,
      sync_request_time?: string | null,
      sync_start_time?: string | null,
      credentialExpiration?: string | null,
      disconnectDate?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`connections.delete`

Delete a connection by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.connections.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`connections.get`

Retrieve a connection by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.connections.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `connection` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="connection full type">
    ```ts theme={null}
    {
      id: string,
      service?: string | null,
      serviceName?: string | null,
      externalid?: string | null,
      name?: string | null,
      logoUrl?: string | null,
      linkUrl?: string | null,
      status?: string | null,
      syncStatus?: string | null,
      connectionType?: string | null,
      isInternal?: string | number | null,
      listId?: string | number | null,
      planTier?: string | null,
      lastSync?: string | null,
      sync_request_time?: string | null,
      sync_start_time?: string | null,
      credentialExpiration?: string | null,
      disconnectDate?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`connections.list`

List Deep Data connections to external services

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.connections.list({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `limit`      | `number` | No       | —           |
| `offset`     | `number` | No       | —           |
| `service`    | `string` | No       | —           |
| `externalid` | `string` | No       | —           |

**Output**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `connections` | `object[]` | Yes      | —           |
| `meta`        | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="connections full type">
    ```ts theme={null}
    {
      id: string,
      service?: string | null,
      serviceName?: string | null,
      externalid?: string | null,
      name?: string | null,
      logoUrl?: string | null,
      linkUrl?: string | null,
      status?: string | null,
      syncStatus?: string | null,
      connectionType?: string | null,
      isInternal?: string | number | null,
      listId?: string | number | null,
      planTier?: string | null,
      lastSync?: string | null,
      sync_request_time?: string | null,
      sync_start_time?: string | null,
      credentialExpiration?: string | null,
      disconnectDate?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`connections.update`

Update an existing connection

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.connections.update({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `service`    | `string` | No       | —           |
| `externalid` | `string` | No       | —           |
| `name`       | `string` | No       | —           |
| `logoUrl`    | `string` | No       | —           |
| `linkUrl`    | `string` | No       | —           |
| `id`         | `string` | Yes      | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `connection` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="connection full type">
    ```ts theme={null}
    {
      id: string,
      service?: string | null,
      serviceName?: string | null,
      externalid?: string | null,
      name?: string | null,
      logoUrl?: string | null,
      linkUrl?: string | null,
      status?: string | null,
      syncStatus?: string | null,
      connectionType?: string | null,
      isInternal?: string | number | null,
      listId?: string | number | null,
      planTier?: string | null,
      lastSync?: string | null,
      sync_request_time?: string | null,
      sync_start_time?: string | null,
      credentialExpiration?: string | null,
      disconnectDate?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Contact Automations

### add

`contactAutomations.add`

Enrol a contact in an automation by email address

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.contactAutomations.add({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `email`         | `string` | Yes      | —           |
| `automation_id` | `string` | Yes      | —           |

**Output**

| Name                | Type  | Required | Description |
| ------------------- | ----- | -------- | ----------- |
| `contactAutomation` | `any` | Yes      | —           |

***

### entryCounts

`contactAutomations.entryCounts`

Count how many times a contact entered each automation

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactAutomations.entryCounts({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output:** *empty object*

***

### get

`contactAutomations.get`

Retrieve a contact automation enrolment by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactAutomations.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name                | Type  | Required | Description |
| ------------------- | ----- | -------- | ----------- |
| `contactAutomation` | `any` | Yes      | —           |

***

### list

`contactAutomations.list`

List contact enrolments across automations

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactAutomations.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `contactAutomations` | `any[]`  | Yes      | —           |
| `meta`               | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### remove

`contactAutomations.remove`

Remove a contact from an automation, one run or all

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.contactAutomations.remove({});
```

**Input**

| Name                | Type          | Required | Description |
| ------------------- | ------------- | -------- | ----------- |
| `email`             | `string`      | Yes      | —           |
| `automation_id`     | `string`      | Yes      | —           |
| `run_remove_option` | `all \| last` | No       | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `removed` | `number` | Yes      | —           |

***

## Contact Deals

### create

`contactDeals.create`

Add a secondary contact to a deal

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.contactDeals.create({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `contact`  | `string` | Yes      | —           |
| `deal`     | `string` | Yes      | —           |
| `role`     | `string` | No       | —           |
| `jobTitle` | `string` | No       | —           |

**Output**

| Name          | Type  | Required | Description |
| ------------- | ----- | -------- | ----------- |
| `contactDeal` | `any` | Yes      | —           |

***

### delete

`contactDeals.delete`

Remove a secondary contact from a deal

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.contactDeals.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`contactDeals.get`

Retrieve a secondary contact association by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactDeals.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name          | Type  | Required | Description |
| ------------- | ----- | -------- | ----------- |
| `contactDeal` | `any` | Yes      | —           |

***

### list

`contactDeals.list`

List secondary contacts associated with deals

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactDeals.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `contactDeals` | `any[]`  | Yes      | —           |
| `meta`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`contactDeals.update`

Update a secondary contact association

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.contactDeals.update({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `contact`  | `string` | No       | —           |
| `deal`     | `string` | No       | —           |
| `role`     | `string` | No       | —           |
| `jobTitle` | `string` | No       | —           |
| `id`       | `string` | Yes      | —           |

**Output**

| Name          | Type  | Required | Description |
| ------------- | ----- | -------- | ----------- |
| `contactDeal` | `any` | Yes      | —           |

***

## Contact Lists

### list

`contactLists.list`

List all contact-to-list memberships

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactLists.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `contactLists` | `object[]` | Yes      | —           |
| `meta`         | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contactLists full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      list?: string | null,
      status?: string | null,
      form?: string | null,
      seriesid?: string | null,
      sdate?: string | null,
      udate?: string | null,
      responder?: string | null,
      sync?: string | null,
      unsubreason?: string | null,
      campaign?: string | null,
      message?: string | null,
      first_name?: string | null,
      last_name?: string | null,
      ip4Sub?: string | null,
      ip4Unsub?: string | null,
      ip4_last?: string | null,
      sourceid?: string | null,
      autosyncLog?: string | null,
      unsubscribeAutomation?: string | null,
      automation?: string | null,
      channel?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Contacts

### createOrUpdate

`contacts.createOrUpdate`

Create a contact, or update it if the email already exists

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.contacts.createOrUpdate({});
```

**Input**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `email`       | `string`   | Yes      | —           |
| `firstName`   | `string`   | No       | —           |
| `lastName`    | `string`   | No       | —           |
| `phone`       | `string`   | No       | —           |
| `fieldValues` | `object[]` | No       | —           |

<AccordionGroup>
  <Accordion title="fieldValues full type">
    ```ts theme={null}
    {
      field: string,
      value: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `contact` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="contact full type">
    ```ts theme={null}
    {
      id: string,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      orgid?: string | null,
      orgname?: string | null,
      organization?: string | null,
      cdate?: string | null,
      udate?: string | null,
      adate?: string | null,
      edate?: string | null,
      hash?: string | null,
      ip?: string | null,
      ua?: string | null,
      gravatar?: string | null,
      deleted?: string | null,
      deleted_at?: string | null,
      anonymized?: string | null,
      email_local?: string | null,
      email_domain?: string | null,
      segmentio_id?: string | null,
      bounced_hard?: string | null,
      bounced_soft?: string | null,
      bounced_date?: string | null,
      sentcnt?: string | null,
      rating_tstamp?: string | null,
      socialdata_lastcheck?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      mpp_tracking?: string | null,
      last_click_date?: string | null,
      last_open_date?: string | null,
      last_mpp_open_date?: string | null,
      best_send_hour?: string | null,
      sms_consent?: string | null,
      sms_consent_updated_at?: string | null,
      whatsapp_id?: string | null,
      whatsapp_username?: string | null,
      scoreValues?: any | null,
      accountContacts?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`contacts.delete`

Delete a contact by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.contacts.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### find

`contacts.find`

Find a contact by email address

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.find({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `email` | `string` | Yes      | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `contacts` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contacts full type">
    ```ts theme={null}
    {
      id: string,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      orgid?: string | null,
      orgname?: string | null,
      organization?: string | null,
      cdate?: string | null,
      udate?: string | null,
      adate?: string | null,
      edate?: string | null,
      hash?: string | null,
      ip?: string | null,
      ua?: string | null,
      gravatar?: string | null,
      deleted?: string | null,
      deleted_at?: string | null,
      anonymized?: string | null,
      email_local?: string | null,
      email_domain?: string | null,
      segmentio_id?: string | null,
      bounced_hard?: string | null,
      bounced_soft?: string | null,
      bounced_date?: string | null,
      sentcnt?: string | null,
      rating_tstamp?: string | null,
      socialdata_lastcheck?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      mpp_tracking?: string | null,
      last_click_date?: string | null,
      last_open_date?: string | null,
      last_mpp_open_date?: string | null,
      best_send_hour?: string | null,
      sms_consent?: string | null,
      sms_consent_updated_at?: string | null,
      whatsapp_id?: string | null,
      whatsapp_username?: string | null,
      scoreValues?: any | null,
      accountContacts?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### get

`contacts.get`

Retrieve a contact by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.get({});
```

**Input**

| Name          | Type      | Required | Description |
| ------------- | --------- | -------- | ----------- |
| `id`          | `string`  | Yes      | —           |
| `automations` | `boolean` | No       | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `contact`         | `object` | Yes      | —           |
| `contactLists`    | `any`    | No       | —           |
| `fieldValues`     | `any`    | No       | —           |
| `geoIps`          | `any`    | No       | —           |
| `deals`           | `any`    | No       | —           |
| `accountContacts` | `any`    | No       | —           |

<AccordionGroup>
  <Accordion title="contact full type">
    ```ts theme={null}
    {
      id: string,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      orgid?: string | null,
      orgname?: string | null,
      organization?: string | null,
      cdate?: string | null,
      udate?: string | null,
      adate?: string | null,
      edate?: string | null,
      hash?: string | null,
      ip?: string | null,
      ua?: string | null,
      gravatar?: string | null,
      deleted?: string | null,
      deleted_at?: string | null,
      anonymized?: string | null,
      email_local?: string | null,
      email_domain?: string | null,
      segmentio_id?: string | null,
      bounced_hard?: string | null,
      bounced_soft?: string | null,
      bounced_date?: string | null,
      sentcnt?: string | null,
      rating_tstamp?: string | null,
      socialdata_lastcheck?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      mpp_tracking?: string | null,
      last_click_date?: string | null,
      last_open_date?: string | null,
      last_mpp_open_date?: string | null,
      best_send_hour?: string | null,
      sms_consent?: string | null,
      sms_consent_updated_at?: string | null,
      whatsapp_id?: string | null,
      whatsapp_username?: string | null,
      scoreValues?: any | null,
      accountContacts?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getAccountContacts

`contacts.getAccountContacts`

List the accounts a contact is associated with

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getAccountContacts({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `accountContacts` | `any[]`  | Yes      | —           |
| `meta`            | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getAutomations

`contacts.getAutomations`

List the automations a contact is enrolled in

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getAutomations({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `contactAutomations` | `any[]`  | Yes      | —           |
| `meta`               | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getData

`contacts.getData`

Retrieve the geographic and tracking data of a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getData({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name           | Type  | Required | Description |
| -------------- | ----- | -------- | ----------- |
| `contactDatum` | `any` | No       | —           |

***

### getDeals

`contacts.getDeals`

List the deals associated with a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getDeals({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `deals` | `any[]`  | Yes      | —           |
| `meta`  | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getFieldValues

`contacts.getFieldValues`

List the custom field values of a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getFieldValues({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `fieldValues` | `any[]`  | Yes      | —           |
| `meta`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getGeoIps

`contacts.getGeoIps`

List the geo IP records associated with a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getGeoIps({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `geoIps` | `any[]`  | Yes      | —           |
| `meta`   | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getGoals

`contacts.getGoals`

List the automation goals a contact has completed

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getGoals({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `contactGoals` | `any[]`  | Yes      | —           |
| `meta`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getLists

`contacts.getLists`

List the list memberships of a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getLists({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `contactLists` | `object[]` | Yes      | —           |
| `meta`         | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contactLists full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      list?: string | null,
      status?: string | null,
      form?: string | null,
      seriesid?: string | null,
      sdate?: string | null,
      udate?: string | null,
      responder?: string | null,
      sync?: string | null,
      unsubreason?: string | null,
      campaign?: string | null,
      message?: string | null,
      first_name?: string | null,
      last_name?: string | null,
      ip4Sub?: string | null,
      ip4Unsub?: string | null,
      ip4_last?: string | null,
      sourceid?: string | null,
      autosyncLog?: string | null,
      unsubscribeAutomation?: string | null,
      automation?: string | null,
      channel?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getLogs

`contacts.getLogs`

List the activity log entries for a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getLogs({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `contactLogs` | `any[]`  | Yes      | —           |
| `meta`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getNotes

`contacts.getNotes`

List the notes attached to a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getNotes({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `notes` | `any[]`  | Yes      | —           |
| `meta`  | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getOrganization

`contacts.getOrganization`

Retrieve the organization a contact belongs to

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getOrganization({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name           | Type  | Required | Description |
| -------------- | ----- | -------- | ----------- |
| `organization` | `any` | No       | —           |

***

### getPlusAppend

`contacts.getPlusAppend`

Retrieve third-party enrichment data for a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getPlusAppend({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name         | Type  | Required | Description |
| ------------ | ----- | -------- | ----------- |
| `plusAppend` | `any` | No       | —           |

***

### getScoreValues

`contacts.getScoreValues`

List the score values of a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getScoreValues({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `scoreValues` | `any[]`  | Yes      | —           |
| `meta`        | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getTags

`contacts.getTags`

List the tags applied to a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getTags({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `contactTags` | `object[]` | Yes      | —           |
| `meta`        | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contactTags full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      tag?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getTrackingLogs

`contacts.getTrackingLogs`

List site and event tracking records for a contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.getTrackingLogs({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `trackingLogs` | `any[]`  | Yes      | —           |
| `meta`         | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`contacts.list`

List contacts with pagination and filters

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contacts.list({});
```

**Input**

| Name         | Type          | Required | Description |
| ------------ | ------------- | -------- | ----------- |
| `limit`      | `number`      | No       | —           |
| `offset`     | `number`      | No       | —           |
| `email`      | `string`      | No       | —           |
| `search`     | `string`      | No       | —           |
| `listid`     | `string`      | No       | —           |
| `tagid`      | `string`      | No       | —           |
| `segmentid`  | `string`      | No       | —           |
| `status`     | `number`      | No       | —           |
| `id_greater` | `string`      | No       | —           |
| `orders_id`  | `ASC \| DESC` | No       | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `contacts` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contacts full type">
    ```ts theme={null}
    {
      id: string,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      orgid?: string | null,
      orgname?: string | null,
      organization?: string | null,
      cdate?: string | null,
      udate?: string | null,
      adate?: string | null,
      edate?: string | null,
      hash?: string | null,
      ip?: string | null,
      ua?: string | null,
      gravatar?: string | null,
      deleted?: string | null,
      deleted_at?: string | null,
      anonymized?: string | null,
      email_local?: string | null,
      email_domain?: string | null,
      segmentio_id?: string | null,
      bounced_hard?: string | null,
      bounced_soft?: string | null,
      bounced_date?: string | null,
      sentcnt?: string | null,
      rating_tstamp?: string | null,
      socialdata_lastcheck?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      mpp_tracking?: string | null,
      last_click_date?: string | null,
      last_open_date?: string | null,
      last_mpp_open_date?: string | null,
      best_send_hour?: string | null,
      sms_consent?: string | null,
      sms_consent_updated_at?: string | null,
      whatsapp_id?: string | null,
      whatsapp_username?: string | null,
      scoreValues?: any | null,
      accountContacts?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`contacts.update`

Update an existing contact by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.contacts.update({});
```

**Input**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `id`          | `string`   | Yes      | —           |
| `email`       | `string`   | No       | —           |
| `firstName`   | `string`   | No       | —           |
| `lastName`    | `string`   | No       | —           |
| `phone`       | `string`   | No       | —           |
| `fieldValues` | `object[]` | No       | —           |

<AccordionGroup>
  <Accordion title="fieldValues full type">
    ```ts theme={null}
    {
      field: string,
      value: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `contact` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="contact full type">
    ```ts theme={null}
    {
      id: string,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      orgid?: string | null,
      orgname?: string | null,
      organization?: string | null,
      cdate?: string | null,
      udate?: string | null,
      adate?: string | null,
      edate?: string | null,
      hash?: string | null,
      ip?: string | null,
      ua?: string | null,
      gravatar?: string | null,
      deleted?: string | null,
      deleted_at?: string | null,
      anonymized?: string | null,
      email_local?: string | null,
      email_domain?: string | null,
      segmentio_id?: string | null,
      bounced_hard?: string | null,
      bounced_soft?: string | null,
      bounced_date?: string | null,
      sentcnt?: string | null,
      rating_tstamp?: string | null,
      socialdata_lastcheck?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      mpp_tracking?: string | null,
      last_click_date?: string | null,
      last_open_date?: string | null,
      last_mpp_open_date?: string | null,
      best_send_hour?: string | null,
      sms_consent?: string | null,
      sms_consent_updated_at?: string | null,
      whatsapp_id?: string | null,
      whatsapp_username?: string | null,
      scoreValues?: any | null,
      accountContacts?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Contact Tags

### list

`contactTags.list`

List all contact-to-tag associations

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactTags.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `contactTags` | `object[]` | Yes      | —           |
| `meta`        | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contactTags full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      tag?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Contact Tasks

### create

`contactTasks.create`

Create a task against a contact

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.contactTasks.create({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `contactId`  | `string` | Yes      | —           |
| `title`      | `string` | Yes      | —           |
| `taskTypeId` | `string` | Yes      | —           |
| `dueDate`    | `string` | Yes      | —           |
| `note`       | `string` | No       | —           |
| `assignee`   | `string` | No       | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `dealTask` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTask full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      note?: string | null,
      relid?: string | null,
      reltype?: string | null,
      dealtasktype?: string | null,
      duedate?: string | null,
      done?: string | null,
      status?: string | null,
      owner?: string | null,
      cdate?: string | null,
      edate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### find

`contactTasks.find`

Find contact tasks by title, optionally for one contact

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.contactTasks.find({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `title`     | `string` | Yes      | —           |
| `contactId` | `string` | No       | —           |

**Output**

| Name        | Type    | Required | Description |
| ----------- | ------- | -------- | ----------- |
| `dealTasks` | `any[]` | Yes      | —           |

***

## Custom Object Records

### delete

`customObjectRecords.delete`

Delete a custom object record by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.customObjectRecords.delete({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `schemaId` | `string` | Yes      | —           |
| `id`       | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `schemaId` | `string` | Yes      | —           |
| `id`       | `string` | No       | —           |

***

### deleteByExternalId

`customObjectRecords.deleteByExternalId`

Delete a custom object record by its external ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.customObjectRecords.deleteByExternalId({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `schemaId`   | `string` | Yes      | —           |
| `externalId` | `string` | Yes      | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `schemaId`   | `string` | Yes      | —           |
| `externalId` | `string` | No       | —           |

***

### get

`customObjectRecords.get`

Retrieve a custom object record by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.customObjectRecords.get({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `schemaId` | `string` | Yes      | —           |
| `id`       | `string` | Yes      | —           |

**Output**

| Name     | Type  | Required | Description |
| -------- | ----- | -------- | ----------- |
| `record` | `any` | Yes      | —           |

***

### getByExternalId

`customObjectRecords.getByExternalId`

Retrieve a custom object record by its external ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.customObjectRecords.getByExternalId({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `schemaId`   | `string` | Yes      | —           |
| `externalId` | `string` | Yes      | —           |

**Output**

| Name     | Type  | Required | Description |
| -------- | ----- | -------- | ----------- |
| `record` | `any` | Yes      | —           |

***

### list

`customObjectRecords.list`

List the records belonging to a custom object schema

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.customObjectRecords.list({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `schemaId` | `string` | Yes      | —           |
| `limit`    | `number` | No       | —           |
| `offset`   | `number` | No       | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `records` | `any[]`  | Yes      | —           |
| `meta`    | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### upsert

`customObjectRecords.upsert`

Create or update a custom object record by external ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.customObjectRecords.upsert({});
```

**Input**

| Name         | Type       | Required | Description |
| ------------ | ---------- | -------- | ----------- |
| `schemaId`   | `string`   | Yes      | —           |
| `externalId` | `string`   | No       | —           |
| `fields`     | `object[]` | Yes      | —           |

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

**Output**

| Name     | Type  | Required | Description |
| -------- | ----- | -------- | ----------- |
| `record` | `any` | Yes      | —           |

***

## Custom Object Schemas

### create

`customObjectSchemas.create`

Create a custom object schema

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.customObjectSchemas.create({});
```

**Input**

| Name            | Type       | Required | Description |
| --------------- | ---------- | -------- | ----------- |
| `slug`          | `string`   | Yes      | —           |
| `name`          | `string`   | Yes      | —           |
| `description`   | `string`   | No       | —           |
| `labels`        | `object`   | No       | —           |
| `fields`        | `object[]` | No       | —           |
| `relationships` | `object[]` | No       | —           |

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

  <Accordion title="fields full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>

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

**Output**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `schema` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="schema full type">
    ```ts theme={null}
    {
      id: string,
      slug?: string | null,
      name?: string | null,
      description?: string | null,
      labels?: any | null,
      fields?: any | null,
      relationships?: any | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### createChild

`customObjectSchemas.createChild`

Create a child schema under a public parent schema

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.customObjectSchemas.createChild({});
```

**Input**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `parentId`      | `string` | Yes      | —           |
| `applicationId` | `string` | Yes      | —           |
| `slug`          | `string` | Yes      | —           |
| `name`          | `string` | Yes      | —           |
| `description`   | `string` | No       | —           |

**Output**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `schema` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="schema full type">
    ```ts theme={null}
    {
      id: string,
      slug?: string | null,
      name?: string | null,
      description?: string | null,
      labels?: any | null,
      fields?: any | null,
      relationships?: any | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`customObjectSchemas.delete`

Delete a custom object schema and all its records

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.customObjectSchemas.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`customObjectSchemas.get`

Retrieve a custom object schema by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.customObjectSchemas.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `schema` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="schema full type">
    ```ts theme={null}
    {
      id: string,
      slug?: string | null,
      name?: string | null,
      description?: string | null,
      labels?: any | null,
      fields?: any | null,
      relationships?: any | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`customObjectSchemas.list`

List custom object schema definitions

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.customObjectSchemas.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name      | Type       | Required | Description |
| --------- | ---------- | -------- | ----------- |
| `schemas` | `object[]` | Yes      | —           |
| `meta`    | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="schemas full type">
    ```ts theme={null}
    {
      id: string,
      slug?: string | null,
      name?: string | null,
      description?: string | null,
      labels?: any | null,
      fields?: any | null,
      relationships?: any | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`customObjectSchemas.update`

Update a custom object schema or add field options

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.customObjectSchemas.update({});
```

**Input**

| Name            | Type       | Required | Description |
| --------------- | ---------- | -------- | ----------- |
| `slug`          | `string`   | No       | —           |
| `name`          | `string`   | No       | —           |
| `description`   | `string`   | No       | —           |
| `labels`        | `object`   | No       | —           |
| `fields`        | `object[]` | No       | —           |
| `relationships` | `object[]` | No       | —           |
| `id`            | `string`   | Yes      | —           |

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

  <Accordion title="fields full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>

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

**Output**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `schema` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="schema full type">
    ```ts theme={null}
    {
      id: string,
      slug?: string | null,
      name?: string | null,
      description?: string | null,
      labels?: any | null,
      fields?: any | null,
      relationships?: any | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deal Activities

### list

`dealActivities.list`

List recent activity across deals

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealActivities.list({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `limit`     | `number` | No       | —           |
| `offset`    | `number` | No       | —           |
| `deal`      | `string` | No       | —           |
| `exclude`   | `string` | No       | —           |
| `data_type` | `string` | No       | —           |
| `data_id`   | `string` | No       | —           |

**Output**

| Name             | Type     | Required | Description |
| ---------------- | -------- | -------- | ----------- |
| `dealActivities` | `any[]`  | Yes      | —           |
| `meta`           | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deal Custom Field Data

### delete

`dealCustomFieldData.delete`

Delete a custom field value from a deal

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldData.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`dealCustomFieldData.get`

Retrieve a deal custom field value by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldData.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name                   | Type  | Required | Description |
| ---------------------- | ----- | -------- | ----------- |
| `dealCustomFieldDatum` | `any` | Yes      | —           |

***

### list

`dealCustomFieldData.list`

List custom field values stored against deals

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldData.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `dealId` | `string` | No       | —           |

**Output**

| Name                  | Type     | Required | Description |
| --------------------- | -------- | -------- | ----------- |
| `dealCustomFieldData` | `any[]`  | Yes      | —           |
| `meta`                | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`dealCustomFieldData.update`

Update a custom field value on a deal

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldData.update({});
```

**Input**

| Name            | Type                           | Required | Description |
| --------------- | ------------------------------ | -------- | ----------- |
| `id`            | `string`                       | Yes      | —           |
| `dealId`        | `number`                       | No       | —           |
| `customFieldId` | `number`                       | No       | —           |
| `fieldValue`    | `string \| number \| string[]` | Yes      | —           |
| `fieldCurrency` | `string`                       | No       | —           |

**Output**

| Name                   | Type  | Required | Description |
| ---------------------- | ----- | -------- | ----------- |
| `dealCustomFieldDatum` | `any` | Yes      | —           |

***

## Deal Custom Field Meta

### create

`dealCustomFieldMeta.create`

Create a custom field definition for deals

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldMeta.create({});
```

**Input**

| Name                   | Type                                                                                                                   | Required | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| `fieldLabel`           | `string`                                                                                                               | Yes      | —           |
| `fieldType`            | `text \| textarea \| date \| dropdown \| multiselect \| radio \| checkbox \| hidden \| number \| currency \| datetime` | Yes      | —           |
| `fieldOptions`         | `string[]`                                                                                                             | No       | —           |
| `fieldDefault`         | `string \| number \| string[]`                                                                                         | No       | —           |
| `fieldDefaultCurrency` | `string`                                                                                                               | No       | —           |
| `isFormVisible`        | `number`                                                                                                               | No       | —           |
| `isRequired`           | `number`                                                                                                               | No       | —           |
| `displayOrder`         | `number`                                                                                                               | No       | —           |

**Output**

| Name                   | Type     | Required | Description |
| ---------------------- | -------- | -------- | ----------- |
| `dealCustomFieldMetum` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealCustomFieldMetum full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`dealCustomFieldMeta.delete`

Delete a deal custom field definition

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldMeta.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`dealCustomFieldMeta.get`

Retrieve a deal custom field definition by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldMeta.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name                   | Type     | Required | Description |
| ---------------------- | -------- | -------- | ----------- |
| `dealCustomFieldMetum` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealCustomFieldMetum full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`dealCustomFieldMeta.list`

List custom field definitions for deals

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldMeta.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                  | Type       | Required | Description |
| --------------------- | ---------- | -------- | ----------- |
| `dealCustomFieldMeta` | `object[]` | Yes      | —           |
| `meta`                | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="dealCustomFieldMeta full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`dealCustomFieldMeta.update`

Update a deal custom field definition

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealCustomFieldMeta.update({});
```

**Input**

| Name                   | Type                                                                                                                   | Required | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| `fieldLabel`           | `string`                                                                                                               | No       | —           |
| `fieldType`            | `text \| textarea \| date \| dropdown \| multiselect \| radio \| checkbox \| hidden \| number \| currency \| datetime` | No       | —           |
| `fieldOptions`         | `string[]`                                                                                                             | No       | —           |
| `fieldDefault`         | `string \| number \| string[]`                                                                                         | No       | —           |
| `fieldDefaultCurrency` | `string`                                                                                                               | No       | —           |
| `isFormVisible`        | `number`                                                                                                               | No       | —           |
| `isRequired`           | `number`                                                                                                               | No       | —           |
| `displayOrder`         | `number`                                                                                                               | No       | —           |
| `id`                   | `string`                                                                                                               | Yes      | —           |

**Output**

| Name                   | Type     | Required | Description |
| ---------------------- | -------- | -------- | ----------- |
| `dealCustomFieldMetum` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealCustomFieldMetum full type">
    ```ts theme={null}
    {
      id: string,
      fieldLabel?: string | null,
      fieldType?: string | null,
      fieldDefault?: string | null,
      fieldDefaultCurrency?: string | null,
      fieldOptions?: any | null,
      isFormVisible?: string | number | null,
      isRequired?: string | number | null,
      displayOrder?: string | number | null,
      knownFieldId?: string | number | null,
      hideFieldFlag?: string | number | null,
      personalization?: string | null,
      createdBy?: string | number | null,
      updatedBy?: string | number | null,
      createdTimestamp?: string | null,
      updatedTimestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deal Groups

### create

`dealGroups.create`

Create a deal pipeline with its three default stages

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealGroups.create({});
```

**Input**

| Name         | Type                   | Required | Description |
| ------------ | ---------------------- | -------- | ----------- |
| `title`      | `string`               | Yes      | —           |
| `currency`   | `string`               | No       | —           |
| `allgroups`  | `0 \| 1`               | No       | —           |
| `allusers`   | `0 \| 1`               | No       | —           |
| `autoassign` | `0 \| 1`               | No       | —           |
| `users`      | `(string \| number)[]` | No       | —           |
| `groups`     | `(string \| number)[]` | No       | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `dealGroup` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealGroup full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      currency?: string | null,
      allgroups?: string | null,
      allusers?: string | null,
      autoassign?: string | null,
      source?: string | null,
      count?: string | null,
      stages?: any | null,
      win_probability_initialize_date?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`dealGroups.delete`

Delete a pipeline and every stage and deal in it

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealGroups.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`dealGroups.get`

Retrieve a deal pipeline by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealGroups.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `dealGroup` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealGroup full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      currency?: string | null,
      allgroups?: string | null,
      allusers?: string | null,
      autoassign?: string | null,
      source?: string | null,
      count?: string | null,
      stages?: any | null,
      win_probability_initialize_date?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`dealGroups.list`

List deal pipelines, optionally filtered by title

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealGroups.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `title`  | `string` | No       | —           |

**Output**

| Name         | Type       | Required | Description |
| ------------ | ---------- | -------- | ----------- |
| `dealGroups` | `object[]` | Yes      | —           |
| `meta`       | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="dealGroups full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      currency?: string | null,
      allgroups?: string | null,
      allusers?: string | null,
      autoassign?: string | null,
      source?: string | null,
      count?: string | null,
      stages?: any | null,
      win_probability_initialize_date?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`dealGroups.update`

Update a deal pipeline by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealGroups.update({});
```

**Input**

| Name         | Type                   | Required | Description |
| ------------ | ---------------------- | -------- | ----------- |
| `title`      | `string`               | No       | —           |
| `currency`   | `string`               | No       | —           |
| `allgroups`  | `0 \| 1`               | No       | —           |
| `allusers`   | `0 \| 1`               | No       | —           |
| `autoassign` | `0 \| 1`               | No       | —           |
| `users`      | `(string \| number)[]` | No       | —           |
| `groups`     | `(string \| number)[]` | No       | —           |
| `id`         | `string`               | Yes      | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `dealGroup` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealGroup full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      currency?: string | null,
      allgroups?: string | null,
      allusers?: string | null,
      autoassign?: string | null,
      source?: string | null,
      count?: string | null,
      stages?: any | null,
      win_probability_initialize_date?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deal Roles

### create

`dealRoles.create`

Create a deal role such as Decision Maker

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealRoles.create({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `title` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `dealRole` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealRole full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`dealRoles.delete`

Delete a deal role by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealRoles.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### list

`dealRoles.list`

List the roles a contact can hold on a deal

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealRoles.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name        | Type       | Required | Description |
| ----------- | ---------- | -------- | ----------- |
| `dealRoles` | `object[]` | Yes      | —           |
| `meta`      | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="dealRoles full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deals

### delete

`deals.delete`

Delete a deal by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.deals.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`deals.get`

Retrieve a deal by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.deals.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `deal` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="deal full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      description?: string | null,
      value?: string | number | null,
      currency?: string | null,
      status?: string | number | null,
      contact?: string | null,
      organization?: string | null,
      group?: string | null,
      stage?: string | null,
      owner?: string | null,
      percent?: string | number | null,
      nextdate?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      edate?: string | null,
      hash?: string | null,
      nextdealid?: string | null,
      nexttaskid?: string | null,
      activitycount?: string | null,
      winProbability?: string | number | null,
      winProbabilityMdate?: string | null,
      isDisabled?: boolean | string | number | null,
      account?: string | number | null,
      customerAccount?: string | number | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`deals.list`

List deals with pagination and filters

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.deals.list({});
```

**Input**

| Name                    | Type                                          | Required | Description |
| ----------------------- | --------------------------------------------- | -------- | ----------- |
| `limit`                 | `number`                                      | No       | —           |
| `offset`                | `number`                                      | No       | —           |
| `search`                | `string`                                      | No       | —           |
| `search_field`          | `all \| title \| contact \| org`              | No       | —           |
| `title`                 | `string`                                      | No       | —           |
| `stage`                 | `string`                                      | No       | —           |
| `group`                 | `string`                                      | No       | —           |
| `status`                | `0 \| 1 \| 2`                                 | No       | —           |
| `owner`                 | `string`                                      | No       | —           |
| `nextdate_range`        | `upcoming \| scheduled \| overdue \| no-task` | No       | —           |
| `tag`                   | `string`                                      | No       | —           |
| `tasktype`              | `string`                                      | No       | —           |
| `created_before`        | `string`                                      | No       | —           |
| `created_after`         | `string`                                      | No       | —           |
| `updated_before`        | `string`                                      | No       | —           |
| `updated_after`         | `string`                                      | No       | —           |
| `organization`          | `string`                                      | No       | —           |
| `minimum_value`         | `number`                                      | No       | —           |
| `maximum_value`         | `number`                                      | No       | —           |
| `score_greater_than`    | `number`                                      | No       | —           |
| `score_less_than`       | `number`                                      | No       | —           |
| `score`                 | `number`                                      | No       | —           |
| `order_id`              | `ASC \| DESC`                                 | No       | —           |
| `order_title`           | `ASC \| DESC`                                 | No       | —           |
| `order_value`           | `ASC \| DESC`                                 | No       | —           |
| `order_created`         | `ASC \| DESC`                                 | No       | —           |
| `order_updated`         | `ASC \| DESC`                                 | No       | —           |
| `order_contact_name`    | `ASC \| DESC`                                 | No       | —           |
| `order_contact_orgname` | `ASC \| DESC`                                 | No       | —           |
| `order_next_action`     | `ASC \| DESC`                                 | No       | —           |

**Output**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `deals` | `object[]` | Yes      | —           |
| `meta`  | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="deals full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      description?: string | null,
      value?: string | number | null,
      currency?: string | null,
      status?: string | number | null,
      contact?: string | null,
      organization?: string | null,
      group?: string | null,
      stage?: string | null,
      owner?: string | null,
      percent?: string | number | null,
      nextdate?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      edate?: string | null,
      hash?: string | null,
      nextdealid?: string | null,
      nexttaskid?: string | null,
      activitycount?: string | null,
      winProbability?: string | number | null,
      winProbabilityMdate?: string | null,
      isDisabled?: boolean | string | number | null,
      account?: string | number | null,
      customerAccount?: string | number | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### listFiltered

`deals.listFiltered`

Search deals by title or filter by stage, pipeline, owner or status

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.deals.listFiltered({});
```

**Input**

| Name                    | Type                                          | Required | Description |
| ----------------------- | --------------------------------------------- | -------- | ----------- |
| `limit`                 | `number`                                      | No       | —           |
| `offset`                | `number`                                      | No       | —           |
| `search`                | `string`                                      | No       | —           |
| `search_field`          | `all \| title \| contact \| org`              | No       | —           |
| `title`                 | `string`                                      | No       | —           |
| `stage`                 | `string`                                      | No       | —           |
| `group`                 | `string`                                      | No       | —           |
| `status`                | `0 \| 1 \| 2`                                 | No       | —           |
| `owner`                 | `string`                                      | No       | —           |
| `nextdate_range`        | `upcoming \| scheduled \| overdue \| no-task` | No       | —           |
| `tag`                   | `string`                                      | No       | —           |
| `tasktype`              | `string`                                      | No       | —           |
| `created_before`        | `string`                                      | No       | —           |
| `created_after`         | `string`                                      | No       | —           |
| `updated_before`        | `string`                                      | No       | —           |
| `updated_after`         | `string`                                      | No       | —           |
| `organization`          | `string`                                      | No       | —           |
| `minimum_value`         | `number`                                      | No       | —           |
| `maximum_value`         | `number`                                      | No       | —           |
| `score_greater_than`    | `number`                                      | No       | —           |
| `score_less_than`       | `number`                                      | No       | —           |
| `score`                 | `number`                                      | No       | —           |
| `order_id`              | `ASC \| DESC`                                 | No       | —           |
| `order_title`           | `ASC \| DESC`                                 | No       | —           |
| `order_value`           | `ASC \| DESC`                                 | No       | —           |
| `order_created`         | `ASC \| DESC`                                 | No       | —           |
| `order_updated`         | `ASC \| DESC`                                 | No       | —           |
| `order_contact_name`    | `ASC \| DESC`                                 | No       | —           |
| `order_contact_orgname` | `ASC \| DESC`                                 | No       | —           |
| `order_next_action`     | `ASC \| DESC`                                 | No       | —           |

**Output**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `deals` | `object[]` | Yes      | —           |
| `meta`  | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="deals full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      description?: string | null,
      value?: string | number | null,
      currency?: string | null,
      status?: string | number | null,
      contact?: string | null,
      organization?: string | null,
      group?: string | null,
      stage?: string | null,
      owner?: string | null,
      percent?: string | number | null,
      nextdate?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      edate?: string | null,
      hash?: string | null,
      nextdealid?: string | null,
      nexttaskid?: string | null,
      activitycount?: string | null,
      winProbability?: string | number | null,
      winProbabilityMdate?: string | null,
      isDisabled?: boolean | string | number | null,
      account?: string | number | null,
      customerAccount?: string | number | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`deals.update`

Update an existing deal by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.deals.update({});
```

**Input**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `id`           | `string`   | Yes      | —           |
| `title`        | `string`   | No       | —           |
| `description`  | `string`   | No       | —           |
| `value`        | `number`   | No       | —           |
| `currency`     | `string`   | No       | —           |
| `group`        | `string`   | No       | —           |
| `stage`        | `string`   | No       | —           |
| `owner`        | `string`   | No       | —           |
| `contact`      | `string`   | No       | —           |
| `organization` | `string`   | No       | —           |
| `status`       | `number`   | No       | —           |
| `percent`      | `number`   | No       | —           |
| `fields`       | `object[]` | No       | —           |

<AccordionGroup>
  <Accordion title="fields full type">
    ```ts theme={null}
    {
      customFieldId: number,
      fieldValue: string | number | string[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `deal` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="deal full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      description?: string | null,
      value?: string | number | null,
      currency?: string | null,
      status?: string | number | null,
      contact?: string | null,
      organization?: string | null,
      group?: string | null,
      stage?: string | null,
      owner?: string | null,
      percent?: string | number | null,
      nextdate?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      edate?: string | null,
      hash?: string | null,
      nextdealid?: string | null,
      nexttaskid?: string | null,
      activitycount?: string | null,
      winProbability?: string | number | null,
      winProbabilityMdate?: string | null,
      isDisabled?: boolean | string | number | null,
      account?: string | number | null,
      customerAccount?: string | number | null,
      fields?: any | null,
      customFieldSaveStatus?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### updateOwnersBulk

`deals.updateOwnersBulk`

Reassign many deals to new owners in one request

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.deals.updateOwnersBulk({});
```

**Input**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `deals` | `object[]` | Yes      | —           |

<AccordionGroup>
  <Accordion title="deals full type">
    ```ts theme={null}
    {
      id: number,
      ownerId: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output:** *empty object*

***

## Deal Stages

### create

`dealStages.create`

Create a stage in a deal pipeline

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealStages.create({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `title`       | `string` | Yes      | —           |
| `group`       | `string` | Yes      | —           |
| `order`       | `number` | No       | —           |
| `width`       | `number` | No       | —           |
| `color`       | `string` | No       | —           |
| `cardRegion1` | `string` | No       | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `dealStage` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealStage full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      group?: string | null,
      order?: string | null,
      width?: string | null,
      color?: string | null,
      dealOrder?: string | null,
      cardRegion1?: string | null,
      cardRegion2?: string | null,
      cardRegion3?: string | null,
      cardRegion4?: string | null,
      cardRegion5?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`dealStages.delete`

Delete a pipeline stage by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealStages.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### deleteWithDeals

`dealStages.deleteWithDeals`

Delete a stage, optionally relocating its deals first

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealStages.deleteWithDeals({});
```

**Input**

| Name              | Type             | Required | Description |
| ----------------- | ---------------- | -------- | ----------- |
| `id`              | `string`         | Yes      | —           |
| `action_type`     | `Move \| Delete` | Yes      | —           |
| `new_pipeline_id` | `string`         | No       | —           |
| `new_stage_id`    | `string`         | No       | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`dealStages.get`

Retrieve a pipeline stage by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealStages.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `dealStage` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealStage full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      group?: string | null,
      order?: string | null,
      width?: string | null,
      color?: string | null,
      dealOrder?: string | null,
      cardRegion1?: string | null,
      cardRegion2?: string | null,
      cardRegion3?: string | null,
      cardRegion4?: string | null,
      cardRegion5?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`dealStages.list`

List deal pipeline stages

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealStages.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `title`  | `string` | No       | —           |
| `group`  | `string` | No       | —           |

**Output**

| Name         | Type       | Required | Description |
| ------------ | ---------- | -------- | ----------- |
| `dealStages` | `object[]` | Yes      | —           |
| `meta`       | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="dealStages full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      group?: string | null,
      order?: string | null,
      width?: string | null,
      color?: string | null,
      dealOrder?: string | null,
      cardRegion1?: string | null,
      cardRegion2?: string | null,
      cardRegion3?: string | null,
      cardRegion4?: string | null,
      cardRegion5?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### moveDeals

`dealStages.moveDeals`

Move every deal in one stage to another stage

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealStages.moveDeals({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `id`    | `string` | Yes      | —           |
| `stage` | `string` | Yes      | —           |

**Output:** *empty object*

***

### update

`dealStages.update`

Update a pipeline stage by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealStages.update({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `title`       | `string` | No       | —           |
| `group`       | `string` | No       | —           |
| `order`       | `number` | No       | —           |
| `width`       | `number` | No       | —           |
| `color`       | `string` | No       | —           |
| `cardRegion1` | `string` | No       | —           |
| `id`          | `string` | Yes      | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `dealStage` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealStage full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      group?: string | null,
      order?: string | null,
      width?: string | null,
      color?: string | null,
      dealOrder?: string | null,
      cardRegion1?: string | null,
      cardRegion2?: string | null,
      cardRegion3?: string | null,
      cardRegion4?: string | null,
      cardRegion5?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deal Tasks

### create

`dealTasks.create`

Create a task against a deal, contact or account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealTasks.create({});
```

**Input**

| Name                        | Type                            | Required | Description |
| --------------------------- | ------------------------------- | -------- | ----------- |
| `title`                     | `string`                        | No       | —           |
| `relid`                     | `string`                        | Yes      | —           |
| `reltype`                   | `Deal \| Subscriber \| Account` | Yes      | —           |
| `dealTasktype`              | `string`                        | Yes      | —           |
| `ownerType`                 | `string`                        | No       | —           |
| `status`                    | `number`                        | No       | —           |
| `note`                      | `string`                        | No       | —           |
| `duedate`                   | `string`                        | Yes      | —           |
| `edate`                     | `string`                        | No       | —           |
| `assignee`                  | `string`                        | No       | —           |
| `triggerAutomationOnCreate` | `boolean`                       | No       | —           |
| `doneAutomation`            | `boolean`                       | No       | —           |
| `outcomeId`                 | `string`                        | No       | —           |
| `outcomeInfo`               | `string`                        | No       | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `dealTask` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTask full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      note?: string | null,
      relid?: string | null,
      reltype?: string | null,
      dealtasktype?: string | null,
      duedate?: string | null,
      done?: string | null,
      status?: string | null,
      owner?: string | null,
      cdate?: string | null,
      edate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`dealTasks.delete`

Delete a deal task by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.dealTasks.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`dealTasks.get`

Retrieve a deal task by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealTasks.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `dealTask` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTask full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      note?: string | null,
      relid?: string | null,
      reltype?: string | null,
      dealtasktype?: string | null,
      duedate?: string | null,
      done?: string | null,
      status?: string | null,
      owner?: string | null,
      cdate?: string | null,
      edate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`dealTasks.list`

List deal tasks with pagination

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealTasks.list({});
```

**Input**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `limit`           | `number` | No       | —           |
| `offset`          | `number` | No       | —           |
| `title`           | `string` | No       | —           |
| `reltype`         | `string` | No       | —           |
| `relid`           | `string` | No       | —           |
| `status`          | `number` | No       | —           |
| `note`            | `string` | No       | —           |
| `duedate`         | `string` | No       | —           |
| `dealTasktype`    | `string` | No       | —           |
| `userid`          | `string` | No       | —           |
| `due_after`       | `string` | No       | —           |
| `due_before`      | `string` | No       | —           |
| `duedate_range`   | `string` | No       | —           |
| `assignee_userid` | `string` | No       | —           |
| `outcome_id`      | `string` | No       | —           |

**Output**

| Name        | Type       | Required | Description |
| ----------- | ---------- | -------- | ----------- |
| `dealTasks` | `object[]` | Yes      | —           |
| `meta`      | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="dealTasks full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      note?: string | null,
      relid?: string | null,
      reltype?: string | null,
      dealtasktype?: string | null,
      duedate?: string | null,
      done?: string | null,
      status?: string | null,
      owner?: string | null,
      cdate?: string | null,
      edate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`dealTasks.update`

Update an existing deal task by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealTasks.update({});
```

**Input**

| Name                        | Type                            | Required | Description |
| --------------------------- | ------------------------------- | -------- | ----------- |
| `title`                     | `string`                        | No       | —           |
| `relid`                     | `string`                        | No       | —           |
| `reltype`                   | `Deal \| Subscriber \| Account` | No       | —           |
| `dealTasktype`              | `string`                        | No       | —           |
| `ownerType`                 | `string`                        | No       | —           |
| `status`                    | `number`                        | No       | —           |
| `note`                      | `string`                        | No       | —           |
| `duedate`                   | `string`                        | No       | —           |
| `edate`                     | `string`                        | No       | —           |
| `assignee`                  | `string`                        | No       | —           |
| `triggerAutomationOnCreate` | `boolean`                       | No       | —           |
| `doneAutomation`            | `boolean`                       | No       | —           |
| `outcomeId`                 | `string`                        | No       | —           |
| `outcomeInfo`               | `string`                        | No       | —           |
| `id`                        | `string`                        | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `dealTask` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTask full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      note?: string | null,
      relid?: string | null,
      reltype?: string | null,
      dealtasktype?: string | null,
      duedate?: string | null,
      done?: string | null,
      status?: string | null,
      owner?: string | null,
      cdate?: string | null,
      edate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deal Task Types

### create

`dealTaskTypes.create`

Create a task type for categorising deal tasks

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealTaskTypes.create({});
```

**Input**

| Name            | Type       | Required | Description |
| --------------- | ---------- | -------- | ----------- |
| `title`         | `string`   | Yes      | —           |
| `defduration`   | `string`   | No       | —           |
| `status`        | `number`   | No       | —           |
| `display_order` | `number`   | No       | —           |
| `outcomes`      | `string[]` | No       | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `dealTasktype` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTasktype full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      defduration?: string | null,
      display_order?: string | null,
      status?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      outcomes?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### get

`dealTaskTypes.get`

Retrieve a deal task type by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealTaskTypes.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `dealTasktype` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTasktype full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      defduration?: string | null,
      display_order?: string | null,
      status?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      outcomes?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`dealTaskTypes.list`

List the task types available for deals

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.dealTaskTypes.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name            | Type       | Required | Description |
| --------------- | ---------- | -------- | ----------- |
| `dealTasktypes` | `object[]` | Yes      | —           |
| `meta`          | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="dealTasktypes full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      defduration?: string | null,
      display_order?: string | null,
      status?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      outcomes?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`dealTaskTypes.update`

Update a deal task type by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.dealTaskTypes.update({});
```

**Input**

| Name            | Type       | Required | Description |
| --------------- | ---------- | -------- | ----------- |
| `title`         | `string`   | No       | —           |
| `defduration`   | `string`   | No       | —           |
| `status`        | `number`   | No       | —           |
| `display_order` | `number`   | No       | —           |
| `outcomes`      | `string[]` | No       | —           |
| `id`            | `string`   | Yes      | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `dealTasktype` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="dealTasktype full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      defduration?: string | null,
      display_order?: string | null,
      status?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      outcomes?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Ecom Customers

### create

`ecomCustomers.create`

Register an e-commerce customer against a connection

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.ecomCustomers.create({});
```

**Input**

| Name               | Type     | Required | Description |
| ------------------ | -------- | -------- | ----------- |
| `connectionid`     | `string` | Yes      | —           |
| `externalid`       | `string` | Yes      | —           |
| `email`            | `string` | Yes      | —           |
| `acceptsMarketing` | `string` | No       | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `ecomCustomer` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="ecomCustomer full type">
    ```ts theme={null}
    {
      id: string,
      connectionid?: string | null,
      externalid?: string | null,
      email?: string | null,
      totalRevenue?: string | null,
      totalOrders?: string | null,
      totalProducts?: string | null,
      avgRevenuePerOrder?: string | null,
      avgProductCategory?: string | null,
      acceptsMarketing?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`ecomCustomers.delete`

Delete an e-commerce customer and its data

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.ecomCustomers.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`ecomCustomers.get`

Retrieve an e-commerce customer by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomCustomers.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `ecomCustomer` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="ecomCustomer full type">
    ```ts theme={null}
    {
      id: string,
      connectionid?: string | null,
      externalid?: string | null,
      email?: string | null,
      totalRevenue?: string | null,
      totalOrders?: string | null,
      totalProducts?: string | null,
      avgRevenuePerOrder?: string | null,
      avgProductCategory?: string | null,
      acceptsMarketing?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`ecomCustomers.list`

List e-commerce customers with revenue metrics

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomCustomers.list({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `limit`        | `number` | No       | —           |
| `offset`       | `number` | No       | —           |
| `connectionid` | `string` | No       | —           |
| `externalid`   | `string` | No       | —           |

**Output**

| Name            | Type       | Required | Description |
| --------------- | ---------- | -------- | ----------- |
| `ecomCustomers` | `object[]` | Yes      | —           |
| `meta`          | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="ecomCustomers full type">
    ```ts theme={null}
    {
      id: string,
      connectionid?: string | null,
      externalid?: string | null,
      email?: string | null,
      totalRevenue?: string | null,
      totalOrders?: string | null,
      totalProducts?: string | null,
      avgRevenuePerOrder?: string | null,
      avgProductCategory?: string | null,
      acceptsMarketing?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`ecomCustomers.update`

Update an e-commerce customer record

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.ecomCustomers.update({});
```

**Input**

| Name               | Type     | Required | Description |
| ------------------ | -------- | -------- | ----------- |
| `connectionid`     | `string` | No       | —           |
| `externalid`       | `string` | No       | —           |
| `email`            | `string` | No       | —           |
| `acceptsMarketing` | `string` | No       | —           |
| `id`               | `string` | Yes      | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `ecomCustomer` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="ecomCustomer full type">
    ```ts theme={null}
    {
      id: string,
      connectionid?: string | null,
      externalid?: string | null,
      email?: string | null,
      totalRevenue?: string | null,
      totalOrders?: string | null,
      totalProducts?: string | null,
      avgRevenuePerOrder?: string | null,
      avgProductCategory?: string | null,
      acceptsMarketing?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Ecom Order Products

### get

`ecomOrderProducts.get`

Retrieve an order product line by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomOrderProducts.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name               | Type  | Required | Description |
| ------------------ | ----- | -------- | ----------- |
| `ecomOrderProduct` | `any` | Yes      | —           |

***

### list

`ecomOrderProducts.list`

List the products attached to e-commerce orders

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomOrderProducts.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                | Type     | Required | Description |
| ------------------- | -------- | -------- | ----------- |
| `ecomOrderProducts` | `any[]`  | Yes      | —           |
| `meta`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### listForOrder

`ecomOrderProducts.listForOrder`

List the product lines belonging to one order

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomOrderProducts.listForOrder({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `orderId` | `string` | Yes      | —           |
| `limit`   | `number` | No       | —           |
| `offset`  | `number` | No       | —           |

**Output**

| Name                | Type     | Required | Description |
| ------------------- | -------- | -------- | ----------- |
| `ecomOrderProducts` | `any[]`  | Yes      | —           |
| `meta`              | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Ecom Orders

### create

`ecomOrders.create`

Record an e-commerce order for automation triggers

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.create({});
```

**Input**

| Name                  | Type       | Required | Description |
| --------------------- | ---------- | -------- | ----------- |
| `externalid`          | `string`   | Yes      | —           |
| `source`              | `number`   | Yes      | —           |
| `email`               | `string`   | Yes      | —           |
| `orderProducts`       | `object[]` | Yes      | —           |
| `orderDiscounts`      | `object[]` | No       | —           |
| `totalPrice`          | `number`   | Yes      | —           |
| `shippingAmount`      | `number`   | No       | —           |
| `taxAmount`           | `number`   | No       | —           |
| `discountAmount`      | `number`   | No       | —           |
| `currency`            | `string`   | Yes      | —           |
| `orderDate`           | `string`   | Yes      | —           |
| `externalUpdatedDate` | `string`   | No       | —           |
| `abandonedDate`       | `string`   | No       | —           |
| `externalcheckoutid`  | `string`   | No       | —           |
| `connectionid`        | `string`   | Yes      | —           |
| `customerid`          | `string`   | Yes      | —           |
| `orderNumber`         | `string`   | No       | —           |
| `shippingMethod`      | `string`   | No       | —           |

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

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

**Output**

| Name        | Type  | Required | Description |
| ----------- | ----- | -------- | ----------- |
| `ecomOrder` | `any` | Yes      | —           |

***

### delete

`ecomOrders.delete`

Delete an e-commerce order by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### find

`ecomOrders.find`

Find one order by its store order ID within a connection

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.find({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `connectionId` | `string` | Yes      | —           |
| `storeOrderId` | `string` | Yes      | —           |

**Output**

| Name        | Type  | Required | Description |
| ----------- | ----- | -------- | ----------- |
| `ecomOrder` | `any` | No       | —           |

***

### get

`ecomOrders.get`

Retrieve an e-commerce order by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name        | Type  | Required | Description |
| ----------- | ----- | -------- | ----------- |
| `ecomOrder` | `any` | Yes      | —           |

***

### list

`ecomOrders.list`

List e-commerce orders with pagination

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.list({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `limit`        | `number` | No       | —           |
| `offset`       | `number` | No       | —           |
| `connectionid` | `string` | No       | —           |
| `customerid`   | `string` | No       | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `ecomOrders` | `any[]`  | Yes      | —           |
| `meta`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`ecomOrders.update`

Update an existing e-commerce order

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.update({});
```

**Input**

| Name                  | Type       | Required | Description |
| --------------------- | ---------- | -------- | ----------- |
| `externalid`          | `string`   | No       | —           |
| `source`              | `number`   | No       | —           |
| `email`               | `string`   | No       | —           |
| `orderProducts`       | `object[]` | No       | —           |
| `orderDiscounts`      | `object[]` | No       | —           |
| `totalPrice`          | `number`   | No       | —           |
| `shippingAmount`      | `number`   | No       | —           |
| `taxAmount`           | `number`   | No       | —           |
| `discountAmount`      | `number`   | No       | —           |
| `currency`            | `string`   | No       | —           |
| `orderDate`           | `string`   | No       | —           |
| `externalUpdatedDate` | `string`   | No       | —           |
| `abandonedDate`       | `string`   | No       | —           |
| `externalcheckoutid`  | `string`   | No       | —           |
| `connectionid`        | `string`   | No       | —           |
| `customerid`          | `string`   | No       | —           |
| `orderNumber`         | `string`   | No       | —           |
| `shippingMethod`      | `string`   | No       | —           |
| `id`                  | `string`   | Yes      | —           |

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

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

**Output**

| Name        | Type  | Required | Description |
| ----------- | ----- | -------- | ----------- |
| `ecomOrder` | `any` | Yes      | —           |

***

### upsert

`ecomOrders.upsert`

Create an order, or update the one with the same store order ID. Concurrent upserts for the same connectionid and externalid can duplicate; serialize them or use orders.upsertBulk

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.ecomOrders.upsert({});
```

**Input**

| Name                  | Type       | Required | Description |
| --------------------- | ---------- | -------- | ----------- |
| `externalid`          | `string`   | Yes      | —           |
| `source`              | `number`   | Yes      | —           |
| `email`               | `string`   | Yes      | —           |
| `orderProducts`       | `object[]` | Yes      | —           |
| `orderDiscounts`      | `object[]` | No       | —           |
| `totalPrice`          | `number`   | Yes      | —           |
| `shippingAmount`      | `number`   | No       | —           |
| `taxAmount`           | `number`   | No       | —           |
| `discountAmount`      | `number`   | No       | —           |
| `currency`            | `string`   | Yes      | —           |
| `orderDate`           | `string`   | Yes      | —           |
| `externalUpdatedDate` | `string`   | No       | —           |
| `abandonedDate`       | `string`   | No       | —           |
| `externalcheckoutid`  | `string`   | No       | —           |
| `connectionid`        | `string`   | Yes      | —           |
| `customerid`          | `string`   | Yes      | —           |
| `orderNumber`         | `string`   | No       | —           |
| `shippingMethod`      | `string`   | No       | —           |

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

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

**Output**

| Name        | Type  | Required | Description |
| ----------- | ----- | -------- | ----------- |
| `ecomOrder` | `any` | Yes      | —           |

***

## Email Activities

### list

`emailActivities.list`

List email activity for a subscriber or deal

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.emailActivities.list({});
```

**Input**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `limit`        | `number` | No       | —           |
| `offset`       | `number` | No       | —           |
| `subscriberid` | `string` | No       | —           |
| `dealId`       | `string` | No       | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `emailActivities` | `any[]`  | Yes      | —           |
| `meta`            | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Event Tracking Events

### create

`eventTrackingEvents.create`

Whitelist a new event name for tracking

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.eventTrackingEvents.create({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `name` | `string` | Yes      | —           |

**Output**

| Name                 | Type     | Required | Description |
| -------------------- | -------- | -------- | ----------- |
| `eventTrackingEvent` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="eventTrackingEvent full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`eventTrackingEvents.delete`

Remove an event name from the tracking whitelist

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.eventTrackingEvents.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### list

`eventTrackingEvents.list`

List the whitelisted event tracking event names

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.eventTrackingEvents.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                  | Type       | Required | Description |
| --------------------- | ---------- | -------- | ----------- |
| `eventTrackingEvents` | `object[]` | Yes      | —           |
| `meta`                | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="eventTrackingEvents full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Field Options

### createBulk

`fieldOptions.createBulk`

Create options in bulk for a dropdown or listbox field

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.fieldOptions.createBulk({});
```

**Input**

| Name      | Type       | Required | Description |
| --------- | ---------- | -------- | ----------- |
| `options` | `object[]` | Yes      | —           |

<AccordionGroup>
  <Accordion title="options full type">
    ```ts theme={null}
    {
      field: string,
      label: string,
      value: string,
      orderid?: number,
      isdefault?: boolean
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `fieldOptions` | `object[]` | Yes      | —           |

<AccordionGroup>
  <Accordion title="fieldOptions full type">
    ```ts theme={null}
    {
      id: string,
      field?: string | null,
      label?: string | null,
      value?: string | null,
      orderid?: string | null,
      isdefault?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Field Rels

### create

`fieldRels.create`

Associate a custom field with a list

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.fieldRels.create({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `field` | `string` | Yes      | —           |
| `relid` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `fieldRel` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="fieldRel full type">
    ```ts theme={null}
    {
      id: string,
      field?: string | null,
      relid?: string | null,
      dorder?: string | null,
      cdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`fieldRels.delete`

Remove the association between a custom field and a list

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.fieldRels.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### list

`fieldRels.list`

List relationships between custom fields and lists

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.fieldRels.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name        | Type       | Required | Description |
| ----------- | ---------- | -------- | ----------- |
| `fieldRels` | `object[]` | Yes      | —           |
| `meta`      | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="fieldRels full type">
    ```ts theme={null}
    {
      id: string,
      field?: string | null,
      relid?: string | null,
      dorder?: string | null,
      cdate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Fields

### create

`fields.create`

Create a new custom contact field

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.fields.create({});
```

**Input**

| Name         | Type                                                                                                                  | Required | Description |
| ------------ | --------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| `title`      | `string`                                                                                                              | Yes      | —           |
| `type`       | `text \| textarea \| date \| multiselect \| number \| datetime \| dropdown \| listbox \| radio \| checkbox \| hidden` | Yes      | —           |
| `descript`   | `string`                                                                                                              | No       | —           |
| `perstag`    | `string`                                                                                                              | No       | —           |
| `defval`     | `string`                                                                                                              | No       | —           |
| `isrequired` | `boolean`                                                                                                             | No       | —           |
| `visible`    | `boolean`                                                                                                             | No       | —           |
| `ordernum`   | `number`                                                                                                              | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `field` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="field full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      type?: string | null,
      perstag?: string | null,
      defval?: string | null,
      isrequired?: string | null,
      show_in_list?: string | null,
      visible?: string | null,
      service?: string | null,
      ordernum?: string | null,
      rows?: string | null,
      cols?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      options?: any | null,
      relations?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`fields.delete`

Delete a custom field and every value stored against it

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.fields.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`fields.get`

Retrieve a custom field definition by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.fields.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `field` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="field full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      type?: string | null,
      perstag?: string | null,
      defval?: string | null,
      isrequired?: string | null,
      show_in_list?: string | null,
      visible?: string | null,
      service?: string | null,
      ordernum?: string | null,
      rows?: string | null,
      cols?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      options?: any | null,
      relations?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`fields.list`

List custom field definitions with pagination

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.fields.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name     | Type       | Required | Description |
| -------- | ---------- | -------- | ----------- |
| `fields` | `object[]` | Yes      | —           |
| `meta`   | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="fields full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      type?: string | null,
      perstag?: string | null,
      defval?: string | null,
      isrequired?: string | null,
      show_in_list?: string | null,
      visible?: string | null,
      service?: string | null,
      ordernum?: string | null,
      rows?: string | null,
      cols?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      options?: any | null,
      relations?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`fields.update`

Update an existing custom field definition

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.fields.update({});
```

**Input**

| Name         | Type                                                                                                                  | Required | Description |
| ------------ | --------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| `id`         | `string`                                                                                                              | Yes      | —           |
| `title`      | `string`                                                                                                              | No       | —           |
| `type`       | `text \| textarea \| date \| multiselect \| number \| datetime \| dropdown \| listbox \| radio \| checkbox \| hidden` | No       | —           |
| `descript`   | `string`                                                                                                              | No       | —           |
| `perstag`    | `string`                                                                                                              | No       | —           |
| `defval`     | `string`                                                                                                              | No       | —           |
| `isrequired` | `boolean`                                                                                                             | No       | —           |
| `visible`    | `boolean`                                                                                                             | No       | —           |
| `ordernum`   | `number`                                                                                                              | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `field` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="field full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      type?: string | null,
      perstag?: string | null,
      defval?: string | null,
      isrequired?: string | null,
      show_in_list?: string | null,
      visible?: string | null,
      service?: string | null,
      ordernum?: string | null,
      rows?: string | null,
      cols?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      options?: any | null,
      relations?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Field Values

### delete

`fieldValues.delete`

Delete a custom field value by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.fieldValues.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`fieldValues.get`

Retrieve a single custom field value by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.fieldValues.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `fieldValue` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="fieldValue full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      field?: string | null,
      value?: string | null,
      owner?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`fieldValues.list`

List custom field values across all contacts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.fieldValues.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `fieldValues` | `object[]` | Yes      | —           |
| `meta`        | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="fieldValues full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      field?: string | null,
      value?: string | null,
      owner?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### setForContact

`fieldValues.setForContact`

Set a custom field value on a contact

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.fieldValues.setForContact({});
```

**Input**

| Name          | Type      | Required | Description |
| ------------- | --------- | -------- | ----------- |
| `contact`     | `string`  | Yes      | —           |
| `field`       | `string`  | Yes      | —           |
| `value`       | `string`  | Yes      | —           |
| `useDefaults` | `boolean` | No       | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `fieldValue` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="fieldValue full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      field?: string | null,
      value?: string | null,
      owner?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`fieldValues.update`

Update an existing custom field value by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.fieldValues.update({});
```

**Input**

| Name          | Type      | Required | Description |
| ------------- | --------- | -------- | ----------- |
| `id`          | `string`  | Yes      | —           |
| `value`       | `string`  | Yes      | —           |
| `useDefaults` | `boolean` | No       | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `fieldValue` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="fieldValue full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      field?: string | null,
      value?: string | null,
      owner?: string | null,
      cdate?: string | null,
      udate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Forms

### createOptin

`forms.createOptin`

Record a form opt-in on behalf of a contact

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.forms.createOptin({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `formid`    | `string` | Yes      | —           |
| `email`     | `string` | Yes      | —           |
| `firstName` | `string` | No       | —           |
| `lastName`  | `string` | No       | —           |

**Output:** *empty object*

***

### delete

`forms.delete`

Delete a form and its associated data

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.forms.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`forms.get`

Retrieve a form by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.forms.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `form` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="form full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      action?: string | null,
      layout?: string | null,
      style?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`forms.list`

List forms with their field configuration

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.forms.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `forms` | `object[]` | Yes      | —           |
| `meta`  | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="forms full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      action?: string | null,
      layout?: string | null,
      style?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Group Limits

### list

`groupLimits.list`

List the resource limits configured per group

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.groupLimits.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `groupLimits` | `object[]` | Yes      | —           |
| `meta`        | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="groupLimits full type">
    ```ts theme={null}
    {
      id: string,
      group?: string | null,
      groupid?: string | null,
      limitContact?: string | null,
      limitList?: string | null,
      limitCampaign?: string | null,
      limitCampaignType?: string | null,
      limitMail?: string | null,
      limitMailType?: string | null,
      limitUser?: string | null,
      limitAttachment?: string | null,
      abuseRatio?: string | null,
      forceSenderInfo?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Group Members

### create

`groupMembers.create`

Add a custom field to a display group so it becomes visible

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.groupMembers.create({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `rel_id`   | `string` | Yes      | —           |
| `group_id` | `string` | Yes      | —           |
| `ordernum` | `number` | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `groupMember` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="groupMember full type">
    ```ts theme={null}
    {
      id: string,
      rel_id?: string | number | null,
      group_id?: string | number | null,
      ordernum?: string | number | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`groupMembers.delete`

Remove a custom field from its display group

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.groupMembers.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### list

`groupMembers.list`

List which custom fields belong to which display groups

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.groupMembers.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `groupMembers` | `object[]` | Yes      | —           |
| `meta`         | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="groupMembers full type">
    ```ts theme={null}
    {
      id: string,
      rel_id?: string | number | null,
      group_id?: string | number | null,
      ordernum?: string | number | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`groupMembers.update`

Change the display group or ordering of a custom field

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.groupMembers.update({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `id`       | `string` | Yes      | —           |
| `rel_id`   | `string` | No       | —           |
| `group_id` | `string` | No       | —           |
| `ordernum` | `number` | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `groupMember` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="groupMember full type">
    ```ts theme={null}
    {
      id: string,
      rel_id?: string | number | null,
      group_id?: string | number | null,
      ordernum?: string | number | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Groups

### create

`groups.create`

Create a permission group

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.groups.create({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `title`    | `string` | Yes      | —           |
| `descript` | `string` | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `group` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="group full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      p_admin?: string | null,
      sdate?: string | null,
      unsubscribelink?: string | null,
      optinconfirm?: string | null,
      socialdata?: string | null,
      reqApproval?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`groups.delete`

Delete a permission group by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.groups.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`groups.get`

Retrieve a permission group by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.groups.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `group` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="group full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      p_admin?: string | null,
      sdate?: string | null,
      unsubscribelink?: string | null,
      optinconfirm?: string | null,
      socialdata?: string | null,
      reqApproval?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`groups.list`

List permission groups with their settings

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.groups.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name     | Type       | Required | Description |
| -------- | ---------- | -------- | ----------- |
| `groups` | `object[]` | Yes      | —           |
| `meta`   | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="groups full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      p_admin?: string | null,
      sdate?: string | null,
      unsubscribelink?: string | null,
      optinconfirm?: string | null,
      socialdata?: string | null,
      reqApproval?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`groups.update`

Update a permission group title or description

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.groups.update({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `title`    | `string` | No       | —           |
| `descript` | `string` | No       | —           |
| `id`       | `string` | Yes      | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `group` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="group full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      descript?: string | null,
      p_admin?: string | null,
      sdate?: string | null,
      unsubscribelink?: string | null,
      optinconfirm?: string | null,
      socialdata?: string | null,
      reqApproval?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Imports

### createBulk

`imports.createBulk`

Queue up to 250 contacts per call (payload under 400 KB) for asynchronous import

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.imports.createBulk({});
```

**Input**

| Name                  | Type       | Required | Description |
| --------------------- | ---------- | -------- | ----------- |
| `contacts`            | `object[]` | Yes      | —           |
| `exclude_automations` | `boolean`  | No       | —           |
| `callback`            | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="contacts full type">
    ```ts theme={null}
    {
      email: string,
      first_name?: string,
      last_name?: string,
      phone?: string,
      customer_acct_name?: string,
      tags?: string[],
      fields?: {
        id: number,
        value: string
      }[],
      subscribe?: {
        listid: number
      }[],
      unsubscribe?: {
        listid: number
      }[]
    }[]
    ```
  </Accordion>

  <Accordion title="callback full type">
    ```ts theme={null}
    {
      url: string,
      requestType?: GET | POST | PUT | PATCH,
      detailed_results?: boolean | true | false,
      params?: {
      },
      headers?: {
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name              | Type                          | Required | Description |
| ----------------- | ----------------------------- | -------- | ----------- |
| `Success`         | `string \| number`            | No       | —           |
| `success`         | `string \| number \| boolean` | No       | —           |
| `batchId`         | `string`                      | No       | —           |
| `queued_contacts` | `number`                      | No       | —           |
| `queuedContacts`  | `number`                      | No       | —           |
| `message`         | `string`                      | No       | —           |

***

### getStatus

`imports.getStatus`

Retrieve the progress of a single import batch by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.imports.getStatus({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `batchId` | `string` | Yes      | —           |

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `status`  | `any` | No       | —           |
| `success` | `any` | No       | —           |
| `failure` | `any` | No       | —           |

***

### list

`imports.list`

List outstanding and recently completed import batches

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.imports.list({});
```

**Input:** *empty object*

**Output**

| Name                | Type    | Required | Description |
| ------------------- | ------- | -------- | ----------- |
| `outstanding`       | `any[]` | No       | —           |
| `recentlyCompleted` | `any[]` | No       | —           |

***

### listAggregate

`imports.listAggregate`

Retrieve aggregate progress across all bulk import batches

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.imports.listAggregate({});
```

**Input:** *empty object*

**Output:** *empty object*

***

## List Groups

### create

`listGroups.create`

Grant a user group permissions over a mailing list

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.listGroups.create({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `listid`  | `string` | Yes      | —           |
| `groupid` | `string` | Yes      | —           |

**Output**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `listGroup` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="listGroup full type">
    ```ts theme={null}
    {
      id: string,
      list?: string | null,
      group?: string | null,
      p_list_add?: string | null,
      p_list_edit?: string | null,
      p_list_delete?: string | null,
      p_list_filter?: string | null,
      p_list_sync?: string | null,
      p_message_add?: string | null,
      p_message_edit?: string | null,
      p_message_delete?: string | null,
      p_message_send?: string | null,
      p_subscriber_add?: string | null,
      p_subscriber_edit?: string | null,
      p_subscriber_delete?: string | null,
      p_subscriber_import?: string | null,
      p_subscriber_approve?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Lists

### create

`lists.create`

Create a new mailing list

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.lists.create({});
```

**Input**

| Name                    | Type      | Required | Description |
| ----------------------- | --------- | -------- | ----------- |
| `name`                  | `string`  | Yes      | —           |
| `stringid`              | `string`  | Yes      | —           |
| `sender_url`            | `string`  | Yes      | —           |
| `sender_reminder`       | `string`  | Yes      | —           |
| `send_last_broadcast`   | `boolean` | No       | —           |
| `carboncopy`            | `string`  | No       | —           |
| `subscription_notify`   | `string`  | No       | —           |
| `unsubscription_notify` | `string`  | No       | —           |
| `user`                  | `string`  | No       | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `list` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="list full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      stringid?: string | null,
      userid?: string | null,
      user?: string | null,
      description?: string | null,
      cdate?: string | null,
      udate?: string | null,
      channel?: string | null,
      private?: string | null,
      deletestamp?: string | null,
      active_subscribers?: string | null,
      non_deleted_subscribers?: string | null,
      subscription_notify?: string | null,
      unsubscription_notify?: string | null,
      require_name?: string | null,
      get_unsubscribe_reason?: string | null,
      to_name?: string | null,
      optinoptout?: string | null,
      optinmessageid?: string | null,
      optoutconf?: string | null,
      carboncopy?: string | null,
      fulladdress?: string | null,
      sender_name?: string | null,
      sender_addr1?: string | null,
      sender_addr2?: string | null,
      sender_city?: string | null,
      sender_state?: string | null,
      sender_zip?: string | null,
      sender_country?: string | null,
      sender_phone?: string | null,
      sender_url?: string | null,
      sender_reminder?: string | null,
      send_last_broadcast?: string | null,
      analytics_domains?: string | null,
      analytics_source?: string | null,
      analytics_ua?: string | null,
      twitter_token?: string | null,
      twitter_token_secret?: string | null,
      facebook_session?: string | null,
      p_use_tracking?: string | null,
      p_use_analytics_read?: string | null,
      p_use_analytics_link?: string | null,
      p_use_twitter?: string | null,
      p_use_facebook?: string | null,
      p_embed_image?: string | null,
      p_use_captcha?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`lists.delete`

Delete a mailing list by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.lists.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`lists.get`

Retrieve a mailing list by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.lists.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `list` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="list full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      stringid?: string | null,
      userid?: string | null,
      user?: string | null,
      description?: string | null,
      cdate?: string | null,
      udate?: string | null,
      channel?: string | null,
      private?: string | null,
      deletestamp?: string | null,
      active_subscribers?: string | null,
      non_deleted_subscribers?: string | null,
      subscription_notify?: string | null,
      unsubscription_notify?: string | null,
      require_name?: string | null,
      get_unsubscribe_reason?: string | null,
      to_name?: string | null,
      optinoptout?: string | null,
      optinmessageid?: string | null,
      optoutconf?: string | null,
      carboncopy?: string | null,
      fulladdress?: string | null,
      sender_name?: string | null,
      sender_addr1?: string | null,
      sender_addr2?: string | null,
      sender_city?: string | null,
      sender_state?: string | null,
      sender_zip?: string | null,
      sender_country?: string | null,
      sender_phone?: string | null,
      sender_url?: string | null,
      sender_reminder?: string | null,
      send_last_broadcast?: string | null,
      analytics_domains?: string | null,
      analytics_source?: string | null,
      analytics_ua?: string | null,
      twitter_token?: string | null,
      twitter_token_secret?: string | null,
      facebook_session?: string | null,
      p_use_tracking?: string | null,
      p_use_analytics_read?: string | null,
      p_use_analytics_link?: string | null,
      p_use_twitter?: string | null,
      p_use_facebook?: string | null,
      p_embed_image?: string | null,
      p_use_captcha?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`lists.list`

List mailing lists with pagination

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.lists.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `name`   | `string` | No       | —           |

**Output**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `lists` | `object[]` | Yes      | —           |
| `meta`  | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="lists full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      stringid?: string | null,
      userid?: string | null,
      user?: string | null,
      description?: string | null,
      cdate?: string | null,
      udate?: string | null,
      channel?: string | null,
      private?: string | null,
      deletestamp?: string | null,
      active_subscribers?: string | null,
      non_deleted_subscribers?: string | null,
      subscription_notify?: string | null,
      unsubscription_notify?: string | null,
      require_name?: string | null,
      get_unsubscribe_reason?: string | null,
      to_name?: string | null,
      optinoptout?: string | null,
      optinmessageid?: string | null,
      optoutconf?: string | null,
      carboncopy?: string | null,
      fulladdress?: string | null,
      sender_name?: string | null,
      sender_addr1?: string | null,
      sender_addr2?: string | null,
      sender_city?: string | null,
      sender_state?: string | null,
      sender_zip?: string | null,
      sender_country?: string | null,
      sender_phone?: string | null,
      sender_url?: string | null,
      sender_reminder?: string | null,
      send_last_broadcast?: string | null,
      analytics_domains?: string | null,
      analytics_source?: string | null,
      analytics_ua?: string | null,
      twitter_token?: string | null,
      twitter_token_secret?: string | null,
      facebook_session?: string | null,
      p_use_tracking?: string | null,
      p_use_analytics_read?: string | null,
      p_use_analytics_link?: string | null,
      p_use_twitter?: string | null,
      p_use_facebook?: string | null,
      p_embed_image?: string | null,
      p_use_captcha?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### updateSubscription

`lists.updateSubscription`

Subscribe or unsubscribe a contact to or from a list

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.lists.updateSubscription({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `list`    | `string` | Yes      | —           |
| `contact` | `string` | Yes      | —           |
| `status`  | `1 \| 2` | Yes      | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `contactList` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="contactList full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      list?: string | null,
      status?: string | null,
      form?: string | null,
      seriesid?: string | null,
      sdate?: string | null,
      udate?: string | null,
      responder?: string | null,
      sync?: string | null,
      unsubreason?: string | null,
      campaign?: string | null,
      message?: string | null,
      first_name?: string | null,
      last_name?: string | null,
      ip4Sub?: string | null,
      ip4Unsub?: string | null,
      ip4_last?: string | null,
      sourceid?: string | null,
      autosyncLog?: string | null,
      unsubscribeAutomation?: string | null,
      automation?: string | null,
      channel?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Messages

### create

`messages.create`

Create an email message with subject, sender and content

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.messages.create({});
```

**Input**

| Name             | Type                   | Required | Description |
| ---------------- | ---------------------- | -------- | ----------- |
| `subject`        | `string`               | Yes      | —           |
| `fromname`       | `string`               | Yes      | —           |
| `fromemail`      | `string`               | Yes      | —           |
| `reply2`         | `string`               | Yes      | —           |
| `html`           | `string`               | No       | —           |
| `text`           | `string`               | No       | —           |
| `name`           | `string`               | No       | —           |
| `format`         | `html \| text \| mime` | No       | —           |
| `user`           | `string`               | No       | —           |
| `preheader_text` | `string`               | No       | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `message` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="message full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      subject?: string | null,
      preheader_text?: string | null,
      fromname?: string | null,
      fromemail?: string | null,
      reply2?: string | null,
      html?: string | null,
      text?: string | null,
      htmlfetch?: string | null,
      textfetch?: string | null,
      charset?: string | null,
      encoding?: string | null,
      format?: string | null,
      language_code?: string | null,
      priority?: string | null,
      source?: string | null,
      hidden?: string | null,
      user?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      ed_instanceid?: string | null,
      ed_version?: string | null,
      has_predictive_content?: string | null,
      preview_data?: any | null,
      preview_mime?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`messages.delete`

Delete an email message by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.messages.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`messages.get`

Retrieve an email message by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.messages.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `message` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="message full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      subject?: string | null,
      preheader_text?: string | null,
      fromname?: string | null,
      fromemail?: string | null,
      reply2?: string | null,
      html?: string | null,
      text?: string | null,
      htmlfetch?: string | null,
      textfetch?: string | null,
      charset?: string | null,
      encoding?: string | null,
      format?: string | null,
      language_code?: string | null,
      priority?: string | null,
      source?: string | null,
      hidden?: string | null,
      user?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      ed_instanceid?: string | null,
      ed_version?: string | null,
      has_predictive_content?: string | null,
      preview_data?: any | null,
      preview_mime?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`messages.list`

List email messages with pagination

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.messages.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `messages` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="messages full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      subject?: string | null,
      preheader_text?: string | null,
      fromname?: string | null,
      fromemail?: string | null,
      reply2?: string | null,
      html?: string | null,
      text?: string | null,
      htmlfetch?: string | null,
      textfetch?: string | null,
      charset?: string | null,
      encoding?: string | null,
      format?: string | null,
      language_code?: string | null,
      priority?: string | null,
      source?: string | null,
      hidden?: string | null,
      user?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      ed_instanceid?: string | null,
      ed_version?: string | null,
      has_predictive_content?: string | null,
      preview_data?: any | null,
      preview_mime?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`messages.update`

Update an existing email message

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.messages.update({});
```

**Input**

| Name             | Type                   | Required | Description |
| ---------------- | ---------------------- | -------- | ----------- |
| `subject`        | `string`               | No       | —           |
| `fromname`       | `string`               | No       | —           |
| `fromemail`      | `string`               | No       | —           |
| `reply2`         | `string`               | No       | —           |
| `html`           | `string`               | No       | —           |
| `text`           | `string`               | No       | —           |
| `name`           | `string`               | No       | —           |
| `format`         | `html \| text \| mime` | No       | —           |
| `user`           | `string`               | No       | —           |
| `preheader_text` | `string`               | No       | —           |
| `id`             | `string`               | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `message` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="message full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      subject?: string | null,
      preheader_text?: string | null,
      fromname?: string | null,
      fromemail?: string | null,
      reply2?: string | null,
      html?: string | null,
      text?: string | null,
      htmlfetch?: string | null,
      textfetch?: string | null,
      charset?: string | null,
      encoding?: string | null,
      format?: string | null,
      language_code?: string | null,
      priority?: string | null,
      source?: string | null,
      hidden?: string | null,
      user?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      ed_instanceid?: string | null,
      ed_version?: string | null,
      has_predictive_content?: string | null,
      preview_data?: any | null,
      preview_mime?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Notes

### addToContact

`notes.addToContact`

Add a note to a contact identified by email address

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.addToContact({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `email` | `string` | Yes      | —           |
| `note`  | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### create

`notes.create`

Create a note against a contact, deal or account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.create({});
```

**Input**

| Name      | Type                            | Required | Description |
| --------- | ------------------------------- | -------- | ----------- |
| `note`    | `string`                        | Yes      | —           |
| `reltype` | `Subscriber \| Deal \| Account` | Yes      | —           |
| `relid`   | `string`                        | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### createForAccount

`notes.createForAccount`

Add a note to a CRM account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.createForAccount({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `id`   | `string` | Yes      | —           |
| `note` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### createForDeal

`notes.createForDeal`

Add a note to a deal

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.createForDeal({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `id`   | `string` | Yes      | —           |
| `note` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`notes.delete`

Delete a note by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.notes.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`notes.get`

Retrieve a note by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.notes.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`notes.list`

List notes across contacts, deals and accounts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.notes.list({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `limit`   | `number` | No       | —           |
| `offset`  | `number` | No       | —           |
| `reltype` | `string` | No       | —           |
| `relid`   | `string` | No       | —           |

**Output**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `notes` | `object[]` | Yes      | —           |
| `meta`  | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="notes full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`notes.update`

Update the body of an existing note

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.update({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `id`   | `string` | Yes      | —           |
| `note` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### updateForAccount

`notes.updateForAccount`

Update a note attached to a CRM account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.updateForAccount({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `id`   | `string` | Yes      | —           |
| `note` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### updateForDeal

`notes.updateForDeal`

Update a note attached to a deal

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.notes.updateForDeal({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `id`   | `string` | Yes      | —           |
| `note` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `note` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="note full type">
    ```ts theme={null}
    {
      id: string,
      note?: string | null,
      reltype?: string | null,
      relid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      userid?: string | null,
      user?: string | null,
      is_draft?: string | null,
      owner?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Orders

### upsertBulk

`orders.upsertBulk`

Create or update many orders synchronously

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.orders.upsertBulk({});
```

**Input**

| Name     | Type       | Required | Description |
| -------- | ---------- | -------- | ----------- |
| `orders` | `object[]` | Yes      | —           |

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

**Output:** *empty object*

***

### upsertBulkAsync

`orders.upsertBulkAsync`

Create or update many orders asynchronously

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.orders.upsertBulkAsync({});
```

**Input**

| Name     | Type       | Required | Description |
| -------- | ---------- | -------- | ----------- |
| `orders` | `object[]` | Yes      | —           |

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

**Output:** *empty object*

***

## Personalizations

### create

`personalizations.create`

Create a personalization variable

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.personalizations.create({});
```

**Input**

| Name      | Type       | Required | Description |
| --------- | ---------- | -------- | ----------- |
| `name`    | `string`   | Yes      | —           |
| `tag`     | `string`   | Yes      | —           |
| `content` | `string`   | Yes      | —           |
| `format`  | `string`   | No       | —           |
| `lists`   | `string[]` | No       | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `personalization` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="personalization full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      tag?: string | null,
      content?: string | null,
      format?: string | null,
      locked?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`personalizations.delete`

Delete a personalization variable

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.personalizations.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### deleteBulk

`personalizations.deleteBulk`

Delete many personalization variables at once

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.personalizations.deleteBulk({});
```

**Input**

| Name  | Type                   | Required | Description |
| ----- | ---------------------- | -------- | ----------- |
| `ids` | `(string \| number)[]` | Yes      | —           |

**Output**

| Name  | Type                   | Required | Description |
| ----- | ---------------------- | -------- | ----------- |
| `ids` | `(string \| number)[]` | Yes      | —           |

***

### get

`personalizations.get`

Retrieve a personalization variable by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.personalizations.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `personalization` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="personalization full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      tag?: string | null,
      content?: string | null,
      format?: string | null,
      locked?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`personalizations.list`

List personalization variables

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.personalizations.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name               | Type       | Required | Description |
| ------------------ | ---------- | -------- | ----------- |
| `personalizations` | `object[]` | Yes      | —           |
| `meta`             | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="personalizations full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      tag?: string | null,
      content?: string | null,
      format?: string | null,
      locked?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### lock

`personalizations.lock`

Lock a personalization variable against edits

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.personalizations.lock({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `personalization` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="personalization full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      tag?: string | null,
      content?: string | null,
      format?: string | null,
      locked?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### unlock

`personalizations.unlock`

Unlock a personalization variable for editing

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.personalizations.unlock({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `personalization` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="personalization full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      tag?: string | null,
      content?: string | null,
      format?: string | null,
      locked?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`personalizations.update`

Edit an existing personalization variable

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.personalizations.update({});
```

**Input**

| Name      | Type       | Required | Description |
| --------- | ---------- | -------- | ----------- |
| `name`    | `string`   | No       | —           |
| `tag`     | `string`   | No       | —           |
| `content` | `string`   | No       | —           |
| `format`  | `string`   | No       | —           |
| `lists`   | `string[]` | No       | —           |
| `id`      | `string`   | Yes      | —           |

**Output**

| Name              | Type     | Required | Description |
| ----------------- | -------- | -------- | ----------- |
| `personalization` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="personalization full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      tag?: string | null,
      content?: string | null,
      format?: string | null,
      locked?: string | null,
      cdate?: string | null,
      udate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Products

### create

`products.create`

Create a product in the e-commerce catalog

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.products.create({});
```

**Input**

| Name                 | Type      | Required | Description |
| -------------------- | --------- | -------- | ----------- |
| `legacyConnectionId` | `string`  | Yes      | —           |
| `name`               | `string`  | Yes      | —           |
| `sku`                | `string`  | No       | —           |
| `price`              | `number`  | No       | —           |
| `currency`           | `string`  | No       | —           |
| `description`        | `string`  | No       | —           |
| `imageUrl`           | `string`  | No       | —           |
| `productUrl`         | `string`  | No       | —           |
| `isVariant`          | `boolean` | No       | —           |

**Output**

| Name            | Type  | Required | Description |
| --------------- | ----- | -------- | ----------- |
| `createProduct` | `any` | No       | —           |

***

### delete

`products.delete`

Delete a product from the e-commerce catalog

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.products.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name            | Type  | Required | Description |
| --------------- | ----- | -------- | ----------- |
| `deleteProduct` | `any` | No       | —           |

***

### get

`products.get`

Retrieve a catalog product by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.products.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `product` | `any` | No       | —           |

***

### search

`products.search`

Search the e-commerce product catalog

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.products.search({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `filter` | `object` | No       | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

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

**Output**

| Name       | Type    | Required | Description |
| ---------- | ------- | -------- | ----------- |
| `products` | `any[]` | No       | —           |

***

### update

`products.update`

Update a catalog product

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.products.update({});
```

**Input**

| Name                 | Type      | Required | Description |
| -------------------- | --------- | -------- | ----------- |
| `legacyConnectionId` | `string`  | No       | —           |
| `name`               | `string`  | No       | —           |
| `sku`                | `string`  | No       | —           |
| `price`              | `number`  | No       | —           |
| `currency`           | `string`  | No       | —           |
| `description`        | `string`  | No       | —           |
| `imageUrl`           | `string`  | No       | —           |
| `productUrl`         | `string`  | No       | —           |
| `isVariant`          | `boolean` | No       | —           |
| `id`                 | `string`  | Yes      | —           |

**Output**

| Name            | Type  | Required | Description |
| --------------- | ----- | -------- | ----------- |
| `updateProduct` | `any` | No       | —           |

***

### upsertBulk

`products.upsertBulk`

Create or update many catalog products in one request

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.products.upsertBulk({});
```

**Input**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `products` | `object[]` | Yes      | —           |

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

**Output:** *empty object*

***

## Recurring Payments

### search

`recurringPayments.search`

Search recurring payment records by filter

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.recurringPayments.search({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `filter` | `object` | No       | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

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

**Output**

| Name                | Type    | Required | Description |
| ------------------- | ------- | -------- | ----------- |
| `recurringPayments` | `any[]` | No       | —           |

***

### upsertBulk

`recurringPayments.upsertBulk`

Create or update many recurring payments at once

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.recurringPayments.upsertBulk({});
```

**Input**

| Name                | Type       | Required | Description |
| ------------------- | ---------- | -------- | ----------- |
| `recurringPayments` | `object[]` | Yes      | —           |

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

**Output:** *empty object*

***

## Saved Responses

### create

`savedResponses.create`

Create a reusable saved response template

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.savedResponses.create({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `title`   | `string` | Yes      | —           |
| `subject` | `string` | Yes      | —           |
| `body`    | `string` | Yes      | —           |
| `userid`  | `string` | No       | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `savedResponse` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="savedResponse full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      subject?: string | null,
      body?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`savedResponses.delete`

Delete a saved response template

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.savedResponses.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`savedResponses.get`

Retrieve a saved response by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.savedResponses.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `savedResponse` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="savedResponse full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      subject?: string | null,
      body?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`savedResponses.list`

List saved response templates

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.savedResponses.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name             | Type       | Required | Description |
| ---------------- | ---------- | -------- | ----------- |
| `savedResponses` | `object[]` | Yes      | —           |
| `meta`           | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="savedResponses full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      subject?: string | null,
      body?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`savedResponses.update`

Update a saved response template

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.savedResponses.update({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `title`   | `string` | No       | —           |
| `subject` | `string` | No       | —           |
| `body`    | `string` | No       | —           |
| `userid`  | `string` | No       | —           |
| `id`      | `string` | Yes      | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `savedResponse` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="savedResponse full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      subject?: string | null,
      body?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Scores

### list

`scores.list`

List the scoring rules configured on the account

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.scores.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name     | Type       | Required | Description |
| -------- | ---------- | -------- | ----------- |
| `scores` | `object[]` | Yes      | —           |
| `meta`   | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="scores full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      descript?: string | null,
      reltype?: string | null,
      status?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Segments

### create

`segments.create`

Create a segment with filtering conditions

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.segments.create({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `name`  | `string` | Yes      | —           |
| `logic` | `string` | No       | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `segment` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="segment full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      logic?: string | null,
      hidden?: string | null,
      seriesid?: string | null,
      segmentid_v2?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`segments.delete`

Delete a segment and its history

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.segments.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`segments.get`

Retrieve a segment by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segments.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `segment` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="segment full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      logic?: string | null,
      hidden?: string | null,
      seriesid?: string | null,
      segmentid_v2?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`segments.list`

List contact segments

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segments.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `segments` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="segments full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      logic?: string | null,
      hidden?: string | null,
      seriesid?: string | null,
      segmentid_v2?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### listAudiences

`segments.listAudiences`

List saved segment summaries, known as audiences

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segments.listAudiences({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `name`   | `string` | No       | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `segments` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="segments full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      logic?: string | null,
      hidden?: string | null,
      seriesid?: string | null,
      segmentid_v2?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`segments.update`

Update a segment definition

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.segments.update({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `name`  | `string` | No       | —           |
| `logic` | `string` | No       | —           |
| `id`    | `string` | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `segment` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="segment full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      logic?: string | null,
      hidden?: string | null,
      seriesid?: string | null,
      segmentid_v2?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Segments V2

### countAtTimestamp

`segmentsV2.countAtTimestamp`

Retrieve segment counts recorded before a timestamp

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.countAtTimestamp({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `timestamp` | `string` | Yes      | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `segmentCounts` | `any[]`  | No       | —           |
| `meta`          | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### countHistory

`segmentsV2.countHistory`

List historic result counts for one segment

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.countHistory({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `segmentCounts` | `any[]`  | No       | —           |
| `meta`          | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### create

`segmentsV2.create`

Create an advanced segment with filtering conditions

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.create({});
```

**Input**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `name`        | `string`   | Yes      | —           |
| `description` | `string`   | No       | —           |
| `conditions`  | `object[]` | No       | —           |

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

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `segment` | `any` | Yes      | —           |

***

### delete

`segmentsV2.delete`

Delete a segment and every historic version of it

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `segment` | `any` | Yes      | —           |

***

### get

`segmentsV2.get`

Retrieve a V2 segment by its UUID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `segment` | `any` | Yes      | —           |

***

### getAtTimestamp

`segmentsV2.getAtTimestamp`

Retrieve a segment as it stood at a point in time

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.getAtTimestamp({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `timestamp` | `string` | Yes      | —           |

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `segment` | `any` | Yes      | —           |

***

### match

`segmentsV2.match`

Check whether a contact matches a segment

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.match({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `contactId` | `string` | Yes      | —           |

**Output:** *empty object*

***

### matchAll

`segmentsV2.matchAll`

Start a match-all evaluation for every contact in a segment

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.matchAll({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type      | Required | Description |
| ---------- | --------- | -------- | ----------- |
| `is_ready` | `boolean` | No       | —           |
| `run_id`   | `any`     | No       | —           |

***

### matchAllResult

`segmentsV2.matchAllResult`

Fetch a match-all result set by its run ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.matchAllResult({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `runId` | `string` | Yes      | —           |

**Output**

| Name       | Type      | Required | Description |
| ---------- | --------- | -------- | ----------- |
| `is_ready` | `boolean` | No       | —           |
| `run_id`   | `any`     | No       | —           |

***

### matchByExternalId

`segmentsV2.matchByExternalId`

Check segment membership using an external contact ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.matchByExternalId({});
```

**Input**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `id`         | `string` | Yes      | —           |
| `externalId` | `string` | Yes      | —           |

**Output:** *empty object*

***

### matchSomeResult

`segmentsV2.matchSomeResult`

Fetch a partial segment match result set by run ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.matchSomeResult({});
```

**Input**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `runId` | `string` | Yes      | —           |

**Output**

| Name       | Type      | Required | Description |
| ---------- | --------- | -------- | ----------- |
| `is_ready` | `boolean` | No       | —           |
| `run_id`   | `any`     | No       | —           |

***

### recentCounts

`segmentsV2.recentCounts`

Retrieve the most recent result count per segment

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.recentCounts({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `segmentCounts` | `any[]`  | No       | —           |
| `meta`          | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### revertToTimestamp

`segmentsV2.revertToTimestamp`

Revert a segment to how it looked at a point in time

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.revertToTimestamp({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `id`        | `string` | Yes      | —           |
| `timestamp` | `string` | Yes      | —           |

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `segment` | `any` | Yes      | —           |

***

### update

`segmentsV2.update`

Update a V2 segment definition

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.segmentsV2.update({});
```

**Input**

| Name          | Type       | Required | Description |
| ------------- | ---------- | -------- | ----------- |
| `name`        | `string`   | No       | —           |
| `description` | `string`   | No       | —           |
| `conditions`  | `object[]` | No       | —           |
| `id`          | `string`   | Yes      | —           |

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

**Output**

| Name      | Type  | Required | Description |
| --------- | ----- | -------- | ----------- |
| `segment` | `any` | Yes      | —           |

***

## Sms Broadcast Lists

### list

`smsBroadcastLists.list`

List the SMS broadcast lists available on the account

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcastLists.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `name`   | `string` | No       | —           |

**Output**

| Name    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `lists` | `any[]`  | No       | —           |
| `meta`  | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Sms Broadcasts

### createSnapshot

`smsBroadcasts.createSnapshot`

Request a metrics snapshot for specific SMS broadcasts

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcasts.createSnapshot({});
```

**Input**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `broadcastIds` | `string[]` | Yes      | —           |

**Output:** *empty object*

***

### getFailures

`smsBroadcasts.getFailures`

Group and count SMS delivery failures for a broadcast

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcasts.getFailures({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `broadcastId` | `string` | Yes      | —           |
| `startDate`   | `string` | No       | —           |
| `endDate`     | `string` | No       | —           |

**Output:** *empty object*

***

### getMetrics

`smsBroadcasts.getMetrics`

Retrieve delivery metrics for specific SMS broadcasts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcasts.getMetrics({});
```

**Input**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `broadcastIds` | `string[]` | No       | —           |

**Output:** *empty object*

***

### getRecipients

`smsBroadcasts.getRecipients`

List the contacts an SMS broadcast was sent to

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcasts.getRecipients({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `id`     | `string` | Yes      | —           |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output:** *empty object*

***

### getSnapshot

`smsBroadcasts.getSnapshot`

Retrieve aggregate metrics across all SMS broadcasts

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcasts.getSnapshot({});
```

**Input:** *empty object*

**Output**

| Name       | Type  | Required | Description |
| ---------- | ----- | -------- | ----------- |
| `snapshot` | `any` | No       | —           |

***

### list

`smsBroadcasts.list`

List SMS broadcasts with optional name and status filters

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsBroadcasts.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `name`   | `string` | No       | —           |
| `status` | `string` | No       | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `broadcasts` | `any[]`  | No       | —           |
| `meta`       | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Sms Credits

### get

`smsCredits.get`

Retrieve SMS credit usage and remaining balance

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.smsCredits.get({});
```

**Input:** *empty object*

**Output**

| Name         | Type  | Required | Description |
| ------------ | ----- | -------- | ----------- |
| `smsCredits` | `any` | No       | —           |

***

## Tags

### addToContact

`tags.addToContact`

Apply a tag to a contact

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tags.addToContact({});
```

**Input**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `contact` | `string` | Yes      | —           |
| `tag`     | `string` | Yes      | —           |

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `contactTag` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="contactTag full type">
    ```ts theme={null}
    {
      id: string,
      contact?: string | null,
      tag?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### create

`tags.create`

Create a new tag

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tags.create({});
```

**Input**

| Name          | Type                  | Required | Description |
| ------------- | --------------------- | -------- | ----------- |
| `tag`         | `string`              | Yes      | —           |
| `tagType`     | `contact \| template` | Yes      | —           |
| `description` | `string`              | No       | —           |

**Output**

| Name  | Type     | Required | Description |
| ----- | -------- | -------- | ----------- |
| `tag` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="tag full type">
    ```ts theme={null}
    {
      id: string,
      tag?: string | null,
      tagType?: string | null,
      description?: string | null,
      subscriber_count?: string | null,
      deleted?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`tags.delete`

Delete a tag by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.tags.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`tags.get`

Retrieve a tag by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.tags.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name  | Type     | Required | Description |
| ----- | -------- | -------- | ----------- |
| `tag` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="tag full type">
    ```ts theme={null}
    {
      id: string,
      tag?: string | null,
      tagType?: string | null,
      description?: string | null,
      subscriber_count?: string | null,
      deleted?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`tags.list`

List tags with pagination and search

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.tags.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |
| `search` | `string` | No       | —           |

**Output**

| Name   | Type       | Required | Description |
| ------ | ---------- | -------- | ----------- |
| `tags` | `object[]` | Yes      | —           |
| `meta` | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="tags full type">
    ```ts theme={null}
    {
      id: string,
      tag?: string | null,
      tagType?: string | null,
      description?: string | null,
      subscriber_count?: string | null,
      deleted?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### removeFromContact

`tags.removeFromContact`

Remove a tag from a contact by its contactTag ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.tags.removeFromContact({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### update

`tags.update`

Update an existing tag by its ID

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tags.update({});
```

**Input**

| Name          | Type                  | Required | Description |
| ------------- | --------------------- | -------- | ----------- |
| `id`          | `string`              | Yes      | —           |
| `tag`         | `string`              | No       | —           |
| `tagType`     | `contact \| template` | No       | —           |
| `description` | `string`              | No       | —           |

**Output**

| Name  | Type     | Required | Description |
| ----- | -------- | -------- | ----------- |
| `tag` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="tag full type">
    ```ts theme={null}
    {
      id: string,
      tag?: string | null,
      tagType?: string | null,
      description?: string | null,
      subscriber_count?: string | null,
      deleted?: string | null,
      cdate?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_timestamp?: string | null,
      updated_timestamp?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Task Outcomes

### create

`taskOutcomes.create`

Create a task outcome with an associated sentiment

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.taskOutcomes.create({});
```

**Input**

| Name            | Type                              | Required | Description |
| --------------- | --------------------------------- | -------- | ----------- |
| `title`         | `string`                          | Yes      | —           |
| `sentiment`     | `positive \| neutral \| negative` | No       | —           |
| `status`        | `number`                          | No       | —           |
| `dealTasktypes` | `string[]`                        | No       | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `taskOutcome` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="taskOutcome full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      sentiment?: string | null,
      disabled?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      dealTasktype_ids?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### get

`taskOutcomes.get`

Retrieve a task outcome by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.taskOutcomes.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `taskOutcome` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="taskOutcome full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      sentiment?: string | null,
      disabled?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      dealTasktype_ids?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`taskOutcomes.list`

List the outcomes that can be assigned to tasks

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.taskOutcomes.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name           | Type       | Required | Description |
| -------------- | ---------- | -------- | ----------- |
| `taskOutcomes` | `object[]` | Yes      | —           |
| `meta`         | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="taskOutcomes full type">
    ```ts theme={null}
    {
      id: string,
      title?: string | null,
      sentiment?: string | null,
      disabled?: string | null,
      created_by?: string | null,
      updated_by?: string | null,
      created_utc_timestamp?: string | null,
      updated_utc_timestamp?: string | null,
      dealTasktype_ids?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Task Reminders

### create

`taskReminders.create`

Create a reminder ahead of a deal task due date

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.taskReminders.create({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `dealTask` | `string` | Yes      | —           |
| `interval` | `number` | Yes      | —           |

**Output**

| Name               | Type  | Required | Description |
| ------------------ | ----- | -------- | ----------- |
| `taskNotification` | `any` | Yes      | —           |

***

## Templates

### createShareLink

`templates.createShareLink`

Create a shareable link for a campaign template

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.templates.createShareLink({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output:** *empty object*

***

### get

`templates.get`

Retrieve a campaign template by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.templates.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `template` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="template full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      subject?: string | null,
      content?: string | null,
      categoryid?: string | null,
      userid?: string | null,
      cdate?: string | null,
      mdate?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Tracking

### addWhitelist

`tracking.addWhitelist`

Add a domain to the site tracking whitelist

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tracking.addWhitelist({});
```

**Input**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `name` | `string` | Yes      | —           |

**Output:** *empty object*

***

### getCode

`tracking.getCode`

Retrieve the site tracking JavaScript snippet

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.tracking.getCode({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### getEventStatus

`tracking.getEventStatus`

Check whether event tracking is enabled

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.tracking.getEventStatus({});
```

**Input:** *empty object*

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `eventTracking` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="eventTracking full type">
    ```ts theme={null}
    {
      enabled: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getSiteStatus

`tracking.getSiteStatus`

Check whether site tracking is enabled

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.tracking.getSiteStatus({});
```

**Input:** *empty object*

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `siteTracking` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="siteTracking full type">
    ```ts theme={null}
    {
      enabled: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

***

### listWhitelist

`tracking.listWhitelist`

List the domains allowed for site tracking

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.tracking.listWhitelist({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name                    | Type     | Required | Description |
| ----------------------- | -------- | -------- | ----------- |
| `siteTrackingWhitelist` | `any[]`  | No       | —           |
| `meta`                  | `object` | No       | —           |

<AccordionGroup>
  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### removeWhitelist

`tracking.removeWhitelist`

Remove a domain from the site tracking whitelist

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.tracking.removeWhitelist({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### setEventStatus

`tracking.setEventStatus`

Enable or disable event tracking for the account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tracking.setEventStatus({});
```

**Input**

| Name      | Type      | Required | Description |
| --------- | --------- | -------- | ----------- |
| `enabled` | `boolean` | Yes      | —           |

**Output**

| Name            | Type     | Required | Description |
| --------------- | -------- | -------- | ----------- |
| `eventTracking` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="eventTracking full type">
    ```ts theme={null}
    {
      enabled: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

***

### setSiteStatus

`tracking.setSiteStatus`

Enable or disable site tracking for the account

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tracking.setSiteStatus({});
```

**Input**

| Name      | Type      | Required | Description |
| --------- | --------- | -------- | ----------- |
| `enabled` | `boolean` | Yes      | —           |

**Output**

| Name           | Type     | Required | Description |
| -------------- | -------- | -------- | ----------- |
| `siteTracking` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="siteTracking full type">
    ```ts theme={null}
    {
      enabled: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

***

### trackEvent

`tracking.trackEvent`

Record a custom event against a contact

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.tracking.trackEvent({});
```

**Input**

| Name        | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `actid`     | `string` | Yes      | —           |
| `key`       | `string` | Yes      | —           |
| `event`     | `string` | Yes      | —           |
| `email`     | `string` | Yes      | —           |
| `eventdata` | `string` | No       | —           |

**Output:** *empty object*

***

## Users

### create

`users.create`

Create an account user who can sign in

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.users.create({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `username`    | `string` | Yes      | —           |
| `email`       | `string` | Yes      | —           |
| `firstName`   | `string` | Yes      | —           |
| `lastName`    | `string` | Yes      | —           |
| `password`    | `string` | Yes      | —           |
| `group`       | `string` | Yes      | —           |
| `phone`       | `string` | No       | —           |
| `signature`   | `string` | No       | —           |
| `lang`        | `string` | No       | —           |
| `localZoneid` | `string` | No       | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `user` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="user full type">
    ```ts theme={null}
    {
      id: string,
      username?: string | null,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      signature?: string | null,
      lang?: string | null,
      localZoneid?: string | null,
      mfaEnabled?: string | number | null,
      roles?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`users.delete`

Delete an account user by their ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.users.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`users.get`

Retrieve an account user by their ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.users.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `user` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="user full type">
    ```ts theme={null}
    {
      id: string,
      username?: string | null,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      signature?: string | null,
      lang?: string | null,
      localZoneid?: string | null,
      mfaEnabled?: string | number | null,
      roles?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getByUsername

`users.getByUsername`

Retrieve an account user by their username

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.users.getByUsername({});
```

**Input**

| Name       | Type     | Required | Description |
| ---------- | -------- | -------- | ----------- |
| `username` | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `user` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="user full type">
    ```ts theme={null}
    {
      id: string,
      username?: string | null,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      signature?: string | null,
      lang?: string | null,
      localZoneid?: string | null,
      mfaEnabled?: string | number | null,
      roles?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getMe

`users.getMe`

Retrieve the user the API token belongs to

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.users.getMe({});
```

**Input:** *empty object*

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `user` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="user full type">
    ```ts theme={null}
    {
      id: string,
      username?: string | null,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      signature?: string | null,
      lang?: string | null,
      localZoneid?: string | null,
      mfaEnabled?: string | number | null,
      roles?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`users.list`

List account users with pagination and sorting

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.users.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name    | Type       | Required | Description |
| ------- | ---------- | -------- | ----------- |
| `users` | `object[]` | Yes      | —           |
| `meta`  | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="users full type">
    ```ts theme={null}
    {
      id: string,
      username?: string | null,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      signature?: string | null,
      lang?: string | null,
      localZoneid?: string | null,
      mfaEnabled?: string | number | null,
      roles?: any | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`users.update`

Update an account user, including group assignment

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.users.update({});
```

**Input**

| Name          | Type     | Required | Description |
| ------------- | -------- | -------- | ----------- |
| `username`    | `string` | No       | —           |
| `email`       | `string` | No       | —           |
| `firstName`   | `string` | No       | —           |
| `lastName`    | `string` | No       | —           |
| `password`    | `string` | No       | —           |
| `group`       | `string` | No       | —           |
| `phone`       | `string` | No       | —           |
| `signature`   | `string` | No       | —           |
| `lang`        | `string` | No       | —           |
| `localZoneid` | `string` | No       | —           |
| `id`          | `string` | Yes      | —           |

**Output**

| Name   | Type     | Required | Description |
| ------ | -------- | -------- | ----------- |
| `user` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="user full type">
    ```ts theme={null}
    {
      id: string,
      username?: string | null,
      email?: string | null,
      firstName?: string | null,
      lastName?: string | null,
      phone?: string | null,
      signature?: string | null,
      lang?: string | null,
      localZoneid?: string | null,
      mfaEnabled?: string | number | null,
      roles?: any | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Webhooks

### create

`webhooks.create`

Create a webhook subscription for account events

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.webhooks.create({});
```

**Input**

| Name      | Type                                 | Required | Description |
| --------- | ------------------------------------ | -------- | ----------- |
| `name`    | `string`                             | Yes      | —           |
| `url`     | `string`                             | Yes      | —           |
| `events`  | `string[]`                           | Yes      | —           |
| `sources` | `public \| admin \| api \| system[]` | Yes      | —           |
| `listid`  | `string`                             | No       | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `webhook` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="webhook full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      url?: string | null,
      events?: any | null,
      sources?: any | null,
      listid?: string | null,
      cdate?: string | null,
      state?: string | null,
      deactivated_date?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`webhooks.delete`

Delete a webhook subscription by its ID

**Risk:** `destructive`

```ts theme={null}
await corsair.activecampaign.api.webhooks.delete({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

***

### get

`webhooks.get`

Retrieve a webhook subscription by its ID

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.webhooks.get({});
```

**Input**

| Name | Type     | Required | Description |
| ---- | -------- | -------- | ----------- |
| `id` | `string` | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `webhook` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="webhook full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      url?: string | null,
      events?: any | null,
      sources?: any | null,
      listid?: string | null,
      cdate?: string | null,
      state?: string | null,
      deactivated_date?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`webhooks.list`

List configured webhook subscriptions

**Risk:** `read`

```ts theme={null}
await corsair.activecampaign.api.webhooks.list({});
```

**Input**

| Name     | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `limit`  | `number` | No       | —           |
| `offset` | `number` | No       | —           |

**Output**

| Name       | Type       | Required | Description |
| ---------- | ---------- | -------- | ----------- |
| `webhooks` | `object[]` | Yes      | —           |
| `meta`     | `object`   | No       | —           |

<AccordionGroup>
  <Accordion title="webhooks full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      url?: string | null,
      events?: any | null,
      sources?: any | null,
      listid?: string | null,
      cdate?: string | null,
      state?: string | null,
      deactivated_date?: string | null,
      links?: any | null
    }[]
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
      total?: string | number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`webhooks.update`

Update a webhook subscription

**Risk:** `write`

```ts theme={null}
await corsair.activecampaign.api.webhooks.update({});
```

**Input**

| Name      | Type                                 | Required | Description |
| --------- | ------------------------------------ | -------- | ----------- |
| `name`    | `string`                             | No       | —           |
| `url`     | `string`                             | No       | —           |
| `events`  | `string[]`                           | No       | —           |
| `sources` | `public \| admin \| api \| system[]` | No       | —           |
| `listid`  | `string`                             | No       | —           |
| `id`      | `string`                             | Yes      | —           |

**Output**

| Name      | Type     | Required | Description |
| --------- | -------- | -------- | ----------- |
| `webhook` | `object` | Yes      | —           |

<AccordionGroup>
  <Accordion title="webhook full type">
    ```ts theme={null}
    {
      id: string,
      name?: string | null,
      url?: string | null,
      events?: any | null,
      sources?: any | null,
      listid?: string | null,
      cdate?: string | null,
      state?: string | null,
      deactivated_date?: string | null,
      links?: any | null
    }
    ```
  </Accordion>
</AccordionGroup>

***
