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

Every `bubble.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).

## Meta

### getSwagger

`meta.getSwagger`

Retrieve the auto-generated Swagger 2.0 JSON for enabled Bubble APIs

**Risk:** `read`

```ts theme={null}
await corsair.bubble.api.meta.getSwagger({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

## Things

### bulkCreate

`things.bulkCreate`

Create up to 1,000 things in one request, returning per-record results

**Risk:** `write`

```ts theme={null}
await corsair.bubble.api.things.bulkCreate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `records` | `any[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | Yes | — |
| `items` | `object[]` | Yes | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   status: string,
>   id?: string,
>   message?: string
> }[]
> ```

***

### create

`things.create`

Create a single thing with the supplied field values

**Risk:** `write`

```ts theme={null}
await corsair.bubble.api.things.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `fields` | `any` | Yes | — |

**Output**

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

***

### delete

`things.delete`

Permanently delete a thing by its unique ID

**Risk:** `destructive`

```ts theme={null}
await corsair.bubble.api.things.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `thingId` | `string` | Yes | — |

**Output:** `void`

***

### get

`things.get`

Retrieve a single thing by its unique ID

**Risk:** `read`

```ts theme={null}
await corsair.bubble.api.things.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `thingId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `_id` | `string` | Yes | — |
| `Created By` | `string` | No | — |
| `Created Date` | `string` | No | — |
| `Modified Date` | `string` | No | — |

***

### list

`things.list`

Search and paginate things of a data type, with optional constraints and sorting

**Risk:** `read`

```ts theme={null}
await corsair.bubble.api.things.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `cursor` | `number` | No | — |
| `limit` | `number` | No | — |
| `constraints` | `object[]` | No | — |
| `sortField` | `string` | No | — |
| `descending` | `boolean` | No | — |
| `excludeRemaining` | `boolean` | No | — |
| `additionalSortFields` | `object[]` | No | — |

> [accordion] constraints full type
>
> ```ts theme={null}
> {
>   key: string,
>   constraint_type: string,
>   value?: string | number | boolean | JsonValue
> }[]
> ```

> [accordion] additionalSortFields full type
>
> ```ts theme={null}
> {
>   sortField: string,
>   descending?: boolean
> }[]
> ```

**Output**

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

> [accordion] response full type
>
> ```ts theme={null}
> {
>   cursor: number,
>   count: number,
>   remaining?: number,
>   results: {
>     _id: string,
>     Created By?: string,
>     Created Date?: string,
>     Modified Date?: string
>   }[]
> }
> ```

***

### replace

`things.replace`

Overwrite all editable fields of an existing thing (omitted fields reset to default)

**Risk:** `write`

```ts theme={null}
await corsair.bubble.api.things.replace({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `thingId` | `string` | Yes | — |
| `fields` | `any` | Yes | — |

**Output:** `void`

***

### update

`things.update`

Change selected fields of an existing thing

**Risk:** `write`

```ts theme={null}
await corsair.bubble.api.things.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `typeName` | `string` | Yes | — |
| `thingId` | `string` | Yes | — |
| `fields` | `any` | Yes | — |

**Output:** `void`

***

## Workflows

### run

`workflows.run`

Run an API workflow with the supplied parameters (Workflow API POST)

**Risk:** `write`

```ts theme={null}
await corsair.bubble.api.workflows.run({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflowName` | `string` | Yes | — |
| `params` | `Record<string, JsonValue>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | — |

***

### runGet

`workflows.runGet`

Run an API workflow with query-string parameters (Workflow API GET)

**Risk:** `write`

```ts theme={null}
await corsair.bubble.api.workflows.runGet({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflowName` | `string` | Yes | — |
| `params` | `Record<string, string \| number \| boolean>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | — |

***


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