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

# Slite API reference

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

## Account

### me

`account.me`

The user the API key belongs to and their workspace.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.account.me({});
```

**Input:** *empty object*

GET /me

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string \| null` | No | Email address of the authenticated user. |
| `organizationDomain` | `string \| null` | No | Domain of the organization the authenticated user belongs to. |
| `organizationName` | `string \| null` | No | Name of the organization the authenticated user belongs to. |
| `displayName` | `string \| null` | No | Display name of the authenticated user. |

***

## Ask

### deleteContent

`ask.deleteContent`

Delete a custom content from AskX usage.

**Risk:** `destructive`

```ts theme={null}
await corsair.slite.api.ask.deleteContent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rootId` | `string` | Yes | Root id of the object to gather sources from. This should be created from the UI as a new custom data source. |
| `id` | `string` | Yes | Unique id of the object to index scoped to the rootId |

DELETE /ask/index

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ok` | `boolean \| null` | No | — |

***

### getThread

`ask.getThread`

Read an ask/agent thread back as question / answer rounds. This is both the poll endpoint for a `processing` answer (`GET /ask` returns the `threadId` to poll) and a general way to read a past conversation: it returns every round's question and answer, without the intermediate events. While the run is still working the response is `202` with `status: "processing"` — poll again after \`retryAfter...

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.ask.getThread({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `threadId` | `string` | Yes | The thread id — from a `processing` response, or any thread of yours. |

GET /threads/\{threadId}

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `threadId` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `rounds` | `object[] \| null` | No | Question / answer pairs, oldest first. |
| `retryAfterSeconds` | `number \| null` | No | Set while `processing` — suggested seconds before polling again. |
| `message` | `string \| null` | No | Human-readable hint about the current state. |
| `triageUrl` | `string \| null` | No | needs-approval: where a human reviews the drafted changes. |
| `pendingApprovalCount` | `number \| null` | No | — |

> [accordion] rounds full type
>
> ```ts theme={null}
> {
>   question?: string | null,
>   answer?: string | null,
>   sources?: {
>     id?: string | null,
>     title?: string | null,
>     url?: string | null,
>     updatedAt?: string | null,
>     explanation?: string | null
>   }[] | null
> }[] | null
> ```

***

### indexContent

`ask.indexContent`

Add or replace a custom document (markdown or HTML) that ask.question can answer from, under a root id you choose.

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.ask.indexContent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rootId` | `string` | Yes | Root id of the object to gather sources from. This should be created from the UI as a new custom data source. |
| `id` | `string` | Yes | Unique id of the object to index scoped to the rootId |
| `title` | `string` | Yes | Title of the object to index |
| `content` | `string` | Yes | Content of the object to index |
| `type` | `markdown \| html` | Yes | Type of the object to index. Can be "markdown" or "html" |
| `updatedAt` | `string` | Yes | Last update date of the object to index. Used to determine the freshness of the object. |
| `url` | `string` | Yes | Url of the object to index. Used to redirect to the proper page. |

POST /ask/index

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `explanation` | `string \| null` | No | For super, gives explanation about the source |
| `updatedAt` | `string \| null` | No | Date of the last update of the note |
| `url` | `string \| null` | No | Url of the note |
| `title` | `string \| null` | No | Title of the note |
| `id` | `string \| null` | No | Id of the note |

***

### listContent

`ask.listContent`

List custom content ids from AskX usage.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.ask.listContent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rootId` | `string` | Yes | Root id of the object to gather sources from. This should be created from the UI as a new custom data source. |
| `page` | `number` | No | Used to perform pagination on search |
| `hitsPerPage` | `number` | No | Specify how many notes to return per page |

GET /ask/index

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hits` | `object[] \| null` | No | — |
| `nbPages` | `number \| null` | No | Total number of pages for the current query |
| `page` | `number \| null` | No | Current page number of the search pagination |

> [accordion] hits full type
>
> ```ts theme={null}
> {
>   explanation?: string | null,
>   updatedAt?: string | null,
>   url?: string | null,
>   title?: string | null,
>   id?: string | null
> }[] | null
> ```

***

### question

`ask.question`

Ask a question in natural language; Slite answers from the notes the key's user can see, with sources. With wait=false a long answer returns a threadId to poll with ask.getThread. Uses the workspace's AI quota.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.ask.question({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `question` | `string` | Yes | Question to ask on your notes |
| `parentNoteId` | `string` | No | Optional filter to only return notes under this parent note id |
| `assistantId` | `string` | No | Optional filter to use a specific assistant for super only |
| `wait` | `boolean` | No | Wait for the full answer even when it takes long, instead of receiving a 202 `processing` response to poll via GET /threads/\{threadId}. Your HTTP client's own timeout must allow several minutes. |

GET /ask

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   sources?: {
>     explanation?: string | null,
>     updatedAt?: string | null,
>     url?: string | null,
>     title?: string | null,
>     id?: string | null
>   }[] | null,
>   answer?: string | null
> } | {
>   message?: string | null,
>   retryAfterSeconds?: number | null,
>   threadId?: string | null,
>   status?: string | null
> }& {
>   sources?: {
>     url?: string | null,
>     title?: string | null,
>     id?: string | null
>   }[] | null,
>   answer?: string | null
> }
> ```

***

## Change Requests

### create

`changeRequests.create`

Open a change request: an agent reads the docs you name, turns your command into proposed changes, and leaves them for review. Nothing is applied until a reviewer approves it in Slite. The response comes back as soon as the request is queued, with `status: "processing"` and the `url` to hand to the reviewers. **Beta:** change requests are not yet available to every workspace. Where they are not...

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.changeRequests.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `command` | `string` | Yes | What to change, in plain words — or the exact content to write, in markdown or sliteml, which the agent reproduces verbatim. |
| `editableNoteIds` | `string[]` | Yes | The docs the request may change or add sub-docs under. You must be able to edit each of them. |
| `sourceRoots` | `object[]` | No | Where the agent may search. Without roots it does not search at all and works from the command and the editable docs only. |
| `audienceUserIds` | `string[]` | No | Who reviews the request besides you. Each of them must be able to read every editable doc and every doc root. |
| `assigneeUserId` | `string` | No | Who the request is assigned to: you or a member of the audience who can edit every editable doc. Defaults to you; required when your account cannot review change requests, such as a service account. |
| `title` | `string` | No | The request's title until the agent names it. |

POST /change-requests

> [accordion] sourceRoots full type
>
> ```ts theme={null}
> {
>   kind: note | root | sourceType,
>   value: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   changes?: {
>     resolvedAt?: string | null | null,
>     outcome?: string | null,
>     isCreate?: boolean | null,
>     noteUrl?: string | null | null,
>     noteId?: string | null | null
>   }[] | null,
>   createdAt?: string | null,
>   audienceUserIds?: string[] | null,
>   assigneeUserId?: string | null | null,
>   threadId?: string | null | null,
>   url?: string | null,
>   status?: string | null,
>   id?: string | null
> }& {
>   retryAfterSeconds?: number | null
> }
> ```

***

### get

`changeRequests.get`

Read a change request you opened or review. While the agent is still working the response is `202` with `status: "processing"` — check again after `retryAfterSeconds` / the `Retry-After` header. `status: "completed"` means no change waits for review, whether the reviewers approved or rejected them. To learn what they decided, read `changes`: one entry per proposed change, with its `outcome` and...

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.changeRequests.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `changeRequestId` | `string` | Yes | The change request id, as `id` in the response that opened it. |

GET /change-requests/\{changeRequestId}

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   changes?: {
>     resolvedAt?: string | null | null,
>     outcome?: string | null,
>     isCreate?: boolean | null,
>     noteUrl?: string | null | null,
>     noteId?: string | null | null
>   }[] | null,
>   createdAt?: string | null,
>   audienceUserIds?: string[] | null,
>   assigneeUserId?: string | null | null,
>   threadId?: string | null | null,
>   url?: string | null,
>   status?: string | null,
>   id?: string | null
> }& {
>   retryAfterSeconds?: number | null
> }
> ```

***

## Groups

### get

`groups.get`

Get a group by ID

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.groups.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `groupId` | `string` | Yes | Group ID to retrieve |

GET /groups/\{groupId}

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string \| null` | No | Description of the group |
| `name` | `string \| null` | No | Group name |
| `id` | `string \| null` | No | Group ID |

***

### search

`groups.search`

Search for groups by name

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.groups.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | Search query to match against name |
| `cursor` | `string` | No | Cursor to use to continue fetching groups |

GET /groups

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextCursor` | `string \| null \| null` | No | Cursor for the next page |
| `hasNextPage` | `boolean \| null` | No | Whether there are more results |
| `total` | `number \| null` | No | Total count of groups matching the query |
| `groups` | `object[] \| null` | No | List of groups |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name?: string | null,
>   id?: string | null
> }[] | null
> ```

***

## Knowledge Management

### emptyNotes

`knowledgeManagement.emptyNotes`

List empty notes for knowledge management.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.knowledgeManagement.emptyNotes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ownerIdList` | `string[]` | No | Optional: user or group ids to filter notes by owner |
| `channelIdList` | `string[]` | No | Optional: channel ids to filter notes by channel |
| `first` | `number` | No | Maximum number of notes to return. Defaults to 20. |
| `cursor` | `string` | No | Cursor to use to continue fetching notes |

GET /knowledge-management/notes/empty

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of children |
| `hasNextPage` | `boolean \| null` | No | Is there any other page to fetch |
| `nextCursor` | `string \| null \| null` | No | Next cursor to continue fetching the paginate children |

> [accordion] notes full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

### inactiveNotes

`knowledgeManagement.inactiveNotes`

List inactive notes for knowledge management.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.knowledgeManagement.inactiveNotes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ownerIdList` | `string[]` | No | Optional: user or group ids to filter notes by owner |
| `channelIdList` | `string[]` | No | Optional: channel ids to filter notes by channel |
| `first` | `number` | No | Maximum number of notes to return. Defaults to 20. |
| `cursor` | `string` | No | Cursor to use to continue fetching notes |

GET /knowledge-management/notes/inactive

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of children |
| `hasNextPage` | `boolean \| null` | No | Is there any other page to fetch |
| `nextCursor` | `string \| null \| null` | No | Next cursor to continue fetching the paginate children |

> [accordion] notes full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

### notes

`knowledgeManagement.notes`

List notes for knowledge management.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.knowledgeManagement.notes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewStateList` | `(Verified \| Outdated \| VerificationRequested \| VerificationExpired)[]` | No | Optional filter to only return notes in special review states. |
| `ownerIdList` | `string[]` | No | Optional: user or group ids to filter notes by owner |
| `channelIdList` | `string[]` | No | Optional: channel ids to filter notes by channel |
| `sinceDaysAgo` | `number` | No | Optional: number of trailing days to consider |
| `first` | `number` | No | Maximum number of notes to return. Defaults to 20. |
| `cursor` | `string` | No | Cursor to use to continue fetching notes |

GET /knowledge-management/notes

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of children |
| `hasNextPage` | `boolean \| null` | No | Is there any other page to fetch |
| `nextCursor` | `string \| null \| null` | No | Next cursor to continue fetching the paginate children |

> [accordion] notes full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

### publicNotes

`knowledgeManagement.publicNotes`

List public notes for knowledge management.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.knowledgeManagement.publicNotes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewStateList` | `(Verified \| Outdated \| VerificationRequested \| VerificationExpired)[]` | No | Optional filter to only return notes in special review states. |
| `ownerIdList` | `string[]` | No | Optional: user or group ids to filter notes by owner |
| `channelIdList` | `string[]` | No | Optional: channel ids to filter notes by channel |
| `sinceDaysAgo` | `number` | No | Optional: number of trailing days to consider |
| `first` | `number` | No | Maximum number of notes to return. Defaults to 20. |
| `cursor` | `string` | No | Cursor to use to continue fetching notes |

GET /knowledge-management/notes/public

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of children |
| `hasNextPage` | `boolean \| null` | No | Is there any other page to fetch |
| `nextCursor` | `string \| null \| null` | No | Next cursor to continue fetching the paginate children |

> [accordion] notes full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

## Notes

### archive

`notes.archive`

Update the archived state of a note

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.archive({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to update |
| `archived` | `boolean` | Yes | Set to true to archive the note, false to unarchive it |

PUT /notes/\{noteId}/archived

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   owner?: {
>     groupId?: string | null,
>     userId?: string | null
>   } | null,
>   reviewState?: string | null,
>   archivedAt?: string | null | null,
>   lastEditedAt?: string | null,
>   updatedAt?: string | null,
>   createdAt?: string | null,
>   columns?: string[] | null,
>   attributes?: (string | null)[] | null,
>   url?: string | null,
>   listPosition?: number | null | null,
>   parentNoteId?: string | null | null,
>   iconColor?: string | null | null,
>   iconShape?: string | null | null,
>   title?: string | null,
>   id?: string | null
> }& {
>   tags?: {
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   systemTags?: string[] | null
> }
> ```

***

### children

`notes.children`

Return note children by parent note id

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.notes.children({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to fetch its children |
| `cursor` | `string` | No | Cursor to use to continue fetching the note children It's only used if current note has more than 50 children |
| `orderBy` | `title \| listPosition \| lastEditedAt` | No | Optional: field to order the children by. Defaults to `title`. |
| `orderDirection` | `asc \| desc` | No | Optional: sort direction (`asc` or `desc`). Defaults to `asc`. Use `orderBy=listPosition&orderDirection=desc` to match the sidebar order. |
| `includeDescendants` | `boolean` | No | Optional: when true, returns the whole subtree (flattened) instead of only direct children. Rebuild the hierarchy with each note's `parentNoteId`. Defaults to false. |

GET /notes/\{noteId}/children

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of children |
| `hasNextPage` | `boolean \| null` | No | Is there any other page to fetch |
| `nextCursor` | `string \| null \| null` | No | Next cursor to continue fetching the paginate children |

> [accordion] notes full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

### create

`notes.create`

Create a note from markdown, html, or sliteml content, with a templateId or just an empty one. If no parentNoteId is specified, it will be created in your personal channel.

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `title` | `string` | Yes | Title of the note to create |
| `parentNoteId` | `string` | No | Below which other note to create this note. If not specified, the note would be created in your personal channel |
| `templateId` | `string` | No | If you want to apply a template to the created note |
| `markdown` | `string` | No | Either provide Markdown content to fill the note |
| `html` | `string` | No | Or you can provide HTML content |
| `attributes` | `(string \| null)[]` | No | Attributes for the parent collection, one per column in column order; null leaves a column unchanged and an empty string clears it. A value its column can't read, like "forty-two" for a number, an ambiguous "3/4/2026" for a date (pass YYYY-MM-DD) or "2,000" for a number (pass 2000 or 2.5), fails ... |
| `sliteml` | `string` | No | Or provide sliteml content — Slite's rich-text format, the only format that preserves every block type losslessly. Accepts both the compact serialization and the full-tag XML returned by `GET /notes/{noteId}?format=sliteml`. |
| `listPosition` | `number \| top \| bottom` | No | Where to place the note among its siblings in the sidebar: 'top', 'bottom', or an explicit positive position number. If omitted, the position is seeded from the creation date, which puts new docs at the top unless a sibling was manually moved above. |

POST /notes

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   owner?: {
>     groupId?: string | null,
>     userId?: string | null
>   } | null,
>   reviewState?: string | null,
>   archivedAt?: string | null | null,
>   lastEditedAt?: string | null,
>   updatedAt?: string | null,
>   createdAt?: string | null,
>   columns?: string[] | null,
>   attributes?: (string | null)[] | null,
>   url?: string | null,
>   listPosition?: number | null | null,
>   parentNoteId?: string | null | null,
>   iconColor?: string | null | null,
>   iconShape?: string | null | null,
>   title?: string | null,
>   id?: string | null
> }& {
>   tags?: {
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   systemTags?: string[] | null
> }
> ```

***

### delete

`notes.delete`

Delete a note and all its child notes. Cannot be undone.

**Risk:** `destructive`

```ts theme={null}
await corsair.slite.api.notes.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to delete |

DELETE /notes/\{noteId}

**Output:** `any`

***

### flagOutdated

`notes.flagOutdated`

Set Outdated status on a note with optional reason

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.flagOutdated({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to update |
| `reason` | `string` | Yes | Outdated reason |

PUT /notes/\{noteId}/flag-as-outdated

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   owner?: {
>     groupId?: string | null,
>     userId?: string | null
>   } | null,
>   reviewState?: string | null,
>   archivedAt?: string | null | null,
>   lastEditedAt?: string | null,
>   updatedAt?: string | null,
>   createdAt?: string | null,
>   columns?: string[] | null,
>   attributes?: (string | null)[] | null,
>   url?: string | null,
>   listPosition?: number | null | null,
>   parentNoteId?: string | null | null,
>   iconColor?: string | null | null,
>   iconShape?: string | null | null,
>   title?: string | null,
>   id?: string | null
> }& {
>   tags?: {
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   systemTags?: string[] | null
> }
> ```

***

### get

`notes.get`

Get a note with its content as Markdown, HTML or SliteML.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.notes.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to return |
| `format` | `md \| html \| sliteml` | No | Format of the content to return (Markdown, Html, or SliteML) |
| `css` | `inline \| none` | No | For `html` format only: whether to inline the Slite stylesheet (`inline`, default) or omit it so you supply your own CSS (`none`, much smaller payload). Ignored for other formats. |
| `compact` | `boolean` | No | For `sliteml` format only: when `true`, returns the compact serialization (standard markdown for common blocks, XML only for rich Slite blocks) instead of the verbose full-tag XML. Smaller payload, recommended for new integrations, and accepted as-is by the write endpoints. Ignored for other form... |

GET /notes/\{noteId}

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )& {
>   content?: string | null
> }
> ```

***

### list

`notes.list`

List notes, optionally by owner or parent, 50 at a time with a cursor.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.notes.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ownerId` | `string` | No | Optional: User id to filter notes by owner |
| `parentNoteId` | `string` | No | Optional: filter to only return notes under this parent note id |
| `orderBy` | `lastEditedAt_DESC \| lastEditedAt_ASC \| listPosition_DESC \| listPosition_ASC` | No | Optional: To change the order of the returned notes |
| `cursor` | `string` | No | Cursor to use to continue fetching notes |

GET /notes

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `notes` | `object[] \| null` | No | — |
| `total` | `number \| null` | No | Total number of children |
| `hasNextPage` | `boolean \| null` | No | Is there any other page to fetch |
| `nextCursor` | `string \| null \| null` | No | Next cursor to continue fetching the paginate children |

> [accordion] notes full type
>
> ```ts theme={null}
> (
>   {
>     owner?: {
>       groupId?: string | null,
>       userId?: string | null
>     } | null,
>     reviewState?: string | null,
>     archivedAt?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     createdAt?: string | null,
>     columns?: string[] | null,
>     attributes?: (string | null)[] | null,
>     url?: string | null,
>     listPosition?: number | null | null,
>     parentNoteId?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

### owner

`notes.owner`

Update the owner of a note, it can be a user or a group

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.owner({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to update |
| `userId` | `string` | No | User id to set as the owner of the note |
| `groupId` | `string` | No | Group id to set as the owner of the note |

PUT /notes/\{noteId}/owner

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   owner?: {
>     groupId?: string | null,
>     userId?: string | null
>   } | null,
>   reviewState?: string | null,
>   archivedAt?: string | null | null,
>   lastEditedAt?: string | null,
>   updatedAt?: string | null,
>   createdAt?: string | null,
>   columns?: string[] | null,
>   attributes?: (string | null)[] | null,
>   url?: string | null,
>   listPosition?: number | null | null,
>   parentNoteId?: string | null | null,
>   iconColor?: string | null | null,
>   iconShape?: string | null | null,
>   title?: string | null,
>   id?: string | null
> }& {
>   tags?: {
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   systemTags?: string[] | null
> }
> ```

***

### search

`notes.search`

Search notes based on a query. The scope of the notes is restricted to the authenticated user. Various optional filters are available to restrict the scope of the search even more.

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.notes.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | No | Query used to perform the note search, default to empty string |
| `parentNoteId` | `string` | No | Optional filter to only return notes under this parent note id |
| `depth` | `number` | No | Optional filter to only return notes with a depth (number of parents) equal to a specified value |
| `reviewState` | `Verified \| Outdated \| VerificationRequested \| VerificationExpired` | No | Optional filter to return notes in a special review state Can be Verified, Outdated, VerificationRequested or VerificationExpired |
| `page` | `number` | No | Used to perform pagination on search |
| `hitsPerPage` | `number` | No | Specify how many notes to return per page |
| `highlightPreTag` | `string` | No | Inject a tag before the matching query |
| `highlightPostTag` | `string` | No | Inject a tag after the matching query |
| `lastEditedAfter` | `string` | No | Optional filter to only return notes edited after a specific date, as ISO 8601 |
| `lastUpdatedAfter` | `string` | No | Optional filter to only return notes where metadata has changed after a specific date, as ISO 8601 |
| `includeArchived` | `boolean` | No | Optional filter to also include archived notes in the search results (default to false) |
| `tagIdList` | `string[]` | No | Optional filter to only return notes carrying one of these workspace tags, by id from `GET /tags`. Refused with a 403 (`tags/not-enabled`) while the workspace has tags turned off. |
| `systemTagList` | `string[]` | No | Optional filter to only return notes carrying one of these Slite's own tags, such as `canonical` or `draft`. Refused with a 403 while the workspace has tags turned off (`tags/not-enabled`) or AI turned off (`tags/ai-disabled`). |

GET /search-notes

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hits` | `object[] \| null` | No | — |
| `nbPages` | `number \| null` | No | Total number of pages for the current query |
| `page` | `number \| null` | No | Current page number of the search pagination |

> [accordion] hits full type
>
> ```ts theme={null}
> (
>   {
>     parentNotes?: {
>       title?: string | null,
>       id?: string | null
>     }[] | null,
>     reviewState?: string | null,
>     highlight?: string | null,
>     type?: string | null,
>     archivedAt?: string | null | null,
>     iconColor?: string | null | null,
>     iconShape?: string | null | null,
>     lastEditedAt?: string | null,
>     updatedAt?: string | null,
>     title?: string | null,
>     id?: string | null
>   }& {
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     systemTags?: string[] | null
>   }
> )[] | null
> ```

***

### tile

`notes.tile`

Update or create tile. A tile is rendered with a structured header and a markdown content. You can create a tile by copying a tile id from Slite by clicking on `Copy block id` on an empty line setting in the editor.

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.tile({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id containing the tile id |
| `tileId` | `string` | Yes | Tile id to update |
| `title` | `string \| null` | No | Title of the tile |
| `iconURL` | `string \| null` | No | Icon URL to show in the tile |
| `status` | `object \| null` | No | If needed a tile status can be specified with its color |
| `url` | `string \| null` | No | The tile can be linked to an external URL |
| `content` | `string \| null` | No | The content of the tile. Can be in markdown. |

PUT /notes/\{noteId}/tiles/\{tileId}

> [accordion] status full type
>
> ```ts theme={null}
> {
>   colorHex?: string | null,
>   label: string
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string \| null` | No | Direct url of the tile in the note |

***

### update

`notes.update`

Update note content with markdown, html, or sliteml, its title, and/or its tags

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to update |
| `title` | `string` | No | Title of the note to update |
| `markdown` | `string` | No | New markdown content to fill the note |
| `html` | `string` | No | New html content to fill the note |
| `attributes` | `(string \| null)[]` | No | Attributes for the parent collection, one per column in column order; null leaves a column unchanged and an empty string clears it. A value its column can't read, like "forty-two" for a number, an ambiguous "3/4/2026" for a date (pass YYYY-MM-DD) or "2,000" for a number (pass 2000 or 2.5), fails ... |
| `sliteml` | `string` | No | New sliteml content to fill the note — Slite's rich-text format, the only format that preserves every block type losslessly. Accepts both the compact serialization and the full-tag XML returned by `GET /notes/{noteId}?format=sliteml`. |
| `listPosition` | `number \| top \| bottom` | No | New position of the note among its siblings in the sidebar: 'top', 'bottom', or an explicit positive position number (higher values come first — use the midpoint of two siblings' listPosition values to insert between them). |
| `addTagIds` | `string[]` | No | Ids of the workspace's tags to add to the note, from `GET /tags`. An id that is not one of the workspace's tags refuses the whole update with a 422 (`tags/unknown-tags`). |
| `removeTagIds` | `string[]` | No | Ids of the workspace's tags to remove from the note, refused like `addTagIds`. Slite does not add a tag back to a note it was removed from. |
| `addSystemTags` | `string[]` | No | Slite's own tags to set on the note: `draft` for a work in progress, `canonical` for a note meant to stay true, like a process or a policy. Refused with a 403 (`tags/ai-disabled`) while the workspace has AI turned off. |
| `removeSystemTags` | `string[]` | No | Slite's own tags to remove from the note, such as `draft`, refused like `addSystemTags`. Slite does not set them back on the note. |

PUT /notes/\{noteId}

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   owner?: {
>     groupId?: string | null,
>     userId?: string | null
>   } | null,
>   reviewState?: string | null,
>   archivedAt?: string | null | null,
>   lastEditedAt?: string | null,
>   updatedAt?: string | null,
>   createdAt?: string | null,
>   columns?: string[] | null,
>   attributes?: (string | null)[] | null,
>   url?: string | null,
>   listPosition?: number | null | null,
>   parentNoteId?: string | null | null,
>   iconColor?: string | null | null,
>   iconShape?: string | null | null,
>   title?: string | null,
>   id?: string | null
> }& {
>   tags?: {
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   systemTags?: string[] | null
> }
> ```

***

### verify

`notes.verify`

Set Verified status on a note with optional verification expiration

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.notes.verify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `noteId` | `string` | Yes | Note id to update |
| `until` | `string \| null` | Yes | Expiration of the verification status (set null for no expiration) |

PUT /notes/\{noteId}/verify

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   owner?: {
>     groupId?: string | null,
>     userId?: string | null
>   } | null,
>   reviewState?: string | null,
>   archivedAt?: string | null | null,
>   lastEditedAt?: string | null,
>   updatedAt?: string | null,
>   createdAt?: string | null,
>   columns?: string[] | null,
>   attributes?: (string | null)[] | null,
>   url?: string | null,
>   listPosition?: number | null | null,
>   parentNoteId?: string | null | null,
>   iconColor?: string | null | null,
>   iconShape?: string | null | null,
>   title?: string | null,
>   id?: string | null
> }& {
>   tags?: {
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   systemTags?: string[] | null
> }
> ```

***

## Tags

### create

`tags.create`

Create a tag in the workspace. Members can, unless an admin allowed only admins to.

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.tags.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Name of the tag, which no other tag of the workspace has, whatever its case |
| `color` | `string` | Yes | Color the app shows the tag in |
| `description` | `string` | No | What belongs under the tag. Slite reads it to set the tag on docs itself. |

POST /tags

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `isAutomatic` | `boolean \| null` | No | False when Slite never sets the tag itself: only people do |
| `color` | `string \| null` | No | The color the app shows the tag in: turquoise, green, yellow, orange, red, pink, purple or blue. Keep a color you don't know. |
| `description` | `string \| null \| null` | No | What belongs under the tag, for people, agents and Slite's classification |
| `name` | `string \| null` | No | — |
| `id` | `string \| null` | No | — |

***

### delete

`tags.delete`

Delete a tag; it is removed from every note.

**Risk:** `destructive`

```ts theme={null}
await corsair.slite.api.tags.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tagId` | `string` | Yes | Tag id to delete |

DELETE /tags/\{tagId}

**Output:** `any`

***

### list

`tags.list`

List the workspace's tags

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.tags.list({});
```

**Input:** *empty object*

GET /tags

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | The workspace's tags, by name |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   isAutomatic?: boolean | null,
>   color?: string | null,
>   description?: string | null | null,
>   name?: string | null,
>   id?: string | null
> }[] | null
> ```

***

### merge

`tags.merge`

Merge tags into one: notes get the target tag and the merged tags are deleted.

**Risk:** `destructive`

```ts theme={null}
await corsair.slite.api.tags.merge({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tagIds` | `string[]` | Yes | Ids of the tags to merge, deleted once their docs carry `intoTagId` |
| `intoTagId` | `string` | Yes | Id of the tag to merge them into |

POST /tags/merge

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `deletedTagIds` | `string[] \| null` | No | The merged tags, now deleted |
| `tag` | `object \| null` | No | The tag the others were merged into |

> [accordion] tag full type
>
> ```ts theme={null}
> {
>   isAutomatic?: boolean | null,
>   color?: string | null,
>   description?: string | null | null,
>   name?: string | null,
>   id?: string | null
> } | null
> ```

***

### update

`tags.update`

Update a tag. Members can, unless an admin allowed only admins to.

**Risk:** `write`

```ts theme={null}
await corsair.slite.api.tags.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tagId` | `string` | Yes | Tag id to update |
| `name` | `string` | No | New name of the tag |
| `description` | `string \| null` | No | New description of the tag, null to remove it. Slite reads it to set the tag on docs itself. |
| `color` | `string` | No | New color of the tag |
| `isAutomatic` | `boolean` | No | False to keep Slite from setting the tag itself: the docs it gave the tag lose it, unless someone set it on them too |

PUT /tags/\{tagId}

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `isAutomatic` | `boolean \| null` | No | False when Slite never sets the tag itself: only people do |
| `color` | `string \| null` | No | The color the app shows the tag in: turquoise, green, yellow, orange, red, pink, purple or blue. Keep a color you don't know. |
| `description` | `string \| null \| null` | No | What belongs under the tag, for people, agents and Slite's classification |
| `name` | `string \| null` | No | — |
| `id` | `string \| null` | No | — |

***

## Users

### get

`users.get`

Get a user by ID

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.users.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `userId` | `string` | Yes | User ID to retrieve |

GET /users/\{userId}

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `organizationRole` | `string \| null` | No | Role of the user in the organization |
| `isGuest` | `boolean \| null` | No | Whether the user is a guest |
| `archivedAt` | `string \| null \| null` | No | Whether the user is archived |
| `displayName` | `string \| null` | No | Display name of the user |
| `email` | `string \| null` | No | Email address of the user |
| `id` | `string \| null` | No | User ID |

***

### search

`users.search`

Search for users by email, name, or username

**Risk:** `read`

```ts theme={null}
await corsair.slite.api.users.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | Search query to match against email, display name |
| `includeArchived` | `boolean` | No | Include archived users in the search results |
| `cursor` | `string` | No | Cursor to use to continue fetching users |

GET /users

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextCursor` | `string \| null \| null` | No | Cursor for the next page |
| `hasNextPage` | `boolean \| null` | No | Whether there are more results |
| `total` | `number \| null` | No | Total count of users matching the query |
| `users` | `object[] \| null` | No | List of users |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   organizationRole?: string | null,
>   isGuest?: boolean | null,
>   archivedAt?: string | null | null,
>   displayName?: string | null,
>   email?: string | null,
>   id?: string | null
> }[] | null
> ```

***


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