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

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

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Accounts

### addAccountContacts

`accounts.addAccountContacts`

Link contacts to an account

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.accounts.addAccountContacts({ accountId: '1234567', id: 3001 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `id` | `number` | No | — |
| `_dirty` | `boolean` | No | — |
| `_deleted` | `boolean` | No | — |

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

### addAccountUsers

`accounts.addAccountUsers`

Add users to an account

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.accounts.addAccountUsers({ accountId: '1234567', id: 2001 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `id` | `number` | No | — |
| `_dirty` | `boolean` | No | — |
| `_deleted` | `boolean` | No | — |

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

### createAccount

`accounts.createAccount`

Create a new account

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.accounts.createAccount({ name: 'Acme Inc', domain: 'acme.example.com', website: 'https://acme.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `update_if_exists` | `boolean` | No | — |
| `owner` | `number` | No | — |
| `name` | `string` | No | — |
| `domain` | `string` | No | — |
| `picture` | `string` | No | — |
| `size` | `number` | No | — |
| `website` | `string` | No | — |
| `description` | `string` | No | — |
| `address` | `Record<string, any>` | No | — |
| `addresses` | `object[]` | No | — |
| `email` | `string` | No | — |
| `email_addresses` | `object[]` | No | — |
| `phone_number` | `string` | No | — |
| `phone_numbers` | `object[]` | No | — |
| `social_profiles` | `string[]` | No | — |
| `tags` | `string[]` | No | — |
| `links` | `string` | No | — |
| `customers` | `object[]` | No | — |
| `_dirty` | `boolean` | No | — |
| `parent_account` | `number \| object` | No | — |
| `custom` | `Record<string, any>` | No | — |

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   zip?: string,
>   _dirty?: boolean
> }[]
> ```

> [accordion] email\_addresses full type
>
> ```ts theme={null}
> {
>   email: string,
>   _dirty?: boolean
> }[]
> ```

> [accordion] phone\_numbers full type
>
> ```ts theme={null}
> {
>   number: string,
>   type?: string,
>   _dirty?: boolean
> }[]
> ```

> [accordion] customers full type
>
> ```ts theme={null}
> {
>   id: number,
>   email?: string,
>   name?: string
> }[]
> ```

> [accordion] parent\_account full type
>
> ```ts theme={null}
> number | {
>   id: number
> }
> ```

**Output:** *empty object*

***

### deleteAccount

`accounts.deleteAccount`

Delete a account

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.accounts.deleteAccount({ accountId: '1234567' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### listAccountFeed

`accounts.listAccountFeed`

List the activity feed of an account

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.accounts.listAccountFeed({
	accountId: '1234567',
	limit: 20,
	types: ['email', 'meeting-live'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `before` | `string` | No | — |
| `after` | `string` | No | — |
| `limit` | `number` | No | — |
| `types` | `(email \| message \| meeting-live \| meeting-phone \| forward \| webpage \| user_added \| user_removed \| account_created)[]` | No | — |
| `contacts` | `number[]` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### listAccountMessages

`accounts.listAccountMessages`

List messages on an account

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.accounts.listAccountMessages({ accountId: '1234567', limit: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `before` | `string` | No | — |
| `after` | `string` | No | — |
| `limit` | `number` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### listAccounts

`accounts.listAccounts`

List Accounts

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.accounts.listAccounts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `details` | `boolean` | No | — |
| `search` | `string` | No | — |
| `name` | `string` | No | — |
| `creation_after` | `string` | No | — |
| `creation_before` | `string` | No | — |
| `min_size` | `number` | No | — |
| `max_size` | `number` | No | — |
| `domain` | `string[]` | No | — |
| `tag` | `number[]` | No | — |
| `tag.name` | `string[]` | No | — |
| `address.country` | `string[]` | No | — |
| `address.city` | `string[]` | No | — |
| `address.state_region` | `string[]` | No | — |
| `hotness` | `number` | No | — |
| `offset` | `number` | No | — |
| `custom` | `string` | No | — |
| `order_by` | `string[]` | No | — |
| `q` | `string` | No | — |
| `limit` | `number` | No | — |
| `export` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveAccount

`accounts.retrieveAccount`

Retrieve a single account by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.accounts.retrieveAccount({ accountId: '1234567' });
```

**Input**

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

**Output:** *empty object*

***

### updateAccount

`accounts.updateAccount`

Update a account

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.accounts.updateAccount({ accountId: '1234567', name: 'Acme Inc', website: 'https://acme.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `name` | `string` | No | — |
| `domain` | `string` | No | — |
| `picture` | `string` | No | — |
| `size` | `number` | No | — |
| `website` | `string` | No | — |
| `description` | `string` | No | — |
| `address` | `object` | No | — |
| `addresses` | `object[]` | No | — |
| `email` | `string` | No | — |
| `email_addresses` | `object[]` | No | — |
| `phone_number` | `string` | No | — |
| `phone_numbers` | `object[]` | No | — |
| `social_profiles` | `string[]` | No | — |
| `tags` | `string[]` | No | — |
| `links` | `string` | No | — |
| `_dirty` | `boolean` | No | — |
| `parent_account` | `number \| object` | No | — |
| `custom` | `Record<string, any>` | No | — |
| `q` | `object` | No | — |

> [accordion] address full type
>
> ```ts theme={null}
> {
>   id?: number,
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   zip?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   id?: number,
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   zip?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }[]
> ```

> [accordion] email\_addresses full type
>
> ```ts theme={null}
> {
>   id?: number,
>   email?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }[]
> ```

> [accordion] phone\_numbers full type
>
> ```ts theme={null}
> {
>   id?: number,
>   number?: string,
>   type?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }[]
> ```

> [accordion] parent\_account full type
>
> ```ts theme={null}
> number | {
>   id: number
> }
> ```

> [accordion] q full type
>
> ```ts theme={null}
> {
>   condition: AND | OR,
>   rules: Record<string, any>[],
>   order_by?: string,
>   not?: boolean,
>   valid?: boolean,
>   search?: string
> }
> ```

**Output:** *empty object*

***

### updateAccountContacts

`accounts.updateAccountContacts`

Update the contact links of an account

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.accounts.updateAccountContacts({
	accountId: '1234567',
	id: 3001,
	_dirty: true,
	_deleted: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `id` | `number` | No | — |
| `_dirty` | `boolean` | No | — |
| `_deleted` | `boolean` | No | — |

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

### updateAccountUsers

`accounts.updateAccountUsers`

Update the users assigned to an account

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.accounts.updateAccountUsers({
	accountId: '1234567',
	id: 2001,
	_dirty: true,
	_deleted: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string` | Yes | — |
| `id` | `number` | No | — |
| `_dirty` | `boolean` | No | — |
| `_deleted` | `boolean` | No | — |

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

## Calls

### createCall

`calls.createCall`

Create a new call

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.calls.createCall({
	date: '2026-12-01T15:00:00Z',
	participants: [3001],
	notes: 'Left a voicemail',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date` | `string` | Yes | — |
| `end_date` | `string` | No | — |
| `subject` | `string` | No | — |
| `description` | `string` | No | — |
| `minutes` | `string` | No | — |
| `notes` | `string` | No | — |
| `phone_type` | `string` | No | — |
| `phone_number_hash` | `string` | No | — |
| `participants` | `number[]` | Yes | — |

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

### updateCall

`calls.updateCall`

Update a logged call

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.calls.updateCall({ meetingId: '7002', type: 'meeting-phone', participants: [3001], notes: 'Called back, renewal confirmed' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `meetingId` | `string` | Yes | — |
| `calendar_id` | `string` | No | — |
| `external_id` | `string` | No | — |
| `date` | `string` | No | — |
| `end_date` | `string` | No | — |
| `subject` | `string` | No | — |
| `description` | `string` | No | — |
| `minutes` | `string` | No | — |
| `notes` | `string` | No | — |
| `edited_by` | `number` | No | — |
| `type` | `meeting-live \| meeting-phone` | No | — |
| `phone_type` | `string` | No | — |
| `participants` | `number[]` | No | — |

**Output:** *empty object*

***

## Campaigns

### listCampaignMergeFields

`campaigns.listCampaignMergeFields`

List the merge fields available for campaigns

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.campaigns.listCampaignMergeFields({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

## Contacts

### createContact

`contacts.createContact`

Create a new contact

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.contacts.createContact({
	email: 'jane@acme.example.com',
	firstname: 'Jane',
	lastname: 'Doe',
	account: 1234567,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `force` | `boolean` | No | — |
| `owner` | `number` | No | — |
| `domain` | `string` | No | — |
| `email` | `string` | No | — |
| `prefix` | `string` | No | — |
| `firstname` | `string` | No | — |
| `middle` | `string` | No | — |
| `lastname` | `string` | No | — |
| `suffix` | `string` | No | — |
| `name` | `string` | No | — |
| `picture` | `string` | No | — |
| `account` | `number` | No | — |
| `birth_date` | `string` | No | — |
| `opt-out` | `boolean` | No | — |
| `opt-out_date` | `string` | No | — |
| `opt-out_campaign` | `string` | No | — |
| `bounced` | `boolean` | No | — |
| `bounced_date` | `string` | No | — |
| `files` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `address` | `object` | No | — |
| `addresses` | `object[]` | No | — |
| `phone_number` | `string` | No | — |
| `mobile_phone_number` | `string` | No | — |
| `home_phone_number` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `phone_numbers` | `object[]` | No | — |
| `position` | `object` | No | — |
| `positions` | `object[]` | No | — |
| `social_profiles` | `string[]` | No | — |
| `custom` | `Record<string, any>` | No | — |

> [accordion] address full type
>
> ```ts theme={null}
> {
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   type?: string,
>   zip?: string
> }
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   type?: string,
>   zip?: string
> }[]
> ```

> [accordion] phone\_numbers full type
>
> ```ts theme={null}
> {
>   number: string,
>   type?: string
> }[]
> ```

> [accordion] position full type
>
> ```ts theme={null}
> {
>   organisation?: string,
>   role?: string
> }
> ```

> [accordion] positions full type
>
> ```ts theme={null}
> {
>   end_date?: string,
>   start_date?: string,
>   current?: boolean,
>   primary?: boolean,
>   organisation?: string,
>   role?: string
> }[]
> ```

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

### deleteContact

`contacts.deleteContact`

Delete a contact

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.contacts.deleteContact({ contactId: '3001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### listContacts

`contacts.listContacts`

List Contacts

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.contacts.listContacts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `name` | `string` | No | — |
| `email` | `string` | No | — |
| `phone_number` | `string` | No | — |
| `domain` | `string` | No | — |
| `modification_after` | `string` | No | — |
| `modification_before` | `string` | No | — |
| `creation_after` | `string` | No | — |
| `creation_before` | `string` | No | — |
| `account` | `number[]` | No | — |
| `tag` | `number[]` | No | — |
| `tag.name` | `string[]` | No | — |
| `position.role` | `string[]` | No | — |
| `address.country` | `string[]` | No | — |
| `address.state_region` | `string[]` | No | — |
| `address.city` | `string[]` | No | — |
| `includeArchived` | `boolean` | No | — |
| `search` | `string` | No | — |
| `type` | `customer \| mycontacts` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `custom` | `string` | No | — |
| `order_by` | `string[]` | No | — |
| `export` | `string` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveContact

`contacts.retrieveContact`

Retrieve a single contact by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.contacts.retrieveContact({ contactId: '3001' });
```

**Input**

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

**Output:** *empty object*

***

### updateContact

`contacts.updateContact`

Update a contact

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.contacts.updateContact({ contactId: '3001', firstname: 'Jane', lastname: 'Doe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `string` | Yes | — |
| `force` | `boolean` | No | — |
| `prefix` | `string` | No | — |
| `firstname` | `string` | No | — |
| `middle` | `string` | No | — |
| `lastname` | `string` | No | — |
| `suffix` | `string` | No | — |
| `email` | `string` | No | — |
| `role` | `string` | No | — |
| `name` | `string` | No | — |
| `owner` | `number` | No | — |
| `picture` | `string` | No | — |
| `account` | `number \| null` | No | — |
| `birth_date` | `string` | No | — |
| `opt-out` | `boolean` | No | — |
| `opt-out_date` | `string` | No | — |
| `opt-out_campaign` | `string` | No | — |
| `bounced` | `boolean` | No | — |
| `bounced_date` | `string` | No | — |
| `files` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `address` | `object` | No | — |
| `addresses` | `object[]` | No | — |
| `phone_number` | `string` | No | — |
| `mobile_phone_number` | `string` | No | — |
| `home_phone_number` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `phone_numbers` | `object[]` | No | — |
| `position` | `object` | No | — |
| `positions` | `object[]` | No | — |
| `social_profiles` | `string[]` | No | — |
| `custom` | `Record<string, any>` | No | — |
| `_dirty` | `boolean` | No | — |
| `archived` | `boolean` | No | — |

> [accordion] address full type
>
> ```ts theme={null}
> {
>   id?: number,
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   type?: string,
>   zip?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }
> ```

> [accordion] addresses full type
>
> ```ts theme={null}
> {
>   id?: number,
>   city?: string,
>   country?: string,
>   region?: string,
>   state_region?: string,
>   street?: string,
>   type?: string,
>   zip?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }[]
> ```

> [accordion] phone\_numbers full type
>
> ```ts theme={null}
> {
>   id?: number,
>   number?: string,
>   type?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }[]
> ```

> [accordion] position full type
>
> ```ts theme={null}
> {
>   id?: number,
>   organisation?: string,
>   role?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }
> ```

> [accordion] positions full type
>
> ```ts theme={null}
> {
>   id?: number,
>   organisation?: string,
>   role?: string,
>   archived?: boolean,
>   _dirty?: boolean
> }[]
> ```

**Output:** *empty object*

***

## Currencies

### listCurrencies

`currencies.listCurrencies`

List Currencies

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.currencies.listCurrencies({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

## Customfields

### createCustomFieldSub

`customfields.createCustomFieldSub`

Create a new customField sub-resource

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.customfields.createCustomFieldSub({ itemClass: 'accounts', name: 'Contract tier', type: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `itemClass` | `string` | Yes | — |
| `type` | `number` | No | — |
| `name` | `string` | No | — |
| `enabled` | `boolean` | No | — |
| `archived` | `boolean` | No | — |
| `required` | `boolean` | No | — |
| `pipeline` | `number` | No | — |
| `predefined_customfield` | `number` | No | — |
| `users_can_add_options` | `boolean` | No | — |
| `options` | `object[]` | No | — |
| `order_alphabetically` | `boolean` | No | — |
| `min_number` | `number` | No | — |
| `max_number` | `number` | No | — |
| `min_date` | `string` | No | — |
| `max_date` | `string` | No | — |
| `default_boolean_value` | `boolean` | No | — |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   id?: number,
>   order?: number,
>   archived?: boolean,
>   name: string
> }[]
> ```

**Output:** *empty object*

***

### deleteCustomField

`customfields.deleteCustomField`

Delete a customField

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.customfields.deleteCustomField({ itemClass: 'accounts', id: '9001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### listCustomFieldOptions

`customfields.listCustomFieldOptions`

List the options of a custom field

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.customfields.listCustomFieldOptions({ itemClass: 'accounts', customFieldApiField: 'contract_tier' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `itemClass` | `string` | Yes | — |
| `customFieldApiField` | `string` | Yes | — |
| `searchString` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### listCustomFields

`customfields.listCustomFields`

List the custom fields of an item class

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.customfields.listCustomFields({ itemClass: 'accounts' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `itemClass` | `string` | Yes | — |
| `includeDisabled` | `boolean` | No | — |
| `pipeline` | `number` | No | — |
| `name` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### listCustomFieldTypes

`customfields.listCustomFieldTypes`

List the custom field types supported by Salesflare

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.customfields.listCustomFieldTypes({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveCustomField

`customfields.retrieveCustomField`

Retrieve a single customField by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.customfields.retrieveCustomField({ itemClass: 'accounts', id: '9001' });
```

**Input**

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

**Output:** *empty object*

***

### updateCustomField

`customfields.updateCustomField`

Update a customField

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.customfields.updateCustomField({ itemClass: 'accounts', id: '9001', name: 'Contract plan' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `itemClass` | `string` | Yes | — |
| `id` | `string` | Yes | — |
| `type` | `number` | No | — |
| `name` | `string` | No | — |
| `enabled` | `boolean` | No | — |
| `archived` | `boolean` | No | — |
| `required` | `boolean` | No | — |
| `pipeline` | `number` | No | — |
| `pipelineName` | `string` | No | — |
| `order` | `number` | No | — |
| `predefined_customfield` | `number` | No | — |
| `users_can_add_options` | `boolean` | No | — |
| `options` | `object[]` | No | — |
| `order_alphabetically` | `boolean` | No | — |
| `min_number` | `number` | No | — |
| `max_number` | `number` | No | — |
| `min_date` | `string` | No | — |
| `max_date` | `string` | No | — |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   id?: number,
>   order?: number,
>   archived?: boolean,
>   name: string
> }[]
> ```

**Output:** `object \| number`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | number
> ```

***

## Datasources

### listEmailDataSources

`datasources.listEmailDataSources`

List the connected email data sources

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.datasources.listEmailDataSources({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `includeTeamDataSources` | `boolean` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### updateEmailDataSource

`datasources.updateEmailDataSource`

Update a connected email data source

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.datasources.updateEmailDataSource({ id: '401', max_emails_day: 200, max_emails_hour: 40 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `email_signature` | `string` | No | — |
| `add_signature_to_campaign` | `boolean` | No | — |
| `add_signature_to_replies` | `boolean` | No | — |
| `max_emails_day` | `number` | No | — |
| `max_emails_hour` | `number` | No | — |

**Output:** *empty object*

***

## Filterfields

### listFilterFields

`filterfields.listFilterFields`

List the filter fields available for an entity

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.filterfields.listFilterFields({ entity: 'account' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `entity` | `string` | Yes | — |
| `pipeline` | `number` | No | — |
| `includePipelineSpecificPredefinedFilterFields` | `boolean` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

## Groups

### listGroups

`groups.listGroups`

List Groups

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.groups.listGroups({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveGroup

`groups.retrieveGroup`

Retrieve a single group by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.groups.retrieveGroup({ id: '101' });
```

**Input**

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

**Output:** *empty object*

***

## Me

### listMyContacts

`me.listMyContacts`

List contacts assigned to the current user

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.me.listMyContacts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `name` | `string` | No | — |
| `email` | `string` | No | — |
| `phone_number` | `string` | No | — |
| `domain` | `string` | No | — |
| `modification_after` | `string` | No | — |
| `modification_before` | `string` | No | — |
| `creation_after` | `string` | No | — |
| `creation_before` | `string` | No | — |
| `account` | `number[]` | No | — |
| `tag` | `number[]` | No | — |
| `tag.name` | `string[]` | No | — |
| `position.role` | `string[]` | No | — |
| `address.country` | `string[]` | No | — |
| `address.state_region` | `string[]` | No | — |
| `address.city` | `string[]` | No | — |
| `includeArchived` | `boolean` | No | — |
| `search` | `string` | No | — |
| `type` | `customer \| mycontacts` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `custom` | `string` | No | — |
| `order_by` | `string[]` | No | — |
| `export` | `string` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveCurrentUser

`me.retrieveCurrentUser`

Retrieve the currently authenticated user

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.me.retrieveCurrentUser({});
```

**Input:** *empty object*

**Output:** *empty object*

***

## Meetings

### createMeeting

`meetings.createMeeting`

Create a new meeting

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.meetings.createMeeting({
	date: '2026-12-01T15:00:00Z',
	end_date: '2026-12-01T15:30:00Z',
	subject: 'Renewal call',
	participants: [3001],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date` | `string` | Yes | — |
| `end_date` | `string` | No | — |
| `subject` | `string` | No | — |
| `description` | `string` | No | — |
| `minutes` | `string` | No | — |
| `notes` | `string` | No | — |
| `phone_type` | `string` | No | — |
| `phone_number_hash` | `string` | No | — |
| `participants` | `number[]` | Yes | — |
| `type` | `meeting-live \| meeting-phone` | No | — |

**Output:** `object \| object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
> }[]
> ```

***

### deleteMeeting

`meetings.deleteMeeting`

Delete a meeting

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.meetings.deleteMeeting({ meetingId: '7001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### retrieveMeeting

`meetings.retrieveMeeting`

Retrieve a single meeting by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.meetings.retrieveMeeting({ meetingId: '7001' });
```

**Input**

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

**Output:** *empty object*

***

### updateMeeting

`meetings.updateMeeting`

Update a meeting

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.meetings.updateMeeting({ meetingId: '7001', type: 'meeting-live', participants: [3001], notes: 'Agreed on a 12-month renewal' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `meetingId` | `string` | Yes | — |
| `calendar_id` | `string` | No | — |
| `external_id` | `string` | No | — |
| `date` | `string` | No | — |
| `end_date` | `string` | No | — |
| `subject` | `string` | No | — |
| `description` | `string` | No | — |
| `minutes` | `string` | No | — |
| `notes` | `string` | No | — |
| `edited_by` | `number` | No | — |
| `type` | `meeting-live \| meeting-phone` | No | Send 'meeting-live' when updating a logged live meeting; without it the API answers 422. |
| `phone_type` | `string` | No | — |
| `participants` | `number[]` | No | — |

**Output:** *empty object*

***

## Messages

### createMessage

`messages.createMessage`

Create a new message

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.messages.createMessage({ account: 1234567, body: 'Renewal confirmed for next year.' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account` | `number` | Yes | — |
| `body` | `string` | Yes | — |
| `mentions` | `number[]` | No | — |
| `date` | `string` | No | — |

**Output:** *empty object*

***

### createMessageFeedback

`messages.createMessageFeedback`

Submit feedback for a message

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.messages.createMessageFeedback({ messageId: '8001', feedback: 'The suggested reply was useful' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `messageId` | `string` | Yes | — |
| `feedback` | `string` | Yes | — |

**Output:** *empty object*

***

### deleteMessage

`messages.deleteMessage`

Delete a message

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.messages.deleteMessage({ messageId: '8001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### updateMessage

`messages.updateMessage`

Update a message

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.messages.updateMessage({ messageId: '8001', account: 1234567, body: 'Renewal confirmed for 12 months.' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `messageId` | `string` | Yes | — |
| `account` | `number` | Yes | — |
| `body` | `string` | Yes | — |
| `mentions` | `number[]` | No | — |
| `date` | `string` | No | — |

**Output:** *empty object*

***

## Opportunities

### createOpportunity

`opportunities.createOpportunity`

Create a new opportunity

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.opportunities.createOpportunity({ account: 1234567, name: 'Acme renewal', value: 12000 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `owner` | `number` | No | — |
| `account` | `number` | Yes | — |
| `stage` | `number` | No | — |
| `lost_reason` | `number` | No | — |
| `files` | `Record<string, any>[]` | No | — |
| `lead_source` | `number` | No | — |
| `start_date` | `string` | No | — |
| `probability` | `number` | No | — |
| `assignee` | `number` | No | — |
| `creator` | `number` | No | — |
| `status` | `string` | No | — |
| `name` | `string` | No | — |
| `value` | `number` | No | — |
| `currency` | `number` | No | — |
| `status_date` | `string` | No | — |
| `close_date` | `string` | No | — |
| `closed` | `boolean` | No | — |
| `tags` | `string[]` | No | — |
| `recurring_price_per_unit` | `number` | No | — |
| `frequency` | `annually \| weekly \| monthly \| daily` | No | — |
| `units` | `number` | No | — |
| `contract_start_date` | `string` | No | — |
| `contract_end_date` | `string` | No | — |
| `main_contact` | `number` | No | — |
| `custom` | `Record<string, any>` | No | — |

**Output:** *empty object*

***

### deleteOpportunity

`opportunities.deleteOpportunity`

Delete a opportunity

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.opportunities.deleteOpportunity({ id: '4001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### listOpportunities

`opportunities.listOpportunities`

List Opportunities

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.opportunities.listOpportunities({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | — |
| `id` | `number \| number[]` | No | — |
| `name` | `string` | No | — |
| `status` | `string` | No | — |
| `stage` | `number \| number[]` | No | — |
| `stage.name` | `string \| string[]` | No | — |
| `owner` | `number` | No | — |
| `team_member` | `number` | No | — |
| `owner_group` | `number` | No | — |
| `assignee_group` | `number` | No | — |
| `team_member_group` | `number` | No | — |
| `account` | `number` | No | — |
| `assignee` | `number` | No | — |
| `min_value` | `number` | No | — |
| `max_value` | `number` | No | — |
| `close_after` | `string` | No | — |
| `close_before` | `string` | No | — |
| `creation_after` | `string` | No | — |
| `creation_before` | `string` | No | — |
| `closed` | `boolean` | No | — |
| `done` | `boolean` | No | — |
| `tag` | `number[]` | No | — |
| `tag.name` | `string \| string[]` | No | — |
| `hotness` | `number` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `order_by` | `string[]` | No | — |
| `pipeline` | `number` | No | — |
| `custom` | `string` | No | — |
| `details` | `boolean` | No | — |
| `export` | `string` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveOpportunity

`opportunities.retrieveOpportunity`

Retrieve a single opportunity by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.opportunities.retrieveOpportunity({ id: '4001' });
```

**Input**

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

**Output:** *empty object*

***

### updateOpportunity

`opportunities.updateOpportunity`

Update a opportunity

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.opportunities.updateOpportunity({ id: '4001', value: 15000 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `owner` | `number` | No | — |
| `account` | `number` | No | — |
| `stage` | `number` | No | — |
| `lost_reason` | `number` | No | — |
| `files` | `Record<string, any>[]` | No | — |
| `lead_source` | `number` | No | — |
| `start_date` | `string` | No | — |
| `probability` | `number` | No | — |
| `assignee` | `number` | No | — |
| `creator` | `number` | No | — |
| `name` | `string` | No | — |
| `value` | `number` | No | — |
| `close_date` | `string` | No | — |
| `closed` | `boolean` | No | — |
| `done` | `boolean` | No | — |
| `tags` | `string[]` | No | — |
| `recurring_price_per_unit` | `number` | No | — |
| `frequency` | `annually \| weekly \| monthly \| daily` | No | — |
| `units` | `number` | No | — |
| `contract_start_date` | `string` | No | — |
| `contract_end_date` | `string` | No | — |
| `main_contact` | `number` | No | — |
| `custom` | `Record<string, any>` | No | — |

**Output:** *empty object*

***

## Persons

### listPersons

`persons.listPersons`

List persons resolved from email addresses

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.persons.listPersons({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `name` | `string` | No | — |
| `email` | `string` | No | — |
| `search` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

## Pipelines

### listPipelines

`pipelines.listPipelines`

List Pipelines

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.pipelines.listPipelines({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | — |
| `order_by` | `string[]` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

## Settings

### retrieveAiSettings

`settings.retrieveAiSettings`

Retrieve the workspace's AI settings

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.settings.retrieveAiSettings({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### updateAiSettings

`settings.updateAiSettings`

Update the workspace's AI settings

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.settings.updateAiSettings({
	company: { name: 'Acme Inc', summary: 'B2B software for logistics teams' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `company` | `object` | No | — |
| `user` | `object` | No | — |

> [accordion] company full type
>
> ```ts theme={null}
> {
>   name?: string,
>   summary?: string,
>   generated?: boolean
> }
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   name?: string,
>   summary?: string
> }
> ```

**Output:** *empty object*

***

## Stages

### listStages

`stages.listStages`

List Stages

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.stages.listStages({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | No | — |
| `name` | `string` | No | — |
| `pipeline.id` | `number` | No | — |
| `pipeline.name` | `string` | No | — |
| `order_by` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveStage

`stages.retrieveStage`

Retrieve a single stage by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.stages.retrieveStage({ stageId: '201' });
```

**Input**

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

**Output:** *empty object*

***

## Tags

### createTag

`tags.createTag`

Create a new tag

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.tags.createTag({ name: 'Enterprise' });
```

**Input**

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

**Output:** *empty object*

***

### deleteTag

`tags.deleteTag`

Delete a tag

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.tags.deleteTag({ tagId: '5001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### listTags

`tags.listTags`

List Tags

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.tags.listTags({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `name` | `string` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `order_by` | `string[]` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### listTagUsage

`tags.listTagUsage`

List the usage statistics of a tag

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.tags.listTagUsage({ tagId: '5001' });
```

**Input**

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

**Output:** *empty object*

***

### retrieveTag

`tags.retrieveTag`

Retrieve a single tag by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.tags.retrieveTag({ tagId: '5001' });
```

**Input**

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

**Output:** *empty object*

***

### updateTag

`tags.updateTag`

Update a tag

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.tags.updateTag({ tagId: '5001', name: 'Enterprise plan' });
```

**Input**

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

**Output:** *empty object*

***

## Tasks

### createTask

`tasks.createTask`

Create a new task

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.tasks.createTask({ description: 'Send the renewal proposal', account: 1234567, reminder_date: '2026-12-01T09:00:00Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account` | `number` | No | — |
| `description` | `string` | Yes | — |
| `reminder_date` | `string` | No | — |
| `assignees` | `number[]` | No | — |

**Output:** *empty object*

***

### deleteTask

`tasks.deleteTask`

Delete a task

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.tasks.deleteTask({ id: '6001' });
```

**Input**

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

**Output:** `object \| string \| undefined`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | string | undefined
> ```

***

### listTasks

`tasks.listTasks`

List Tasks

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.tasks.listTasks({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `search` | `string` | No | — |
| `assignees` | `number[]` | No | — |
| `type` | `number[]` | No | — |
| `account` | `number[]` | No | — |
| `order_by` | `string[]` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `export` | `string` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### updateTask

`tasks.updateTask`

Update a task

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.tasks.updateTask({ id: '6001', completed: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `account` | `number` | No | — |
| `description` | `string` | No | — |
| `reminder_date` | `string` | No | — |
| `assignees` | `number[]` | No | — |
| `completed` | `boolean` | No | — |

**Output:** *empty object*

***

## Users

### listUsers

`users.listUsers`

List Users

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.users.listUsers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number[]` | No | — |
| `name` | `string` | No | — |
| `email` | `string` | No | — |
| `search` | `string` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `order_by` | `string[]` | No | — |
| `onlyEnabled` | `boolean` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveUser

`users.retrieveUser`

Retrieve a single user by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.users.retrieveUser({ id: '2001' });
```

**Input**

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

**Output:** *empty object*

***

## Workflows

### createWorkflow

`workflows.createWorkflow`

Create a new workflow

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.workflows.createWorkflow({ name: 'Renewal follow-up' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `filter` | `object` | No | — |
| `individual_record_filter` | `object` | No | — |
| `status` | `live \| paused \| scheduled \| draft` | No | — |
| `status_message` | `string` | No | — |
| `record_type` | `contact` | No | — |
| `goal` | `opened \| clicked \| replied` | No | — |
| `continuous` | `boolean` | No | — |
| `exit_after_days` | `number` | No | — |
| `schedule_date` | `string` | No | — |
| `schedule_time_start` | `string` | No | — |
| `schedule_time_end` | `string` | No | — |
| `schedule_days` | `number[]` | No | — |
| `steps` | `object[]` | No | — |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   ids?: number[]
> }
> ```

> [accordion] individual\_record\_filter full type
>
> ```ts theme={null}
> {
>   condition: AND | OR,
>   rules: Record<string, any>[],
>   order_by?: string,
>   not?: boolean,
>   valid?: boolean,
>   search?: string
> }
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   id?: number,
>   name?: string,
>   order: number,
>   filter?: Record<string, any>,
>   trigger_step?: number,
>   trigger_step_index?: number,
>   trigger_after_days?: number,
>   trigger?: sent | opened | clicked | replied | not_opened | not_replied | not_clicked,
>   action_type?: send_email,
>   action_config?: Record<string, any>,
>   action_status?: string,
>   action_source?: number,
>   action_source_email?: string,
>   analytics?: Record<string, any>,
>   metrics_data?: Record<string, any>
> }[]
> ```

**Output:** *empty object*

***

### listWorkflows

`workflows.listWorkflows`

List Workflows

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.workflows.listWorkflows({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `order_by` | `string[]` | No | — |
| `search` | `string` | No | — |
| `q` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> }[]
> ```

***

### retrieveWorkflow

`workflows.retrieveWorkflow`

Retrieve a single workflow by ID

**Risk:** `read`

```ts theme={null}
await corsair.salesflare.api.workflows.retrieveWorkflow({ id: '301' });
```

**Input**

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

**Output:** *empty object*

***

### updateWorkflow

`workflows.updateWorkflow`

Update a workflow

**Risk:** `write`

```ts theme={null}
await corsair.salesflare.api.workflows.updateWorkflow({ id: '301', name: 'Renewal follow-up (Q1)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `filter` | `object` | No | — |
| `individual_record_filter` | `object` | No | — |
| `status` | `live \| paused \| scheduled \| draft` | No | — |
| `status_message` | `string` | No | — |
| `record_type` | `contact` | No | — |
| `goal` | `opened \| clicked \| replied` | No | — |
| `continuous` | `boolean` | No | — |
| `exit_after_days` | `number` | No | — |
| `schedule_date` | `string` | No | — |
| `schedule_time_start` | `string` | No | — |
| `schedule_time_end` | `string` | No | — |
| `schedule_days` | `number[]` | No | — |
| `steps` | `object[]` | No | — |

> [accordion] filter full type
>
> ```ts theme={null}
> {
>   ids?: number[]
> }
> ```

> [accordion] individual\_record\_filter full type
>
> ```ts theme={null}
> {
>   condition: AND | OR,
>   rules: Record<string, any>[],
>   order_by?: string,
>   not?: boolean,
>   valid?: boolean,
>   search?: string
> }
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   id?: number,
>   name?: string,
>   order: number,
>   filter?: Record<string, any>,
>   trigger_step?: number,
>   trigger_step_index?: number,
>   trigger_after_days?: number,
>   trigger?: sent | opened | clicked | replied | not_opened | not_replied | not_clicked,
>   action_type?: send_email,
>   action_config?: Record<string, any>,
>   action_status?: string,
>   action_source?: number,
>   action_source_email?: string,
>   analytics?: Record<string, any>,
>   metrics_data?: Record<string, any>
> }[]
> ```

**Output:** *empty object*

***

### updateWorkflowAudience

`workflows.updateWorkflowAudience`

Update the audience record of a workflow

**Risk:** `destructive`

```ts theme={null}
await corsair.salesflare.api.workflows.updateWorkflowAudience({ id: '301', recordId: '3001', exited: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `recordId` | `string` | Yes | — |
| `exited` | `boolean` | No | — |
| `met_goal` | `boolean` | No | — |

**Output:** *empty object*

***


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