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

# Wachete API reference

> API reference for the Wachete plugin in Corsair: every `wachete.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).

## Data

### list

`data.list`

Read a monitor's check history, optionally as a diff per entry

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.data.list({ id: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e', returnDiff: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The monitor id. |
| `from` | `string` | No | ISO 8601 start. |
| `to` | `string` | No | ISO 8601 end. |
| `count` | `number` | No | — |
| `returnDiff` | `boolean` | No | Return a Google-style diff per entry rather than the raw value. |
| `continuationToken` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `continuationToken` | `string \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   lastCheckTimestamp?: string | null,
>   valueChangedTimestamp?: string | null,
>   raw?: string | null,
>   error?: string | null,
>   diff?: {
>     o?: number | null,
>     t?: string | null,
>     operation?: number | null,
>     text?: string | null
>   }[] | null
> }[] | null
> ```

***

## Folders

### delete

`folders.delete`

Delete a folder with every subfolder and monitor inside it; this cannot be undone

**Risk:** `destructive`

```ts theme={null}
await corsair.wachete.api.folders.delete({ id: '576b3f7e-e126-4e92-9b95-f72a8d187a18' });
```

**Input**

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

**Output**

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

***

### list

`folders.list`

List a folder subfolders and monitors, with the path to that folder

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.folders.list({ parentId: '576b3f7e-e126-4e92-9b95-f72a8d187a18' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentId` | `string` | No | The folder to list. Omit to list the root. |
| `continuationToken` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `subfolders` | `object[] \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |
| `path` | `object[] \| null` | No | — |
| `continuationToken` | `string \| null` | No | — |

> [accordion] subfolders full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   parentId?: string | null,
>   count?: number | null,
>   failedCount?: number | null,
>   pausedCount?: number | null
> }[] | null
> ```

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   method?: string | null,
>   url?: string | null,
>   headers?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   body?: string | null,
>   xPath?: string | null,
>   excludeXPath?: string | null,
>   regex?: string | null,
>   alerts?: {
>     type?: string | number | null,
>     value?: string | null,
>     parameters?: {
>       compare?: string | number | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   recurrenceInSeconds?: number | null,
>   folderId?: string | null,
>   data?: {
>     lastCheckTimestamp?: string | null,
>     valueChangedTimestamp?: string | null,
>     raw?: string | null,
>     error?: string | null,
>     diff?: {
>       o?: number | null,
>       t?: string | null,
>       operation?: number | null,
>       text?: string | null
>     }[] | null
>   } | null,
>   notificationEndpoints?: {
>     type?: string | number | null,
>     value?: string | null
>   }[] | null,
>   proxies?: {
>     location?: string | null
>   }[] | null,
>   location?: string | number | null,
>   dynamicContent?: boolean | null,
>   scrollPage?: boolean | null,
>   ignoreInvalidPages?: boolean | null,
>   collectRawHtml?: boolean | null,
>   jobType?: string | number | null,
>   crawlingDepth?: number | null,
>   crawlBinaryContent?: boolean | null,
>   urlFilter?: {
>     include?: {
>       filter?: string | null,
>       type?: string | number | null
>     }[] | null,
>     exclude?: {
>       filter?: string | null,
>       type?: string | number | null
>     }[] | null
>   } | null,
>   crawlPagesFromAllDomains?: boolean | null,
>   note?: string | null
> }[] | null
> ```

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   parentId?: string | null,
>   count?: number | null,
>   failedCount?: number | null,
>   pausedCount?: number | null
> }[] | null
> ```

***

### move

`folders.move`

Move monitors and folders into another folder

**Risk:** `write`

```ts theme={null}
await corsair.wachete.api.folders.move({ folderId: '576b3f7e-e126-4e92-9b95-f72a8d187a18', taskIds: ['9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `folderId` | `string` | Yes | The destination folder. An empty string means the root. |
| `taskIds` | `string[]` | No | — |
| `folderIds` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `moved` | `true` | Yes | — |

***

### upsert

`folders.upsert`

Create a folder, or rename and move one by sending its id

**Risk:** `write`

```ts theme={null}
await corsair.wachete.api.folders.upsert({ name: 'Products' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Omit to create, send to rename or move that folder. |
| `name` | `string` | Yes | — |
| `parentId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `parentId` | `string \| null` | No | — |
| `count` | `number \| null` | No | — |
| `failedCount` | `number \| null` | No | — |
| `pausedCount` | `number \| null` | No | — |

***

## Notifications

### get

`notifications.get`

Read one notification: the monitor name, URL, time and the HTML that was sent

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.notifications.get({ alertId: 'alert-1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobType` | `string \| number \| null` | No | — |
| `syntheticExpression` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `html` | `string \| null` | No | — |
| `timestampUtc` | `string \| null` | No | — |

***

### list

`notifications.list`

List triggered notifications newest first, filtered by monitor and date range

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.notifications.list({ taskId: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e', from: '2024-01-01T00:00:00Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | No | Only this monitor. Omit for every monitor. |
| `from` | `string` | No | ISO 8601 start. |
| `to` | `string` | No | ISO 8601 end. |
| `count` | `number` | No | — |
| `continuationToken` | `string` | No | The token the previous page returned. |
| `html` | `boolean` | No | Include the notification HTML, which makes the response large. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `continuationToken` | `string \| null` | No | Pass this back to read the next page; null on the last. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   type?: string | number | null,
>   current?: string | null,
>   comparand?: string | null,
>   html?: string | null,
>   error?: string | null,
>   timestamp?: string | null,
>   serverTime?: string | null,
>   taskId?: string | null,
>   taskName?: string | null,
>   url?: string | null
> }[] | null
> ```

***

## Tasks

### delete

`tasks.delete`

Permanently delete a monitor and its history; this cannot be undone

**Risk:** `destructive`

```ts theme={null}
await corsair.wachete.api.tasks.delete({ id: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e' });
```

**Input**

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

**Output**

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

***

### get

`tasks.get`

Read one monitor with its settings, its last value and when that value changed

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.tasks.get({ id: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `method` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `headers` | `object[] \| null` | No | — |
| `body` | `string \| null` | No | — |
| `xPath` | `string \| null` | No | — |
| `excludeXPath` | `string \| null` | No | — |
| `regex` | `string \| null` | No | — |
| `alerts` | `object[] \| null` | No | — |
| `recurrenceInSeconds` | `number \| null` | No | — |
| `folderId` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |
| `notificationEndpoints` | `object[] \| null` | No | — |
| `proxies` | `object[] \| null` | No | — |
| `location` | `string \| number \| null` | No | — |
| `dynamicContent` | `boolean \| null` | No | — |
| `scrollPage` | `boolean \| null` | No | — |
| `ignoreInvalidPages` | `boolean \| null` | No | — |
| `collectRawHtml` | `boolean \| null` | No | — |
| `jobType` | `string \| number \| null` | No | — |
| `crawlingDepth` | `number \| null` | No | — |
| `crawlBinaryContent` | `boolean \| null` | No | — |
| `urlFilter` | `object \| null` | No | — |
| `crawlPagesFromAllDomains` | `boolean \| null` | No | — |
| `note` | `string \| null` | No | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] alerts full type
>
> ```ts theme={null}
> {
>   type?: string | number | null,
>   value?: string | null,
>   parameters?: {
>     compare?: string | number | null,
>     value?: string | null
>   } | null
> }[] | null
> ```

> [accordion] data full type
>
> ```ts theme={null}
> {
>   lastCheckTimestamp?: string | null,
>   valueChangedTimestamp?: string | null,
>   raw?: string | null,
>   error?: string | null,
>   diff?: {
>     o?: number | null,
>     t?: string | null,
>     operation?: number | null,
>     text?: string | null
>   }[] | null
> } | null
> ```

> [accordion] notificationEndpoints full type
>
> ```ts theme={null}
> {
>   type?: string | number | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] proxies full type
>
> ```ts theme={null}
> {
>   location?: string | null
> }[] | null
> ```

> [accordion] urlFilter full type
>
> ```ts theme={null}
> {
>   include?: {
>     filter?: string | null,
>     type?: string | number | null
>   }[] | null,
>   exclude?: {
>     filter?: string | null,
>     type?: string | number | null
>   }[] | null
> } | null
> ```

***

### pages

`tasks.pages`

List the pages a Portal monitor is crawling

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.tasks.pages({ id: 'c0a1b2c3-1111-2222-3333-444455556666' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | A Portal monitor id. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   url?: string | null,
>   data?: {
>     lastCheckTimestamp?: string | null,
>     valueChangedTimestamp?: string | null,
>     raw?: string | null,
>     error?: string | null,
>     diff?: {
>       o?: number | null,
>       t?: string | null,
>       operation?: number | null,
>       text?: string | null
>     }[] | null
>   } | null
> }[]
> ```

***

### search

`tasks.search`

Search monitors by name, returning at most 500 and no paging

**Risk:** `read`

```ts theme={null}
await corsair.wachete.api.tasks.search({ query: 'docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | A word matched against monitor names and URLs. Whole words only: a hyphenated name is found by one of its words, not the full name. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   method?: string | null,
>   url?: string | null,
>   headers?: {
>     key?: string | null,
>     value?: string | null
>   }[] | null,
>   body?: string | null,
>   xPath?: string | null,
>   excludeXPath?: string | null,
>   regex?: string | null,
>   alerts?: {
>     type?: string | number | null,
>     value?: string | null,
>     parameters?: {
>       compare?: string | number | null,
>       value?: string | null
>     } | null
>   }[] | null,
>   recurrenceInSeconds?: number | null,
>   folderId?: string | null,
>   data?: {
>     lastCheckTimestamp?: string | null,
>     valueChangedTimestamp?: string | null,
>     raw?: string | null,
>     error?: string | null,
>     diff?: {
>       o?: number | null,
>       t?: string | null,
>       operation?: number | null,
>       text?: string | null
>     }[] | null
>   } | null,
>   notificationEndpoints?: {
>     type?: string | number | null,
>     value?: string | null
>   }[] | null,
>   proxies?: {
>     location?: string | null
>   }[] | null,
>   location?: string | number | null,
>   dynamicContent?: boolean | null,
>   scrollPage?: boolean | null,
>   ignoreInvalidPages?: boolean | null,
>   collectRawHtml?: boolean | null,
>   jobType?: string | number | null,
>   crawlingDepth?: number | null,
>   crawlBinaryContent?: boolean | null,
>   urlFilter?: {
>     include?: {
>       filter?: string | null,
>       type?: string | number | null
>     }[] | null,
>     exclude?: {
>       filter?: string | null,
>       type?: string | number | null
>     }[] | null
>   } | null,
>   crawlPagesFromAllDomains?: boolean | null,
>   note?: string | null
> }[]
> ```

***

### upsert

`tasks.upsert`

Create a monitor, or update one by sending its id; sets the URL, the part of the page watched, how often to check and who to notify

**Risk:** `write`

```ts theme={null}
await corsair.wachete.api.tasks.upsert({ name: 'My First Monitor', url: 'http://www.mypage.com', xPath: '/', recurrenceInSeconds: 86400, alerts: [{ type: 'Error' }, { type: 'NotEq' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Omit to create, send to update that monitor. |
| `name` | `string` | Yes | — |
| `url` | `string` | Yes | — |
| `xPath` | `string` | No | The part of the page to watch. `/` is the whole page. |
| `excludeXPath` | `string` | No | A part of the page to ignore, such as a timestamp. |
| `regex` | `string` | No | — |
| `method` | `string` | No | The HTTP method to fetch with. Defaults to GET. |
| `headers` | `object[]` | No | Request headers, as `{ key, value }` pairs. |
| `body` | `string` | No | Request body, for a POST monitor. |
| `alerts` | `object[]` | No | — |
| `recurrenceInSeconds` | `number` | Yes | How often to check, in seconds. 86400 is daily. |
| `folderId` | `string` | No | — |
| `notificationEndpoints` | `object[]` | No | Who to tell. An empty list uses the default email recipients; omit it to notify every endpoint on the account. |
| `proxies` | `object[]` | No | — |
| `location` | `us \| gb \| number` | No | The location to check from. The docs name us and gb. |
| `dynamicContent` | `boolean` | No | Set when the watched content is rendered by JavaScript. |
| `scrollPage` | `boolean` | No | — |
| `ignoreInvalidPages` | `boolean` | No | — |
| `collectRawHtml` | `boolean` | No | — |
| `jobType` | `SinglePage \| Portal \| number` | No | SinglePage watches one page; Portal crawls a site. Defaults to SinglePage. |
| `crawlingDepth` | `1 \| 2 \| 3` | No | Portal only: how deep to crawl, 1 to 3. Defaults to 2. |
| `crawlBinaryContent` | `boolean` | No | — |
| `urlFilter` | `object` | No | Portal only: which crawled URLs to keep or skip. |
| `crawlPagesFromAllDomains` | `boolean` | No | — |
| `note` | `string` | No | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string
> }[]
> ```

> [accordion] alerts full type
>
> ```ts theme={null}
> {
>   type: Error | Changed | NotEq | Eq | Contains | NotContains | StartsWith | EndsWith | Regex | Lower | Greater | Exists | NotExists | number,
>   value?: string | null,
>   parameters?: {
>     compare?: Error | Changed | NotEq | Eq | Contains | NotContains | StartsWith | EndsWith | Regex | Lower | Greater | Exists | NotExists | number | null,
>     value?: string | null
>   } | null
> }[]
> ```

> [accordion] notificationEndpoints full type
>
> ```ts theme={null}
> {
>   type: Email | Webhook | Sms | Slack | Teams | Telegram | Pushover | Discord | 0 | 1 | 4 | 8 | 16 | 32 | 64 | 92,
>   value: string
> }[]
> ```

> [accordion] proxies full type
>
> ```ts theme={null}
> {
>   location: string
> }[]
> ```

> [accordion] urlFilter full type
>
> ```ts theme={null}
> {
>   include?: {
>     filter: string,
>     type: Contains | Regex | number
>   }[] | null,
>   exclude?: {
>     filter: string,
>     type: Contains | Regex | number
>   }[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `method` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `headers` | `object[] \| null` | No | — |
| `body` | `string \| null` | No | — |
| `xPath` | `string \| null` | No | — |
| `excludeXPath` | `string \| null` | No | — |
| `regex` | `string \| null` | No | — |
| `alerts` | `object[] \| null` | No | — |
| `recurrenceInSeconds` | `number \| null` | No | — |
| `folderId` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |
| `notificationEndpoints` | `object[] \| null` | No | — |
| `proxies` | `object[] \| null` | No | — |
| `location` | `string \| number \| null` | No | — |
| `dynamicContent` | `boolean \| null` | No | — |
| `scrollPage` | `boolean \| null` | No | — |
| `ignoreInvalidPages` | `boolean \| null` | No | — |
| `collectRawHtml` | `boolean \| null` | No | — |
| `jobType` | `string \| number \| null` | No | — |
| `crawlingDepth` | `number \| null` | No | — |
| `crawlBinaryContent` | `boolean \| null` | No | — |
| `urlFilter` | `object \| null` | No | — |
| `crawlPagesFromAllDomains` | `boolean \| null` | No | — |
| `note` | `string \| null` | No | — |

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] alerts full type
>
> ```ts theme={null}
> {
>   type?: string | number | null,
>   value?: string | null,
>   parameters?: {
>     compare?: string | number | null,
>     value?: string | null
>   } | null
> }[] | null
> ```

> [accordion] data full type
>
> ```ts theme={null}
> {
>   lastCheckTimestamp?: string | null,
>   valueChangedTimestamp?: string | null,
>   raw?: string | null,
>   error?: string | null,
>   diff?: {
>     o?: number | null,
>     t?: string | null,
>     operation?: number | null,
>     text?: string | null
>   }[] | null
> } | null
> ```

> [accordion] notificationEndpoints full type
>
> ```ts theme={null}
> {
>   type?: string | number | null,
>   value?: string | null
> }[] | null
> ```

> [accordion] proxies full type
>
> ```ts theme={null}
> {
>   location?: string | null
> }[] | null
> ```

> [accordion] urlFilter full type
>
> ```ts theme={null}
> {
>   include?: {
>     filter?: string | null,
>     type?: string | number | null
>   }[] | null,
>   exclude?: {
>     filter?: string | null,
>     type?: string | number | null
>   }[] | null
> } | null
> ```

***


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