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

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

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

## Account

### get

`account.get`

Retrieve ClickSend account details and credit balance

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.account.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_id` | `number \| string` | Yes | — |
| `username` | `string` | Yes | — |
| `user_email` | `string` | Yes | — |
| `user_first_name` | `string` | No | — |
| `user_last_name` | `string` | No | — |
| `balance` | `number` | Yes | — |
| `currency` | `string` | No | — |

***

### update

`account.update`

Update ClickSend account profile fields

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.account.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_email` | `string` | No | — |
| `user_first_name` | `string` | No | — |
| `user_last_name` | `string` | No | — |
| `user_phone` | `string` | No | — |
| `account_name` | `string` | No | — |
| `country` | `string` | No | — |
| `timezone` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_id` | `number \| string` | No | — |
| `username` | `string` | No | — |
| `user_email` | `string` | No | — |
| `user_first_name` | `string` | No | — |
| `user_last_name` | `string` | No | — |
| `balance` | `number` | No | — |
| `currency` | `string` | No | — |

***

## Campaigns

### mms.cancel

`campaigns.mms.cancel`

Cancel a scheduled MMS campaign

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.campaigns.mms.cancel({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   mms_campaign_id?: number,
>   name?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   list_id?: number,
>   from?: string,
>   subject?: string,
>   file_name?: string,
>   body?: string,
>   schedule?: number,
>   status?: string,
>   date_added?: number,
>   _total_count?: number,
>   _list_name?: string,
>   _media_file_url?: string
> } | never[] | {
> } | boolean | null
> ```

***

### mms.list

`campaigns.mms.list`

List MMS campaigns

**Risk:** `read`

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

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   mms_campaign_id?: number,
>   name?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   list_id?: number,
>   from?: string,
>   subject?: string,
>   file_name?: string,
>   body?: string,
>   schedule?: number,
>   status?: string,
>   date_added?: number,
>   _total_count?: number,
>   _list_name?: string,
>   _media_file_url?: string
> }[]
> ```

***

### mms.price

`campaigns.mms.price`

Calculate the price of an MMS campaign

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.campaigns.mms.price({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `name` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `subject` | `string` | Yes | — |
| `media_file` | `string` | Yes | — |
| `schedule` | `number` | No | — |
| `url_to_shorten` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | No | — |

> **messages full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### mms.send

`campaigns.mms.send`

Create and send an MMS campaign to a contact list

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.campaigns.mms.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `name` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `subject` | `string` | Yes | — |
| `media_file` | `string` | Yes | — |
| `schedule` | `number` | No | — |
| `url_to_shorten` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | No | — |

> **messages full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### mms.update

`campaigns.mms.update`

Update a scheduled MMS campaign

**Risk:** `write`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `mms_campaign_id` | `number` | Yes | — |
| `list_id` | `number` | No | — |
| `name` | `string` | No | — |
| `from` | `string` | No | — |
| `body` | `string` | No | — |
| `subject` | `string` | No | — |
| `media_file` | `string` | No | — |
| `schedule` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mms_campaign_id` | `number` | No | — |
| `name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `subaccount_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `from` | `string` | No | — |
| `subject` | `string` | No | — |
| `file_name` | `string` | No | — |
| `body` | `string` | No | — |
| `schedule` | `number` | No | — |
| `status` | `string` | No | — |
| `date_added` | `number` | No | — |
| `_total_count` | `number` | No | — |
| `_list_name` | `string` | No | — |
| `_media_file_url` | `string` | No | — |

***

### sms.cancel

`campaigns.sms.cancel`

Cancel a scheduled SMS campaign

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.campaigns.sms.cancel({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> {
>   sms_campaign_id?: number,
>   name?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   list_id?: number,
>   from?: string,
>   body?: string,
>   schedule?: number,
>   status?: string,
>   date_added?: number,
>   custom_string?: string,
>   url_to_shorten?: string,
>   _total_count?: number,
>   _list_name?: string
> } | never[] | {
> } | boolean | null
> ```

***

### sms.get

`campaigns.sms.get`

Retrieve a single SMS campaign by ID

**Risk:** `read`

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

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sms_campaign_id` | `number` | No | — |
| `name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `subaccount_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `from` | `string` | No | — |
| `body` | `string` | No | — |
| `schedule` | `number` | No | — |
| `status` | `string` | No | — |
| `date_added` | `number` | No | — |
| `custom_string` | `string` | No | — |
| `url_to_shorten` | `string` | No | — |
| `_total_count` | `number` | No | — |
| `_list_name` | `string` | No | — |

***

### sms.list

`campaigns.sms.list`

List SMS campaigns with pagination and filters

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |
| `q` | `string` | No | — |
| `order_by` | `string` | No | — |
| `date_from` | `number` | No | — |
| `date_to` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   sms_campaign_id?: number,
>   name?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   list_id?: number,
>   from?: string,
>   body?: string,
>   schedule?: number,
>   status?: string,
>   date_added?: number,
>   custom_string?: string,
>   url_to_shorten?: string,
>   _total_count?: number,
>   _list_name?: string
> }[]
> ```

***

### sms.price

`campaigns.sms.price`

Calculate the price of an SMS campaign

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.campaigns.sms.price({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `name` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `schedule` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | No | — |

> **messages full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### sms.send

`campaigns.sms.send`

Create and send an SMS campaign to a contact list

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.campaigns.sms.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `name` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `senders` | `object[]` | Yes | — |
| `source` | `string` | No | — |
| `schedule` | `number` | No | — |
| `url_to_shorten` | `string` | No | — |

> **senders full type**
>
> ```ts theme={null}
> {
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | No | — |

> **messages full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### sms.update

`campaigns.sms.update`

Update a scheduled SMS campaign

**Risk:** `write`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sms_campaign_id` | `number` | Yes | — |
| `list_id` | `number` | Yes | — |
| `name` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `schedule` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sms_campaign_id` | `number` | No | — |
| `name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `subaccount_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `from` | `string` | No | — |
| `body` | `string` | No | — |
| `schedule` | `number` | No | — |
| `status` | `string` | No | — |
| `date_added` | `number` | No | — |
| `custom_string` | `string` | No | — |
| `url_to_shorten` | `string` | No | — |
| `_total_count` | `number` | No | — |
| `_list_name` | `string` | No | — |

***

## Contact Lists

### create

`contactLists.create`

Create a new contact list

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contactLists.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_name` | `string` | Yes | Name for the contact list |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `list_name` | `string` | Yes | — |
| `contact_count` | `number` | No | — |

***

### delete

`contactLists.delete`

Delete a contact list by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contactLists.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`contactLists.get`

Retrieve a single contact list by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.contactLists.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | No | — |
| `list_name` | `string` | No | — |
| `contact_count` | `number` | No | — |

***

### getAll

`contactLists.getAll`

Retrieve all contact lists with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.contactLists.getAll({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `total` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   list_id: number,
>   list_name: string,
>   contact_count?: number
> }[]
> ```

***

### update

`contactLists.update`

Rename a contact list by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contactLists.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `list_name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | No | — |
| `list_name` | `string` | No | — |
| `contact_count` | `number` | No | — |

***

## Contacts

### copy

`contacts.copy`

Copy a contact from one list to another

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contacts.copy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from_list_id` | `number` | Yes | — |
| `contact_id` | `number` | Yes | — |
| `to_list_id` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `custom_1` | `string` | No | — |
| `custom_2` | `string` | No | — |
| `custom_3` | `string` | No | — |
| `custom_4` | `string` | No | — |
| `date_added` | `string` | No | — |
| `date_updated` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `organization_name` | `string` | No | — |
| `email` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

### create

`contacts.create`

Add a new contact to a specific list

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contacts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | Target contact list ID |
| `phone_number` | `string` | Yes | Phone number of the contact |
| `first_name` | `string` | No | First name |
| `last_name` | `string` | No | Last name |
| `email` | `string` | No | Email address |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_id` | `number` | Yes | — |
| `list_id` | `number` | Yes | — |
| `phone_number` | `string` | Yes | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `email` | `string` | No | — |

***

### delete

`contacts.delete`

Delete a contact from a list

**Risk:** `write`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `contact_id` | `number` | Yes | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`contacts.get`

Retrieve a single contact from a list

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `contact_id` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `custom_1` | `string` | No | — |
| `custom_2` | `string` | No | — |
| `custom_3` | `string` | No | — |
| `custom_4` | `string` | No | — |
| `date_added` | `string` | No | — |
| `date_updated` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `organization_name` | `string` | No | — |
| `email` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

### import

`contacts.import`

Bulk-import contacts into a list from a file URL

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contacts.import({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `file_url` | `string` | Yes | — |
| `field_order` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `msg` | `string` | No | — |
| `ids` | `string[]` | No | — |
| `id` | `string \| number` | No | — |

***

### importFields

`contacts.importFields`

List valid import field mappings for a list

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.contacts.importFields({});
```

**Input**

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

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   field: string,
>   label: string
> }[]
> ```

***

### importPreview

`contacts.importPreview`

Preview the first row of a CSV import file

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contacts.importPreview({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `file_url` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `row` | `string[]` | No | — |

***

### list

`contacts.list`

List contacts within a specific contact list

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | List ID to fetch contacts from |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `total` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   contact_id: number,
>   list_id: number,
>   phone_number: string,
>   first_name?: string,
>   last_name?: string,
>   email?: string
> }[]
> ```

***

### removeOptedOut

`contacts.removeOptedOut`

Remove opted-out contacts from a list

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contacts.removeOptedOut({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `opt_out_list_id` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `deleted` | `number` | No | — |

***

### search

`contacts.search`

Search contact lists and contacts by keyword

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.contacts.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | Yes | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   contact?: string,
>   contacts_count?: number,
>   id?: number | string,
>   name?: string,
>   type?: string
> }[]
> ```

***

### suggestions

`contacts.suggestions`

List suggested contacts across lists

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.contacts.suggestions({});
```

**Input:** *empty object*

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   contact_id?: number,
>   list_id?: number,
>   phone_number?: string,
>   first_name?: string,
>   last_name?: string,
>   custom_1?: string,
>   custom_2?: string,
>   custom_3?: string,
>   custom_4?: string,
>   date_added?: string,
>   date_updated?: string,
>   fax_number?: string,
>   organization_name?: string,
>   email?: string,
>   address_line_1?: string,
>   address_line_2?: string,
>   address_city?: string,
>   address_state?: string,
>   address_postal_code?: string,
>   address_country?: string,
>   _list_name?: string
> }[]
> ```

***

### transfer

`contacts.transfer`

Move a contact from one list to another

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.contacts.transfer({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from_list_id` | `number` | Yes | — |
| `contact_id` | `number` | Yes | — |
| `to_list_id` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `custom_1` | `string` | No | — |
| `custom_2` | `string` | No | — |
| `custom_3` | `string` | No | — |
| `custom_4` | `string` | No | — |
| `date_added` | `string` | No | — |
| `date_updated` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `organization_name` | `string` | No | — |
| `email` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

### update

`contacts.update`

Update contact fields within a list

**Risk:** `write`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `list_id` | `number` | Yes | — |
| `contact_id` | `number` | Yes | — |
| `phone_number` | `string` | No | — |
| `email` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `organization_name` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |
| `custom_1` | `string` | No | — |
| `custom_2` | `string` | No | — |
| `custom_3` | `string` | No | — |
| `custom_4` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `custom_1` | `string` | No | — |
| `custom_2` | `string` | No | — |
| `custom_3` | `string` | No | — |
| `custom_4` | `string` | No | — |
| `date_added` | `string` | No | — |
| `date_updated` | `string` | No | — |
| `fax_number` | `string` | No | — |
| `organization_name` | `string` | No | — |
| `email` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

## Countries

### globalList

`countries.globalList`

List global sending destination countries

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.countries.globalList({});
```

**Input:** *empty object*

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   id?: number,
>   name?: string,
>   code?: string,
>   region?: string
> }[]
> ```

***

### list

`countries.list`

List supported countries as code/value pairs

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.countries.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   code: string,
>   value: string
> }[]
> ```

***

### pricing

`countries.pricing`

Retrieve per-country pricing for a currency

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.countries.pricing({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `country` | `string` | Yes | — |
| `currency` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `country` | `string` | No | — |
| `_currency` | `object` | No | — |

> **\_currency full type**
>
> ```ts theme={null}
> {
> }
> ```

***

### userCountriesAgree

`countries.userCountriesAgree`

Agree to sending-country compliance rules

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.countries.userCountriesAgree({});
```

**Input:** *empty object*

**Output:** `object[]`

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

***

### userCountriesGet

`countries.userCountriesGet`

List enabled global-sending countries

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.countries.userCountriesGet({});
```

**Input:** *empty object*

**Output:** `object[]`

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

***

### userCountriesSelect

`countries.userCountriesSelect`

Select enabled global-sending countries

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.countries.userCountriesSelect({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `country_list_ids` | `number[]` | Yes | — |

**Output:** `object[]`

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

***

## Delivery Issues

### create

`deliveryIssues.create`

Report a message delivery issue

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.deliveryIssues.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `message_id` | `string` | No | — |
| `type` | `string` | Yes | — |
| `description` | `string` | Yes | — |
| `email_address` | `string` | Yes | — |
| `client_comments` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issue_id` | `number \| string` | No | — |
| `user_id` | `number \| string` | No | — |
| `message_id` | `string` | No | — |
| `type` | `string` | No | — |
| `description` | `string` | No | — |
| `date_added` | `string` | No | — |
| `email_address` | `string` | No | — |

***

### list

`deliveryIssues.list`

List delivery issues with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.deliveryIssues.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   issue_id?: number | string,
>   user_id?: number | string,
>   message_id?: string,
>   type?: string,
>   description?: string,
>   status?: string,
>   date_added?: string,
>   resolved?: number | string | boolean,
>   email_address?: string
> }[]
> ```

***

## Email Addresses

### create

`emailAddresses.create`

Register a new allowed sender email address

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailAddresses.create({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address_id` | `number` | No | — |
| `email_address` | `string` | No | — |
| `verified` | `boolean \| number` | No | — |
| `date_added` | `string` | No | — |

***

### delete

`emailAddresses.delete`

Delete an allowed email address by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailAddresses.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`emailAddresses.get`

Retrieve a single allowed email address by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailAddresses.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address_id` | `number` | No | — |
| `email_address` | `string` | No | — |
| `verified` | `boolean \| number` | No | — |
| `date_added` | `string` | No | — |

***

### list

`emailAddresses.list`

List allowed sender email addresses

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailAddresses.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   email_address_id?: number,
>   email_address?: string,
>   verified?: boolean | number,
>   date_added?: string
> }[]
> ```

***

### sendToken

`emailAddresses.sendToken`

Send a verification token to an allowed email address

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailAddresses.sendToken({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### verify

`emailAddresses.verify`

Verify an allowed email address with its activation token

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailAddresses.verify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address_id` | `number` | Yes | — |
| `activation_token` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address_id` | `number` | No | — |
| `email_address` | `string` | No | — |
| `verified` | `boolean \| number` | No | — |
| `date_added` | `string` | No | — |

***

## Email Campaigns

### get

`emailCampaigns.get`

Retrieve a single email campaign by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailCampaigns.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_campaign_id` | `number` | No | — |
| `name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `subaccount_id` | `number` | No | — |
| `subject` | `string` | No | — |
| `list_id` | `number` | No | — |
| `from_email_address_id` | `number` | No | — |
| `from_name` | `string` | No | — |
| `template_id` | `number` | No | — |
| `schedule` | `number \| string` | No | — |
| `status` | `string` | No | — |
| `date_added` | `string` | No | — |
| `custom_string` | `string` | No | — |
| `send_count` | `number` | No | — |

***

## Email Master Categories

### get

`emailMasterCategories.get`

Retrieve a single master template category by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailMasterCategories.get({});
```

**Input**

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

**Output**

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

***

### list

`emailMasterCategories.list`

List master email template categories

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailMasterCategories.list({});
```

**Input**

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

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   category_id?: number,
>   category_name?: string
> }[]
> ```

***

## Email Master Templates

### get

`emailMasterTemplates.get`

Retrieve a single master email template by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailMasterTemplates.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id_master` | `number` | No | — |
| `template_name` | `string` | No | — |
| `date_added` | `string` | No | — |
| `body` | `string` | No | — |
| `category_id` | `number` | No | — |
| `thumbnail` | `object` | No | — |

> **thumbnail full type**
>
> ```ts theme={null}
> {
>   small?: string,
>   large?: string
> }
> ```

***

### list

`emailMasterTemplates.list`

List ClickSend master email templates

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailMasterTemplates.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   template_id_master?: number,
>   template_name?: string,
>   date_added?: string,
>   body?: string,
>   category_id?: number,
>   thumbnail?: {
>     small?: string,
>     large?: string
>   }
> }[]
> ```

***

### listInCategory

`emailMasterTemplates.listInCategory`

List master email templates within a category

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailMasterTemplates.listInCategory({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `category_id` | `number` | Yes | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   template_id_master?: number,
>   template_name?: string,
>   date_added?: string,
>   body?: string,
>   category_id?: number,
>   thumbnail?: {
>     small?: string,
>     large?: string
>   }
> }[]
> ```

***

## Email Receipt Rules

### create

`emailReceiptRules.create`

Create an email delivery receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailReceiptRules.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### delete

`emailReceiptRules.delete`

Delete an email delivery receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailReceiptRules.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`emailReceiptRules.get`

Retrieve a single email receipt automation rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailReceiptRules.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### list

`emailReceiptRules.list`

List email delivery receipt automation rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailReceiptRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   receipt_rule_id?: number,
>   rule_name?: string,
>   match_type?: number,
>   action?: string,
>   action_address?: string,
>   enabled?: number
> }[]
> ```

***

### update

`emailReceiptRules.update`

Update an email delivery receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailReceiptRules.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

## Email Templates

### create

`emailTemplates.create`

Create a user email template from a master template

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailTemplates.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id_master` | `number` | Yes | — |
| `template_name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | No | — |
| `template_id_master` | `number` | No | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

***

### delete

`emailTemplates.delete`

Delete a user email template by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailTemplates.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`emailTemplates.get`

Retrieve a single user email template by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailTemplates.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | No | — |
| `template_id_master` | `number` | No | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

***

### list

`emailTemplates.list`

List user email templates

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.emailTemplates.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   template_id?: number,
>   template_id_master?: number,
>   template_name?: string,
>   body?: string
> }[]
> ```

***

### update

`emailTemplates.update`

Update a user email template

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.emailTemplates.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | Yes | — |
| `body` | `string` | Yes | — |
| `template_name` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | No | — |
| `template_id_master` | `number` | No | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

***

## Fax Inbound Rules

### create

`faxInboundRules.create`

Create a fax inbound automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxInboundRules.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `dedicated_number` | `string` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | No | — |
| `dedicated_number` | `string` | No | — |
| `rule_name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### delete

`faxInboundRules.delete`

Delete a fax inbound automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxInboundRules.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`faxInboundRules.get`

Retrieve a single fax inbound automation rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.faxInboundRules.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | No | — |
| `dedicated_number` | `string` | No | — |
| `rule_name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### list

`faxInboundRules.list`

List fax inbound automation rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.faxInboundRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   inbound_rule_id?: number,
>   dedicated_number?: string,
>   rule_name?: string,
>   user_id?: number,
>   action?: string,
>   action_address?: string,
>   enabled?: number
> }[]
> ```

***

### update

`faxInboundRules.update`

Update a fax inbound automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxInboundRules.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | Yes | — |
| `dedicated_number` | `string` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | No | — |
| `dedicated_number` | `string` | No | — |
| `rule_name` | `string` | No | — |
| `user_id` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

## Fax Receipt Rules

### create

`faxReceiptRules.create`

Create a fax receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxReceiptRules.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### delete

`faxReceiptRules.delete`

Delete a fax receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxReceiptRules.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`faxReceiptRules.get`

Retrieve a single fax receipt automation rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.faxReceiptRules.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### list

`faxReceiptRules.list`

List fax receipt automation rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.faxReceiptRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   receipt_rule_id?: number,
>   rule_name?: string,
>   match_type?: number,
>   action?: string,
>   action_address?: string,
>   enabled?: number
> }[]
> ```

***

### update

`faxReceiptRules.update`

Update a fax receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxReceiptRules.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

## Fax Receipts

### createTest

`faxReceipts.createTest`

Create a test fax delivery receipt for a callback URL

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxReceipts.createTest({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `timestamp_send` | `number` | No | — |
| `timestamp` | `number` | No | — |
| `message_id` | `string` | No | — |
| `status_code` | `string` | No | — |
| `status_text` | `string` | No | — |
| `error_code` | `string` | No | — |
| `error_text` | `string` | No | — |
| `custom_string` | `string` | No | — |
| `subaccount_id` | `number` | No | — |
| `message_type` | `string` | No | — |

***

### get

`faxReceipts.get`

Retrieve a single fax receipt by message ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.faxReceipts.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_id` | `number` | No | — |
| `subaccount_id` | `number` | No | — |
| `list_id` | `number` | No | — |
| `message_id` | `string` | No | — |
| `to` | `string` | No | — |
| `from` | `string` | No | — |
| `carrier` | `string` | No | — |
| `country` | `string` | No | — |
| `custom_string` | `string` | No | — |
| `schedule` | `number` | No | — |
| `message_pages` | `number` | No | — |
| `message_price` | `string` | No | — |
| `status_code` | `string` | No | — |
| `status_text` | `string` | No | — |
| `date_added` | `string` | No | — |
| `from_email` | `string` | No | — |
| `status` | `string` | No | — |

***

### list

`faxReceipts.list`

List fax delivery receipts with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.faxReceipts.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   timestamp_send?: number,
>   timestamp?: number,
>   message_id?: string,
>   status_code?: string,
>   status_text?: string,
>   error_code?: string,
>   error_text?: string,
>   custom_string?: string,
>   subaccount_id?: number,
>   message_type?: string
> }[]
> ```

***

### markRead

`faxReceipts.markRead`

Mark fax delivery receipts as read

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.faxReceipts.markRead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date_before` | `number` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

## Mms

### history

`mms.history`

List MMS message history with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.mms.history({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |
| `date_from` | `number` | No | — |
| `date_to` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   direction?: string,
>   date?: number,
>   to?: string,
>   body?: string,
>   subject?: string,
>   from?: string,
>   schedule?: number,
>   message_id?: string,
>   message_parts?: number,
>   message_price?: string,
>   custom_string?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   country?: string,
>   carrier?: string,
>   currency?: string,
>   status?: string
> }[]
> ```

***

### historyExport

`mms.historyExport`

Export MMS history to a downloadable file

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.mms.historyExport({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filename` | `string` | No | — |
| `q` | `string` | No | — |
| `order_by` | `string` | No | — |
| `date_from` | `number` | No | — |
| `date_to` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | No | — |

***

### price

`mms.price`

Calculate the price of MMS messages without sending

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.mms.price({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `media_file` | `string` | Yes | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   subject: string,
>   from: string,
>   source?: string,
>   schedule?: number,
>   country?: string,
>   list_id?: number,
>   custom_string?: string,
>   from_email?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   direction?: string,
>   date?: number,
>   to?: string,
>   body?: string,
>   subject?: string,
>   from?: string,
>   schedule?: number,
>   message_id?: string,
>   message_parts?: number,
>   message_price?: string,
>   custom_string?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   country?: string,
>   carrier?: string,
>   currency?: string,
>   status?: string
> }[]
> ```

***

### receipts

`mms.receipts`

List MMS delivery receipts with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.mms.receipts({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   message_id?: string,
>   status?: string,
>   status_code?: string,
>   status_text?: string,
>   timestamp?: number,
>   original_message_id?: string
> }[]
> ```

***

### receiptsMarkRead

`mms.receiptsMarkRead`

Mark MMS delivery receipts as read

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.mms.receiptsMarkRead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date_before` | `number` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### send

`mms.send`

Send one or more MMS messages with media

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.mms.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `media_file` | `string` | Yes | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   subject: string,
>   from: string,
>   source?: string,
>   schedule?: number,
>   country?: string,
>   list_id?: number,
>   custom_string?: string,
>   from_email?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   direction?: string,
>   date?: number,
>   to?: string,
>   body?: string,
>   subject?: string,
>   from?: string,
>   schedule?: number,
>   message_id?: string,
>   message_parts?: number,
>   message_price?: string,
>   custom_string?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   country?: string,
>   carrier?: string,
>   currency?: string,
>   status?: string
> }[]
> ```

***

## Numbers

### buy

`numbers.buy`

Purchase a dedicated number

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.numbers.buy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `dedicated_number` | `string` | Yes | — |
| `type` | `sms \| mms` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `dedicated_number` | `string` | No | — |
| `country` | `string` | No | — |
| `price_total` | `number \| string` | No | — |

***

### list

`numbers.list`

List owned dedicated numbers

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.numbers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |
| `q` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   dedicated_number?: string,
>   country?: string,
>   price?: number | string,
>   type?: string,
>   number_type?: string
> }[]
> ```

***

### search

`numbers.search`

Search available dedicated numbers by country

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.numbers.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `country` | `string` | Yes | — |
| `search` | `string` | No | — |
| `search_type` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   country?: string,
>   country_name?: string,
>   dedicated_number?: string,
>   price_setup?: number | string,
>   price_monthly?: number | string,
>   price_total?: number | string
> }[]
> ```

***

## Post Direct Mail

### searchLocations

`postDirectMail.searchLocations`

Search direct mail delivery locations by country

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.postDirectMail.searchLocations({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `country` | `string` | Yes | — |
| `q` | `string` | Yes | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### send

`postDirectMail.send`

Send a direct mail campaign

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postDirectMail.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `size` | `A5 \| DL` | Yes | — |
| `file_urls` | `string[]` | Yes | — |
| `areas` | `object[]` | No | — |
| `schedule` | `number` | No | — |
| `source` | `string` | No | — |
| `custom_string` | `string` | No | — |

> **areas full type**
>
> ```ts theme={null}
> {
>   location_id?: number,
>   quantity?: number
> }[]
> ```

**Output:** *empty object*

***

## Post Letters

### detectAddress

`postLetters.detectAddress`

Detect a structured address from PDF content or text

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postLetters.detectAddress({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | No | Letter content to detect the address from; at least one of content or address is expected |
| `address` | `string` | No | Address text to parse; at least one of content or address is expected |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `address_name` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

### history

`postLetters.history`

List post letter history with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.postLetters.history({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   message_id?: string,
>   address_name?: string,
>   address_line_1?: string,
>   address_line_2?: string,
>   address_city?: string,
>   address_state?: string,
>   address_postal_code?: string,
>   address_country?: string,
>   return_address_id?: number,
>   custom_string?: string,
>   schedule?: number,
>   source?: string,
>   colour?: number,
>   duplex?: number,
>   post_pages?: number,
>   post_price?: number,
>   priority_post?: number,
>   date_added?: string,
>   status?: string
> }[]
> ```

***

### historyExport

`postLetters.historyExport`

Export post letter history to a downloadable file

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.postLetters.historyExport({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filename` | `string` | Yes | — |
| `q` | `string` | No | — |
| `order_by` | `string` | No | — |
| `date_from` | `string` | No | — |
| `date_to` | `string` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | No | — |

***

### price

`postLetters.price`

Calculate post letter price without sending

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postLetters.price({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_url` | `string` | Yes | — |
| `recipients` | `object[]` | Yes | — |
| `template_used` | `number` | No | — |
| `colour` | `number` | No | — |
| `duplex` | `number` | No | — |
| `priority_post` | `number` | No | — |
| `schedule` | `number` | No | — |
| `source` | `string` | No | — |

> **recipients full type**
>
> ```ts theme={null}
> {
>   address_name: string,
>   address_line_1: string,
>   address_line_2?: string,
>   address_city: string,
>   address_state?: string,
>   address_postal_code: string,
>   address_country: string,
>   return_address_id: number,
>   custom_string?: string,
>   schedule?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_cost` | `number` | No | — |
| `recipients` | `object[]` | No | — |

> **recipients full type**
>
> ```ts theme={null}
> {
>   message_id?: string,
>   address_name?: string,
>   address_line_1?: string,
>   address_line_2?: string,
>   address_city?: string,
>   address_state?: string,
>   address_postal_code?: string,
>   address_country?: string,
>   return_address_id?: number,
>   custom_string?: string,
>   schedule?: number,
>   source?: string,
>   colour?: number,
>   duplex?: number,
>   post_pages?: number,
>   post_price?: number,
>   priority_post?: number,
>   date_added?: string,
>   status?: string
> }[]
> ```

***

### send

`postLetters.send`

Send a physical post letter to recipients

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postLetters.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_url` | `string` | Yes | — |
| `recipients` | `object[]` | Yes | — |
| `template_used` | `number` | No | — |
| `colour` | `number` | No | — |
| `duplex` | `number` | No | — |
| `priority_post` | `number` | No | — |
| `schedule` | `number` | No | — |
| `source` | `string` | No | — |

> **recipients full type**
>
> ```ts theme={null}
> {
>   address_name: string,
>   address_line_1: string,
>   address_line_2?: string,
>   address_city: string,
>   address_state?: string,
>   address_postal_code: string,
>   address_country: string,
>   return_address_id: number,
>   custom_string?: string,
>   schedule?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_cost` | `number` | No | — |
| `recipients` | `object[]` | No | — |

> **recipients full type**
>
> ```ts theme={null}
> {
>   message_id?: string,
>   address_name?: string,
>   address_line_1?: string,
>   address_line_2?: string,
>   address_city?: string,
>   address_state?: string,
>   address_postal_code?: string,
>   address_country?: string,
>   return_address_id?: number,
>   custom_string?: string,
>   schedule?: number,
>   source?: string,
>   colour?: number,
>   duplex?: number,
>   post_pages?: number,
>   post_price?: number,
>   priority_post?: number,
>   date_added?: string,
>   status?: string
> }[]
> ```

***

## Post Return Addresses

### create

`postReturnAddresses.create`

Create a post return address

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postReturnAddresses.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `address_name` | `string` | Yes | — |
| `address_line_1` | `string` | Yes | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | Yes | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | Yes | — |
| `address_country` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `return_address_id` | `number` | No | — |
| `user_id` | `number` | No | — |
| `address_name` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

### delete

`postReturnAddresses.delete`

Delete a post return address by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postReturnAddresses.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`postReturnAddresses.get`

Retrieve a single post return address by ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.postReturnAddresses.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `return_address_id` | `number` | No | — |
| `user_id` | `number` | No | — |
| `address_name` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

### list

`postReturnAddresses.list`

List post return addresses with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.postReturnAddresses.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   return_address_id?: number,
>   user_id?: number,
>   address_name?: string,
>   address_line_1?: string,
>   address_line_2?: string,
>   address_city?: string,
>   address_state?: string,
>   address_postal_code?: string,
>   address_country?: string
> }[]
> ```

***

### update

`postReturnAddresses.update`

Update a post return address by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.postReturnAddresses.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `return_address_id` | `number` | Yes | — |
| `address_name` | `string` | Yes | — |
| `address_line_1` | `string` | Yes | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | Yes | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | Yes | — |
| `address_country` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `return_address_id` | `number` | No | — |
| `user_id` | `number` | No | — |
| `address_name` | `string` | No | — |
| `address_line_1` | `string` | No | — |
| `address_line_2` | `string` | No | — |
| `address_city` | `string` | No | — |
| `address_state` | `string` | No | — |
| `address_postal_code` | `string` | No | — |
| `address_country` | `string` | No | — |

***

## Recharge

### creditCardGet

`recharge.creditCardGet`

Retrieve the stored recharge credit card

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.recharge.creditCardGet({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `display_number` | `string` | No | — |
| `expiry_month` | `number \| string` | No | — |
| `expiry_year` | `number \| string` | No | — |
| `name` | `string` | No | — |

***

### creditCardUpdate

`recharge.creditCardUpdate`

Replace the stored recharge credit card

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.recharge.creditCardUpdate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `number` | `string` | Yes | — |
| `expiry_month` | `number \| string` | Yes | — |
| `expiry_year` | `number \| string` | Yes | — |
| `cvc` | `number \| string` | Yes | — |
| `name` | `string` | Yes | — |
| `bank_name` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string` | No | — |

***

### packages

`recharge.packages`

List available recharge packages and currency

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.recharge.packages({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packages` | `object[]` | No | — |
| `currency` | `string` | No | — |

> **packages full type**
>
> ```ts theme={null}
> {
>   package_id?: number | string,
>   package_price?: number | string,
>   price_rate?: number | string,
>   sms_price?: number | string
> }[]
> ```

***

### purchase

`recharge.purchase`

Purchase a recharge package by ID

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.recharge.purchase({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `package_id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_id` | `number \| string` | No | — |
| `amount` | `number \| string` | No | — |
| `currency` | `string` | No | — |
| `amount_aud` | `number \| string` | No | — |
| `date` | `string` | No | — |

***

### transactionGet

`recharge.transactionGet`

Retrieve a single recharge transaction

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.recharge.transactionGet({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transaction_id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice_number` | `string \| number` | No | — |
| `amount` | `number \| string` | No | — |
| `currency` | `string` | No | — |
| `date` | `string` | No | — |

***

### transactions

`recharge.transactions`

List recharge transactions with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.recharge.transactions({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   invoice_number?: string | number,
>   amount?: number | string,
>   currency?: string,
>   date?: string
> }[]
> ```

***

## Referral

### accountsList

`referral.accountsList`

List referral accounts

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.referral.accountsList({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   referral_rule_id?: number | string,
>   refered_user_id?: number | string,
>   date_referred?: string,
>   percentage_referral?: number | string
> }[]
> ```

***

## Reseller

### accountsList

`reseller.accountsList`

List reseller child accounts

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.reseller.accountsList({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
> }[]
> ```

***

### settingsGet

`reseller.settingsGet`

Retrieve reseller settings

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.reseller.settingsGet({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### settingsUpdate

`reseller.settingsUpdate`

Update reseller settings

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.reseller.settingsUpdate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allow_public_signups` | `boolean` | No | — |
| `company_name` | `string` | No | — |
| `default_margin` | `number` | No | — |
| `subdomain` | `string` | No | — |
| `trial_balance` | `number \| string` | No | — |

**Output:** *empty object*

***

## Sms

### cancel

`sms.cancel`

Cancel a scheduled SMS message

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.cancel({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `direction` | `string` | No | — |
| `date` | `number` | No | — |
| `to` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `from` | `string` | No | — |
| `schedule` | `number` | No | — |
| `message_id` | `string` | Yes | — |
| `message_parts` | `number` | No | — |
| `message_price` | `string` | No | — |
| `custom_string` | `string` | No | — |
| `user_id` | `number` | No | — |
| `subaccount_id` | `number` | No | — |
| `country` | `string` | No | — |
| `carrier` | `string` | No | — |
| `currency` | `string` | No | — |
| `status` | `string` | Yes | — |

***

### cancelAll

`sms.cancelAll`

Cancel all scheduled SMS messages

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.cancelAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_string` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | No | — |

***

### history

`sms.history`

List sent SMS message history with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.sms.history({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |
| `date_from` | `number` | No | Start epoch timestamp |
| `date_to` | `number` | No | End epoch timestamp |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `total` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   direction?: string,
>   date?: number,
>   to: string,
>   body: string,
>   from?: string,
>   schedule?: number,
>   message_id: string,
>   message_parts?: number,
>   message_price?: string,
>   custom_string?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   country?: string,
>   carrier?: string,
>   currency?: string,
>   status: string
> }[]
> ```

***

### historyExport

`sms.historyExport`

Export SMS history to a downloadable file

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.sms.historyExport({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filename` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |
| `date_from` | `number` | No | — |
| `date_to` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | No | — |

***

### inbound

`sms.inbound`

List received inbound SMS messages with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.sms.inbound({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `total` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   message_id: string,
>   to: string,
>   from: string,
>   body: string,
>   timestamp?: number,
>   original_message_id?: string
> }[]
> ```

***

### inboundCreateTest

`sms.inboundCreateTest`

Create a test inbound SMS message

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.inboundCreateTest({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `to` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `body` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message_id` | `string` | No | — |
| `to` | `string` | No | — |
| `from` | `string` | No | — |
| `body` | `string` | No | — |
| `timestamp` | `number` | No | — |
| `original_message_id` | `string` | No | — |

***

### inboundMarkRead

`sms.inboundMarkRead`

Mark inbound SMS messages as read

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.inboundMarkRead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date_before` | `number` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### inboundMarkReadOne

`sms.inboundMarkReadOne`

Mark a single inbound SMS message as read

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.inboundMarkReadOne({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### price

`sms.price`

Calculate the price of SMS messages without sending

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.price({});
```

**Input**

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

> **messages full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   from?: string,
>   schedule?: number,
>   source?: string,
>   custom_string?: string,
>   country?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `blocked_count` | `number` | No | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   direction?: string,
>   date?: number,
>   to: string,
>   body: string,
>   from?: string,
>   schedule?: number,
>   message_id: string,
>   message_parts?: number,
>   message_price?: string,
>   custom_string?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   country?: string,
>   carrier?: string,
>   currency?: string,
>   status: string
> }[]
> ```

***

### receiptCreateTest

`sms.receiptCreateTest`

Create a test SMS delivery receipt for a webhook URL

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.receiptCreateTest({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message_id` | `string` | No | — |
| `status` | `string` | No | — |
| `status_code` | `string` | No | — |
| `status_text` | `string` | No | — |
| `timestamp` | `number` | No | — |
| `original_message_id` | `string` | No | — |

***

### receiptGet

`sms.receiptGet`

Retrieve a single SMS delivery receipt by message ID

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.sms.receiptGet({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message_id` | `string` | No | — |
| `status` | `string` | No | — |
| `status_code` | `string` | No | — |
| `status_text` | `string` | No | — |
| `timestamp` | `number` | No | — |
| `original_message_id` | `string` | No | — |

***

### receipts

`sms.receipts`

List SMS delivery receipts with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.sms.receipts({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `total` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   message_id: string,
>   status: string,
>   status_code?: string,
>   status_text?: string,
>   timestamp?: number,
>   original_message_id?: string
> }[]
> ```

***

### receiptsMarkRead

`sms.receiptsMarkRead`

Mark SMS delivery receipts as read

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.receiptsMarkRead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date_before` | `number` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### send

`sms.send`

Send one or more SMS messages

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.sms.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `messages` | `object[]` | Yes | Array of SMS messages to send |

> **messages full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   from?: string,
>   schedule?: number,
>   source?: string,
>   custom_string?: string,
>   country?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `blocked_count` | `number` | No | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   direction?: string,
>   date?: number,
>   to: string,
>   body: string,
>   from?: string,
>   schedule?: number,
>   message_id: string,
>   message_parts?: number,
>   message_price?: string,
>   custom_string?: string,
>   user_id?: number,
>   subaccount_id?: number,
>   country?: string,
>   carrier?: string,
>   currency?: string,
>   status: string
> }[]
> ```

***

### statistics

`sms.statistics`

Retrieve SMS usage statistics

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.sms.statistics({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `object` | No | — |
| `inbound` | `object` | No | — |
| `outbound` | `object` | No | — |

> **total full type**
>
> ```ts theme={null}
> {
> }
> ```

> **inbound full type**
>
> ```ts theme={null}
> {
> }
> ```

> **outbound full type**
>
> ```ts theme={null}
> {
> }
> ```

***

## Sms Email Sms

### create

`smsEmailSms.create`

Allow an email address for email-to-SMS

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsEmailSms.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address` | `string` | Yes | — |
| `from` | `string` | No | — |
| `from_fax` | `string` | No | — |
| `subaccount_id` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_address_id` | `number` | No | — |
| `email_address` | `string` | No | — |
| `from` | `string` | No | — |
| `subaccount_id` | `number` | No | — |
| `from_fax` | `string` | No | — |
| `voice` | `string` | No | — |
| `lang` | `string` | No | — |

***

### list

`smsEmailSms.list`

List allowed email-to-SMS addresses

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsEmailSms.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   email_address_id?: number,
>   email_address?: string,
>   from?: string,
>   subaccount_id?: number,
>   from_fax?: string,
>   voice?: string,
>   lang?: string
> }[]
> ```

***

## Sms Inbound Rules

### create

`smsInboundRules.create`

Create an SMS inbound automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsInboundRules.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `dedicated_number` | `string` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `message_search_type` | `number` | Yes | — |
| `message_search_term` | `string` | No | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `body` | `string` | No | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | No | — |
| `dedicated_number` | `string` | No | — |
| `rule_name` | `string` | No | — |
| `message_search_type` | `number` | No | — |
| `message_search_term` | `string` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `body` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### delete

`smsInboundRules.delete`

Delete an SMS inbound automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsInboundRules.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`smsInboundRules.get`

Retrieve an SMS inbound automation rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsInboundRules.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | No | — |
| `dedicated_number` | `string` | No | — |
| `rule_name` | `string` | No | — |
| `message_search_type` | `number` | No | — |
| `message_search_term` | `string` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `body` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### list

`smsInboundRules.list`

List SMS inbound automation rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsInboundRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   inbound_rule_id?: number,
>   dedicated_number?: string,
>   rule_name?: string,
>   message_search_type?: number,
>   message_search_term?: string,
>   action?: string,
>   action_address?: string,
>   body?: string,
>   enabled?: number
> }[]
> ```

***

### update

`smsInboundRules.update`

Update an SMS inbound automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsInboundRules.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | Yes | — |
| `dedicated_number` | `string` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `message_search_type` | `number` | Yes | — |
| `message_search_term` | `string` | No | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `body` | `string` | No | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inbound_rule_id` | `number` | No | — |
| `dedicated_number` | `string` | No | — |
| `rule_name` | `string` | No | — |
| `message_search_type` | `number` | No | — |
| `message_search_term` | `string` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `body` | `string` | No | — |
| `enabled` | `number` | No | — |

***

## Sms Receipt Rules

### create

`smsReceiptRules.create`

Create an SMS receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsReceiptRules.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### delete

`smsReceiptRules.delete`

Delete an SMS receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsReceiptRules.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`smsReceiptRules.get`

Retrieve an SMS receipt automation rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsReceiptRules.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### list

`smsReceiptRules.list`

List SMS receipt automation rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsReceiptRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   receipt_rule_id?: number,
>   rule_name?: string,
>   match_type?: number,
>   action?: string,
>   action_address?: string,
>   enabled?: number
> }[]
> ```

***

### update

`smsReceiptRules.update`

Update an SMS receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsReceiptRules.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

## Sms Stripped Strings

### create

`smsStrippedStrings.create`

Create an email-to-SMS stripped-string rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsStrippedStrings.create({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_id` | `number` | No | — |
| `strip_string` | `string` | No | — |
| `stripped_string` | `string` | No | — |

***

### delete

`smsStrippedStrings.delete`

Delete an email-to-SMS stripped-string rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsStrippedStrings.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`smsStrippedStrings.get`

Retrieve a single stripped-string rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsStrippedStrings.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_id` | `number` | No | — |
| `strip_string` | `string` | No | — |
| `stripped_string` | `string` | No | — |

***

### list

`smsStrippedStrings.list`

List email-to-SMS stripped-string rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsStrippedStrings.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   rule_id?: number,
>   strip_string?: string,
>   stripped_string?: string
> }[]
> ```

***

### update

`smsStrippedStrings.update`

Update an email-to-SMS stripped-string rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsStrippedStrings.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_id` | `number` | Yes | — |
| `strip_string` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_id` | `number` | No | — |
| `strip_string` | `string` | No | — |
| `stripped_string` | `string` | No | — |

***

## Sms Templates

### create

`smsTemplates.create`

Create an SMS message template

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsTemplates.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_name` | `string` | Yes | — |
| `body` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | No | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

***

### delete

`smsTemplates.delete`

Delete an SMS template

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsTemplates.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`smsTemplates.get`

Retrieve a single SMS template

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsTemplates.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | No | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

***

### list

`smsTemplates.list`

List SMS templates with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.smsTemplates.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   template_id?: number,
>   template_name?: string,
>   body?: string
> }[]
> ```

***

### update

`smsTemplates.update`

Update an SMS template

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.smsTemplates.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | Yes | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `template_id` | `number` | No | — |
| `template_name` | `string` | No | — |
| `body` | `string` | No | — |

***

## Subaccounts

### create

`subaccounts.create`

Create a new subaccount

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.subaccounts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `api_username` | `string` | Yes | — |
| `password` | `string` | Yes | — |
| `email` | `string` | Yes | — |
| `phone_number` | `string` | Yes | — |
| `first_name` | `string` | Yes | — |
| `last_name` | `string` | Yes | — |
| `notes` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | No | — |
| `api_username` | `string` | No | — |
| `email` | `string` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `api_key` | `string` | No | — |

***

### delete

`subaccounts.delete`

Delete a subaccount

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.subaccounts.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | Yes | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`subaccounts.get`

Retrieve a single subaccount

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.subaccounts.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | No | — |
| `api_username` | `string` | No | — |
| `email` | `string` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `api_key` | `string` | No | — |

***

### list

`subaccounts.list`

List subaccounts with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.subaccounts.list({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   subaccount_id?: number | string,
>   api_username?: string,
>   email?: string,
>   phone_number?: string,
>   first_name?: string,
>   last_name?: string,
>   api_key?: string
> }[]
> ```

***

### regenKey

`subaccounts.regenKey`

Regenerate a subaccount API key

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.subaccounts.regenKey({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `api_key` | `string` | No | — |

***

### update

`subaccounts.update`

Update subaccount contact fields

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.subaccounts.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | Yes | — |
| `email` | `string` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `notes` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subaccount_id` | `number \| string` | No | — |
| `api_username` | `string` | No | — |
| `email` | `string` | No | — |
| `phone_number` | `string` | No | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `api_key` | `string` | No | — |

***

## Timezones

### list

`timezones.list`

List supported timezone names

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.timezones.list({});
```

**Input:** *empty object*

**Output:** `string[]`

***

## Uploads

### upload

`uploads.upload`

Upload and convert a file for messaging services

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.uploads.upload({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `convert` | `fax \| mms \| csv \| post \| postcard` | Yes | — |
| `content` | `string` | Yes | Base64-encoded file content |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_name` | `string` | No | — |
| `upload_id` | `number` | No | — |
| `user_id` | `number` | No | — |
| `date_added` | `string` | No | — |
| `date_delete` | `string` | No | — |
| `_url` | `string` | No | — |

***

### uploadDocument

`uploads.uploadDocument`

Upload a document for fax and post services

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.uploads.uploadDocument({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `convert` | `fax \| post \| postcard` | Yes | — |
| `content` | `string` | Yes | Base64-encoded file content |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_name` | `string` | No | — |
| `upload_id` | `number` | No | — |
| `user_id` | `number` | No | — |
| `date_added` | `string` | No | — |
| `date_delete` | `string` | No | — |
| `_url` | `string` | No | — |

***

## Voice

### cancelAll

`voice.cancelAll`

Cancel all scheduled voice calls

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.voice.cancelAll({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | No | — |

***

### history

`voice.history`

List voice call history with pagination

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.voice.history({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `total` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> **data full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   voice?: string,
>   lang?: string,
>   message_id: string,
>   status: string,
>   date?: number
> }[]
> ```

***

### historyExport

`voice.historyExport`

Export voice history to a downloadable file

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.voice.historyExport({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filename` | `string` | No | — |
| `q` | `string` | No | — |
| `order_by` | `string` | No | — |
| `date_from` | `number` | No | — |
| `date_to` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | No | — |

***

### languages

`voice.languages`

List available voice-call languages

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.voice.languages({});
```

**Input:** *empty object*

**Output:** `object[]`

> **Output full type**
>
> ```ts theme={null}
> {
>   code: string,
>   country?: string,
>   gender?: string
> }[]
> ```

***

### receiptsMarkRead

`voice.receiptsMarkRead`

Mark voice delivery receipts as read

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.voice.receiptsMarkRead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `date_before` | `number` | No | — |

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### send

`voice.send`

Initiate outbound text-to-speech voice call

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.voice.send({});
```

**Input**

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

> **messages full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   voice?: female | male,
>   lang?: string,
>   schedule?: number,
>   require_input?: number,
>   machine_detection?: number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total_price` | `number` | No | — |
| `total_count` | `number` | No | — |
| `queued_count` | `number` | No | — |
| `messages` | `object[]` | Yes | — |

> **messages full type**
>
> ```ts theme={null}
> {
>   to: string,
>   body: string,
>   voice?: string,
>   lang?: string,
>   message_id: string,
>   status: string,
>   date?: number
> }[]
> ```

***

### statistics

`voice.statistics`

Retrieve voice usage statistics

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.voice.statistics({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `object` | No | — |
| `inbound` | `object` | No | — |
| `outbound` | `object` | No | — |

> **total full type**
>
> ```ts theme={null}
> {
> }
> ```

> **inbound full type**
>
> ```ts theme={null}
> {
> }
> ```

> **outbound full type**
>
> ```ts theme={null}
> {
> }
> ```

***

## Voice Receipt Rules

### create

`voiceReceiptRules.create`

Create a voice receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.voiceReceiptRules.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### delete

`voiceReceiptRules.delete`

Delete a voice receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.voiceReceiptRules.delete({});
```

**Input**

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

**Output:** `object`

> **Output full type**
>
> ```ts theme={null}
> never[] | {
> } | boolean | null
> ```

***

### get

`voiceReceiptRules.get`

Retrieve a voice receipt automation rule

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.voiceReceiptRules.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***

### list

`voiceReceiptRules.list`

List voice receipt automation rules

**Risk:** `read`

```ts theme={null}
await corsair.clicksend.api.voiceReceiptRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | — |
| `page` | `number` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `total` | `number` | No | — |
| `per_page` | `number` | No | — |
| `current_page` | `number` | No | — |
| `last_page` | `number` | No | — |
| `data` | `object[]` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
>   receipt_rule_id?: number,
>   rule_name?: string,
>   match_type?: number,
>   action?: string,
>   action_address?: string,
>   enabled?: number
> }[]
> ```

***

### update

`voiceReceiptRules.update`

Update a voice receipt automation rule

**Risk:** `write`

```ts theme={null}
await corsair.clicksend.api.voiceReceiptRules.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | Yes | — |
| `rule_name` | `string` | Yes | — |
| `match_type` | `number` | Yes | — |
| `action` | `string` | Yes | — |
| `action_address` | `string` | Yes | — |
| `enabled` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `receipt_rule_id` | `number` | No | — |
| `rule_name` | `string` | No | — |
| `match_type` | `number` | No | — |
| `action` | `string` | No | — |
| `action_address` | `string` | No | — |
| `enabled` | `number` | No | — |

***


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