> ## 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.

# Proofly API reference

> API reference for the Proofly plugin in Corsair: every `proofly.api.*` operation with its input and output types, taken from the plugin's 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).

## Activity

### list

`activity.list`

Read Proofly activity logs. The logs are not stored.

**Risk:** `read`

```ts theme={null}
await corsair.proofly.api.activity.list({});
```

**Input:** *empty object*

Official activity fields are type, ip, and date. The call returns them and stores nothing.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `true` | Yes | — |
| `status` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   type: string,
>   ip?: string,
>   date?: string
> }[]
> ```

***

## Campaigns

### list

`campaigns.list`

List Proofly campaigns for the connected account.

**Risk:** `read`

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

**Input:** *empty object*

Official campaign fields are id, name, domain.domain, domain.subdomains, enabled, and created. id is stored as a decimal string.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `true` | Yes | — |
| `status` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   name: string,
>   domain?: {
>     domain: string,
>     subdomains: boolean
>   },
>   enabled?: boolean,
>   created?: string
> }[]
> ```

***

### setEnabled

`campaigns.setEnabled`

Turn a campaign on or off; sends nothing when it already has that state.

**Risk:** `write`

```ts theme={null}
await corsair.proofly.api.campaigns.setEnabled({ campaign_id: 464014, enabled: false });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `number \| string` | Yes | Campaign id from campaigns.list |
| `enabled` | `boolean` | Yes | true to turn the campaign on, false to turn it off |

PUT /campaign/{campaign_id} flips the campaign. The plugin first reads GET /campaigns and sends the PUT only when the current state differs from `enabled`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `string` | Yes | — |
| `enabled` | `boolean` | Yes | — |
| `changed` | `boolean` | Yes | false when the campaign already had that state and nothing was sent |
| `message` | `string` | No | Proofly's reply, when a change was sent |

***

## Notifications

### getData

`notifications.getData`

Read the leads and conversions a notification collected. Not stored.

**Risk:** `read`

```ts theme={null}
await corsair.proofly.api.notifications.getData({ notification_id: 745613007 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `notification_id` | `number \| string` | Yes | Notification id from notifications.list |

GET /data/{notification_id}. Leads and conversions with visitor input, IP and location. Returned, not stored.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `true` | Yes | — |
| `status` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   data?: {
>   } | null,
>   ip?: string | null,
>   url?: string | null,
>   location?: {
>     city?: string | null,
>     country_code?: string | null,
>     country?: string | null
>   } | null,
>   date?: string | null
> }[]
> ```

***

### list

`notifications.list`

List the notifications in a campaign with their settings and stats.

**Risk:** `read`

```ts theme={null}
await corsair.proofly.api.notifications.list({ campaign_id: 464014 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `campaign_id` | `number \| string` | Yes | Campaign id from campaigns.list |

GET /campaign/{campaign_id}. One entry per notification, with settings and stats.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `true` | Yes | — |
| `status` | `number` | No | — |
| `data` | `object[]` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number | string,
>   name?: string | null,
>   type?: string | null,
>   settings?: {
>   } | null,
>   stats?: {
>     impressions?: number | null,
>     hovers?: number | null,
>     clicks?: number | null,
>     leads?: number | null
>   } | null,
>   enabled?: boolean | null,
>   created?: string | null
> }[]
> ```

***

## User

### get

`user.get`

Read the signed-in Proofly user. The pixel key is removed from the result.

**Risk:** `read`

```ts theme={null}
await corsair.proofly.api.user.get({});
```

**Input:** *empty object*

Official user fields are name, email, meta, impressions, and pixel. The call returns and stores email, name, meta, and impressions. pixel is removed.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `true` | Yes | — |
| `status` | `number` | No | — |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   name?: string,
>   email: string,
>   meta?: {
>     logins?: number,
>     registered?: string
>   },
>   impressions?: {
>     period?: number,
>     total?: number
>   },
>   pixel?: {
>     key?: string,
>     debug?: boolean
>   }
> }
> ```

***


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