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

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

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

## Campaign

### delete

`campaign.delete`

Delete a saved Campaign Cleaner campaign by ID

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

```ts theme={null}
await corsair.campaigncleaner.api.campaign.delete({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `success \| failure` | Yes | — |
| `error` | `string` | No | — |

***

### list

`campaign.list`

List saved Campaign Cleaner campaigns

**Risk:** `read`

```ts theme={null}
await corsair.campaigncleaner.api.campaign.list({});
```

**Input:** *empty object*

**Output**

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

> [accordion] campaign\_list full type
>
> ```ts theme={null}
> {
>   id: string,
>   campaign_name: string,
>   status: processing | completed | paused,
>   date_added: string
> }[]
> ```

***

### pdfAnalysis

`campaign.pdfAnalysis`

Download PDF analysis for a processed campaign

**Risk:** `read`

```ts theme={null}
await corsair.campaigncleaner.api.campaign.pdfAnalysis({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `content_type` | `string` | Yes | — |
| `content_base64` | `string` | Yes | — |

***

### status

`campaign.status`

Get processing status for a Campaign Cleaner campaign

**Risk:** `read`

```ts theme={null}
await corsair.campaigncleaner.api.campaign.status({});
```

**Input**

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

**Output**

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

> [accordion] campaign\_status full type
>
> ```ts theme={null}
> {
>   id: string,
>   campaign_name: string,
>   status: processing | completed | paused,
>   date_added: string
> }
> ```

***

## Credits

### get

`credits.get`

Get remaining Campaign Cleaner credits

**Risk:** `read`

```ts theme={null}
await corsair.campaigncleaner.api.credits.get({});
```

**Input:** *empty object*

**Output**

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

***


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