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

# Maritime API reference

> API reference for the Maritime plugin in Corsair: every `maritime.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

### delete

`account.delete`

Delete the whole Maritime account with every agent, machine and key (irreversible)

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

```ts theme={null}
await corsair.maritime.api.account.delete({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### limits

`account.limits`

Get the plan, machine counts and caps, and the size limits of one agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.account.limits({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `plan` | `string \| null` | No | — |
| `billingModel` | `string \| null` | No | — |
| `includedMachines` | `number \| null \| null` | No | — |
| `machines` | `number \| null` | No | — |
| `maxAwakeMachines` | `number \| null \| null` | No | — |
| `awakeMachines` | `number \| null` | No | — |
| `minMemMb` | `number \| null` | No | — |
| `maxMemMb` | `number \| null` | No | — |
| `maxDiskGb` | `number \| null` | No | — |
| `agentCreatesPerMinute` | `number \| null` | No | — |
| `agentDuplicatesPerMinute` | `number \| null` | No | — |

***

## Activity

### list

`activity.list`

Get what happened across the account's agents and computers (creates, boots, starts, sleeps, wakes, takeovers, deletes, errors, triggers), newest first

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `type` | `(lifecycle \| error \| trigger_fired)[]` | No | Only these types (repeat for several). Default: all three. |
| `before` | `string` | No | Only entries strictly older than this ISO timestamp (pagination cursor). |
| `since` | `string` | No | Only entries at or after this ISO timestamp. |
| `until` | `string` | No | Only entries at or before this ISO timestamp. |
| `agent_id` | `string` | No | Only the events of this agent or computer. |
| `external_id` | `string` | No | Only the events of the machines of this end user (the external id). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `events` | `object[] \| null` | No | — |
| `nextBefore` | `string \| null \| null` | No | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp?: string | null,
>   type?: string | null,
>   success?: boolean | null,
>   triggerType?: string | null | null,
>   toolName?: string | null | null,
>   llmModel?: string | null | null,
>   lifecyclePhase?: string | null | null,
>   errorClass?: string | null | null,
>   promptTokens?: number | null,
>   completionTokens?: number | null,
>   latencyMs?: number | null,
>   agentId?: string | null,
>   agentName?: string | null | null,
>   source?: string | null,
>   machineKind?: string | null | null,
>   externalId?: string | null | null,
>   message?: string | null | null,
>   detail?: string | null | null,
>   deleted?: boolean | null
> }[] | null
> ```

***

## Agents

### activity

`agents.activity`

Get the stored events of the agent, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.activity({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `limit` | `number` | No | — |
| `before` | `string` | No | Only entries strictly older than this ISO timestamp (pagination cursor). |
| `type` | `trigger_fired \| llm_call \| tool_call \| lifecycle \| error \| outcome` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `events` | `object[] \| null` | No | — |
| `nextBefore` | `string \| null \| null` | No | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp?: string | null,
>   type?: string | null,
>   success?: boolean | null,
>   triggerType?: string | null | null,
>   toolName?: string | null | null,
>   llmModel?: string | null | null,
>   lifecyclePhase?: string | null | null,
>   errorClass?: string | null | null,
>   promptTokens?: number | null,
>   completionTokens?: number | null,
>   latencyMs?: number | null
> }[] | null
> ```

***

### browserLiveView

`agents.browserLiveView`

Get a live view link to an agent's browser

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.browserLiveView({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `liveViewUrl` | `string \| null \| null` | No | — |
| `sessionId` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null \| null` | No | — |
| `reason` | `string \| null \| null` | No | — |

***

### capabilities.change

`agents.capabilities.change`

Turn one of an agent's capabilities (browser, screen, email ...) on or off

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.capabilities.change({ agent_id: 'ag_3k9x2m7q', capability: 'identity', action: 'add' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `capability` | `identity \| browser` | Yes | — |
| `action` | `add \| remove` | Yes | — |

**Output:** `any`

***

### capabilities.get

`agents.capabilities.get`

Get an agent's capabilities and whether each is on

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.capabilities.get({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### channels.get

`agents.channels.get`

Read gateway channels: from the live container when active, else from stored boot config

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.channels.get({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### channels.update

`agents.channels.update`

Update gateway channels

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.channels.update({
	agent_id: 'ag_3k9x2m7q',
	channels: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `channels` | `object` | Yes | — |
| `auto_start` | `boolean` | No | — |

> [accordion] channels full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** `any`

***

### channels.validateTelegram

`agents.channels.validateTelegram`

Validate a BotFather token via Telegram getMe (no container required)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.channels.validateTelegram({ agent_id: 'ag_3k9x2m7q', bot_token: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `bot_token` | `string` | Yes | — |

**Output:** `any`

***

### chat.getTurn

`agents.chat.getTurn`

Get the caller's retained builtin result without submitting a new message

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.chat.getTurn({ agent_id: 'ag_3k9x2m7q', delivery_id: 'dlv_6m3q8z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `delivery_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `delivery_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `response` | `string \| null \| null` | No | — |
| `error` | `string \| null \| null` | No | — |

***

### chat.send

`agents.chat.send`

Send a message to an agent and wait for its reply; a sleeping agent wakes first

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

```ts theme={null}
await corsair.maritime.api.agents.chat.send({ agent_id: 'ag_3k9x2m7q', message: 'Summarize today', conversation_id: 'customer-481:c_9' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `idempotency_key` | `string` | No | Idempotency-Key header: a retry with the same key returns what this key already did instead of doing it again. Leave it out and the plugin sends a new random key. |
| `chat_result` | `string` | No | X-Maritime-Chat-Result header. 'turns-v1' answers with a turn receipt (pending, reply or failure) instead of the legacy reply; read a pending turn with agents.chat.getTurn. |
| `message` | `string` | Yes | — |
| `conversation_id` | `string \| null` | No | — |
| `context` | `Record<string, string> \| null` | No | String key-value pairs delivered to the agent's container with this message only, for example the sender's user id and a short-lived token for your own tools. Maritime does not store or log them and does not show them to the model. |

**Output:** `any`

***

### create

`agents.create`

Create an agent from a template (agentTemplates.list) and start deploying it; billed while it exists

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.agents.create({ name: 'support-agent', templateId: 'openclaw' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `description` | `string \| null` | No | — |
| `externalId` | `string \| null` | No | — |
| `instructions` | `string \| null` | No | — |
| `framework` | `string` | No | — |
| `tier` | `string` | No | — |
| `memMb` | `number \| null` | No | — |
| `vcpus` | `number \| null` | No | — |
| `idleTtlSeconds` | `number \| null` | No | — |
| `diskGb` | `number \| null` | No | — |
| `computeMinutesLimit` | `number \| null` | No | — |
| `githubRepo` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `imageName` | `string \| null` | No | — |
| `templateId` | `string \| null` | No | — |
| `autoPair` | `boolean` | No | — |
| `gatewayPassword` | `string \| null` | No | — |
| `serverId` | `string \| null` | No | — |
| `initialEnvVars` | `object[]` | No | — |
| `useMaritimeLlm` | `boolean` | No | — |
| `exposedPort` | `number \| null` | No | — |
| `healthCheckPath` | `string \| null` | No | — |
| `hasWebUi` | `boolean` | No | — |
| `publicWeb` | `boolean` | No | — |
| `desktop` | `boolean` | No | — |
| `uploadS3Key` | `string \| null` | No | — |
| `addOns` | `string[]` | No | — |
| `network` | `object \| null` | No | — |

> [accordion] initialEnvVars full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string,
>   isSecret?: boolean
> }[]
> ```

> [accordion] network full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### createOwnerLink

`agents.createOwnerLink`

Mints the owner's 24-hour link to a private agent URL

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.createOwnerLink({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `expiresAt` | `string \| null \| null` | No | — |

***

### delete

`agents.delete`

Delete an agent

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

```ts theme={null}
await corsair.maritime.api.agents.delete({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### desktop.getMode

`agents.desktop.getMode`

Get whether an agent's desktop is driven by the agent or taken over by a person

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.desktop.getMode({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### desktop.takeover

`agents.desktop.takeover`

Take over or hand back an agent's desktop

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.desktop.takeover({ agent_id: 'ag_3k9x2m7q', mode: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `mode` | `string` | Yes | — |
| `reason` | `string \| null` | No | — |
| `success` | `boolean` | No | — |
| `note` | `string \| null` | No | — |

**Output:** `any`

***

### desktop.updateConfig

`agents.desktop.updateConfig`

Turn the screen capability on/off for an existing agent (owner only)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.desktop.updateConfig({ agent_id: 'ag_3k9x2m7q', enabled: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `enabled` | `boolean` | Yes | — |

**Output:** `any`

***

### diagnostic

`agents.diagnostic`

Get the current recognized issue for an errored agent, if any

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.diagnostic({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `source` | `string \| null` | No | — |
| `code` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `message` | `string \| null` | No | — |
| `action` | `string \| null` | No | — |
| `deploymentId` | `string \| null \| null` | No | — |
| `technicalDetails` | `string \| null \| null` | No | — |

***

### duplicate

`agents.duplicate`

Create N new agents from this agent's definition (each billed while it exists)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.agents.duplicate({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `count` | `number` | No | — |
| `namePrefix` | `string \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string \| null` | No | — |
| `created` | `object[] \| null` | No | — |

> [accordion] created full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   description?: string | null | null,
>   instructions?: string | null | null,
>   externalId?: string | null | null,
>   framework?: string | null,
>   tier?: string | null,
>   status?: string | null,
>   githubRepo?: string | null | null,
>   autoPair?: boolean | null,
>   exposedPort?: number | null | null,
>   healthCheckPath?: string | null | null,
>   hasWebUi?: boolean | null,
>   templateId?: string | null | null,
>   publicPlay?: boolean | null,
>   publicWeb?: boolean | null,
>   publicUrl?: string | null | null,
>   visibility?: string | null,
>   webUrl?: string | null | null,
>   desktopEnabled?: boolean | null,
>   invocationCount?: number | null,
>   totalComputeSeconds?: number | null,
>   memMb?: number | null | null,
>   vcpus?: number | null | null,
>   idleTtlSeconds?: number | null | null,
>   diskMb?: number | null | null,
>   computeMinutesLimit?: number | null | null,
>   sleepPolicy?: string | null,
>   lastStartedAt?: string | null | null,
>   lastActiveAt?: string | null | null,
>   statusChangedAt?: string | null | null,
>   derivedImageTag?: string | null | null,
>   imageName?: string | null | null,
>   browserbaseConfigured?: boolean | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> }[] | null
> ```

***

### env.create

`agents.env.create`

Create or replace one environment variable of an agent

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.env.create({ agent_id: 'ag_3k9x2m7q', key: 'OPENAI_API_KEY', value: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `key` | `string` | Yes | — |
| `value` | `string` | Yes | — |
| `isSecret` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `key` | `string \| null` | No | — |
| `value` | `string \| null` | No | — |
| `isSecret` | `boolean \| null` | No | — |
| `warning` | `string \| null \| null` | No | — |

***

### env.delete

`agents.env.delete`

Delete one environment variable of an agent

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

```ts theme={null}
await corsair.maritime.api.agents.env.delete({ agent_id: 'ag_3k9x2m7q', key: 'OPENAI_API_KEY' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `key` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### env.list

`agents.env.list`

List an agent's environment variables (secret values masked)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.env.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   key?: string | null,
>   value?: string | null,
>   isSecret?: boolean | null,
>   warning?: string | null | null
> }[]
> ```

***

### env.update

`agents.env.update`

Update one environment variable of an agent

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.env.update({ agent_id: 'ag_3k9x2m7q', key: 'OPENAI_API_KEY', value: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `key` | `string` | Yes | — |
| `value` | `string` | Yes | — |
| `isSecret` | `boolean \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `key` | `string \| null` | No | — |
| `value` | `string \| null` | No | — |
| `isSecret` | `boolean \| null` | No | — |
| `warning` | `string \| null \| null` | No | — |

***

### exec.cancel

`agents.exec.cancel`

Cancel a running execution; answers with its final result

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

```ts theme={null}
await corsair.maritime.api.agents.exec.cancel({ agent_id: 'ag_3k9x2m7q', execution_id: 'exe_4n8r2v' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `execution_id` | `string` | Yes | — |

**Output:** `any`

***

### exec.get

`agents.exec.get`

Get an execution started with agents.exec.run: status, exit code and output

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.exec.get({ agent_id: 'ag_3k9x2m7q', execution_id: 'exe_4n8r2v' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `execution_id` | `string` | Yes | — |

**Output:** `any`

***

### exec.run

`agents.exec.run`

Run a shell command in an agent's machine, attached (waits) or detached (returns an execution id)

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

```ts theme={null}
await corsair.maritime.api.agents.exec.run({
	agent_id: 'ag_3k9x2m7q',
	command: ['printf', 'hello\\n'],
	timeout: 30,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `command` | `string \| string[]` | Yes | A shell string, or an array of arguments the server shell-quotes. |
| `detached` | `boolean` | No | true answers 202 at once with an executionId (read it with agents.exec.get); false (default) waits. |
| `timeout` | `number` | No | Execution limit in seconds. Default 60 attached, 3,600 detached. |

**Output:** `any`

***

### files.delete

`agents.files.delete`

Delete a file or directory (recursive) within the agent's persistent volume

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

```ts theme={null}
await corsair.maritime.api.agents.files.delete({ agent_id: 'ag_3k9x2m7q', path: '/data/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |

**Output:** `any`

***

### files.download

`agents.files.download`

Download a file from an agent's machine by absolute path (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.files.download({ agent_id: 'ag_3k9x2m7q', path: '/data/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### files.list

`agents.files.list`

List a directory inside the agent's container (file browser)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.files.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `path` | `string` | No | — |

**Output:** `any`

***

### files.mkdir

`agents.files.mkdir`

Create a directory (mkdir -p) inside the agent's persistent volume

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.files.mkdir({ agent_id: 'ag_3k9x2m7q', path: '/data/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `path` | `string` | Yes | Absolute path of the new directory. |

**Output:** `any`

***

### files.move

`agents.files.move`

Rename or move a file/directory within the agent's persistent volume

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.files.move({ agent_id: 'ag_3k9x2m7q', from: '/data/notes.md', to: '/data/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `from` | `string` | Yes | Absolute source path. |
| `to` | `string` | Yes | Absolute destination path; 409 if it exists. |

**Output:** `any`

***

### files.upload

`agents.files.upload`

Upload a file to an agent's disk (dest\_dir) or as a chat attachment

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

```ts theme={null}
await corsair.maritime.api.agents.files.upload({
	agent_id: 'ag_3k9x2m7q',
	file: { base64: 'aGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.md', contentType: 'text/markdown' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `file` | `string \| object \| custom` | Yes | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |
| `message` | `string \| null` | No | — |
| `dest_dir` | `string \| null` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `any`

***

### files.write

`agents.files.write`

Write text content to a file inside the agent container (workspace editor)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.files.write({ agent_id: 'ag_3k9x2m7q', path: '/data/notes.md', content: 'hello from Corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `path` | `string` | Yes | Absolute path on the agent's volume (the root files.list reports). |
| `content` | `string` | Yes | UTF-8 text to write. |

**Output:** `any`

***

### get

`agents.get`

Get one agent: status, template, size, URLs and end user

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.get({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### getStopOperation

`agents.getStopOperation`

Get the progress of a graceful agent stop

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.getStopOperation({ agent_id: 'ag_3k9x2m7q', operation_id: 'op_3x7k2d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `operation_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `kind` | `string \| null` | No | Names the finite operation kinds in the Fleet API. |
| `state` | `string \| null` | No | Names operation states, including immutable terminal outcomes. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `deadline_at` | `string \| null` | No | — |
| `agent_id` | `string \| null \| null` | No | — |
| `queue_reason` | `string \| null \| null` | No | — |
| `result` | `object \| null` | No | Contains immutable resource references produced by a successful workflow. |
| `error` | `object \| null` | No | Contains a content-free error supplied by the workflow owner. |
| `targets` | `object[] \| null` | No | — |
| `outcome` | `string \| null \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   agent_id?: string | null | null,
>   snapshot_id?: string | null | null,
>   delivery_id?: string | null | null,
>   deletion_report_id?: string | null | null,
>   boot_id?: string | null | null,
>   drain_outcome?: string | null | null
> } | null | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   title?: string | null,
>   status?: number | null,
>   code?: string | null,
>   detail?: string | null,
>   request_id?: string | null,
>   retryable?: boolean | null,
>   violations?: {
>     field?: string | null,
>     reason?: string | null
>   }[] | null | null
> } | null | null
> ```

> [accordion] targets full type
>
> ```ts theme={null}
> {
>   agent_id?: string | null,
>   state?: string | null,
>   error?: {
>     type?: string | null,
>     title?: string | null,
>     status?: number | null,
>     code?: string | null,
>     detail?: string | null,
>     request_id?: string | null,
>     retryable?: boolean | null,
>     violations?: {
>       field?: string | null,
>       reason?: string | null
>     }[] | null | null
>   } | null | null
> }[] | null | null
> ```

***

### gmail.connect

`agents.gmail.connect`

Inject Gmail credentials into the running agent container

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.gmail.connect({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### gmail.disconnect

`agents.gmail.disconnect`

Disconnect Gmail: remove credentials, clean container, delete trigger

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.gmail.disconnect({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### gmail.enable

`agents.gmail.enable`

Enable Gmail for an agent (older name of agents.gmail.connect)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.gmail.enable({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### gmail.status

`agents.gmail.status`

Check whether Gmail is connected for this agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.gmail.status({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### hermes.pairings.allow

`agents.hermes.pairings.allow`

Pre-approve a contact by identity

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.hermes.pairings.allow({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### hermes.pairings.approve

`agents.hermes.pairings.approve`

Approve a one-time pairing code the contact relayed

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.hermes.pairings.approve({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### hermes.pairings.list

`agents.hermes.pairings.list`

Pending pairing requests + approved contacts across all platforms

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.hermes.pairings.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### hermes.pairings.revoke

`agents.hermes.pairings.revoke`

Remove a contact from the approved list

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.hermes.pairings.revoke({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### inkboxIdentity

`agents.inkboxIdentity`

Get the Inkbox identity info (phone number, email) for an agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.inkboxIdentity({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### invoke

`agents.invoke`

Post a payload to an agent's invoke URL; it is delivered in the background, waking the agent

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

```ts theme={null}
await corsair.maritime.api.agents.invoke({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `token` | `string` | No | The agent's invoke token (agents.webhookToken.get). Calls without one still work for now but are being phased out. |

**Output:** `any`

***

### list

`agents.list`

List your agents

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Filter by exact agent name |
| `externalId` | `string` | No | Filter by caller-supplied external id (exact match) |

**Output:** `any`

***

### listServers

`agents.listServers`

Get active servers for server selection during deploy

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.listServers({});
```

**Input:** *empty object*

**Output:** `any`

***

### llm.calls

`agents.llm.calls`

Get the metered LLM calls of the agent with tokens and cost, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.llm.calls({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `limit` | `number` | No | — |
| `before` | `string` | No | Only entries strictly older than this ISO timestamp (pagination cursor). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `calls` | `object[] \| null` | No | — |
| `nextBefore` | `string \| null \| null` | No | — |

> [accordion] calls full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   timestamp?: string | null,
>   model?: string | null,
>   promptTokens?: number | null,
>   cachedTokens?: number | null,
>   completionTokens?: number | null,
>   reasoningTokens?: number | null,
>   costCents?: number | null,
>   upstreamRequestId?: string | null | null
> }[] | null
> ```

***

### llm.deleteSpendLimit

`agents.llm.deleteSpendLimit`

Removes the agent's own limit, so the agent follows the account default

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

```ts theme={null}
await corsair.maritime.api.agents.llm.deleteSpendLimit({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### llm.getSpendLimit

`agents.llm.getSpendLimit`

Get the limit that applies to the agent and its spend this month

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.llm.getSpendLimit({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `monthlyLimitCents` | `number \| null \| null` | No | — |
| `source` | `string \| null` | No | — |
| `spentThisMonthCents` | `number \| null` | No | — |
| `limitReached` | `boolean \| null` | No | — |
| `periodStart` | `string \| null` | No | — |
| `periodEnd` | `string \| null` | No | — |

***

### llm.reset

`agents.llm.reset`

Replace the agent's OpenAI key with a Maritime proxy token and set the base URL

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

```ts theme={null}
await corsair.maritime.api.agents.llm.reset({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### llm.setSpendLimit

`agents.llm.setSpendLimit`

Sets the agent's own monthly limit

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.llm.setSpendLimit({ agent_id: 'ag_3k9x2m7q', monthlyLimitCents: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `monthlyLimitCents` | `number \| null` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `monthlyLimitCents` | `number \| null \| null` | No | — |
| `source` | `string \| null` | No | — |
| `spentThisMonthCents` | `number \| null` | No | — |
| `limitReached` | `boolean \| null` | No | — |
| `periodStart` | `string \| null` | No | — |
| `periodEnd` | `string \| null` | No | — |

***

### llm.status

`agents.llm.status`

Check whether the agent is using the Maritime LLM proxy or a custom key

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.llm.status({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### logs

`agents.logs`

Read an agent's logs, newest first, filtered by level

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.logs({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `limit` | `number` | No | — |
| `level` | `string` | No | — |
| `before` | `string` | No | Only entries strictly older than this ISO timestamp (pagination cursor). |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   level?: string | null,
>   message?: string | null,
>   timestamp?: string | null,
>   source?: string | null
> }[]
> ```

***

### maritimeTelegram.connect

`agents.maritimeTelegram.connect`

Issue a one-tap deep link the user opens in Telegram

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.maritimeTelegram.connect({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### maritimeTelegram.disconnect

`agents.maritimeTelegram.disconnect`

Remove this agent's binding to the shared Maritime bot

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

```ts theme={null}
await corsair.maritime.api.agents.maritimeTelegram.disconnect({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### maritimeTelegram.status

`agents.maritimeTelegram.status`

Get current binding state: not\_connected | pending | bound

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.maritimeTelegram.status({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### reloadEnv

`agents.reloadEnv`

Applies saved environment variables, starting a parked Agent when necessary

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.reloadEnv({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### resetToUpstream

`agents.resetToUpstream`

Requests a fresh upstream root while preserving the assigned /data volume

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

```ts theme={null}
await corsair.maritime.api.agents.resetToUpstream({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### resize

`agents.resize`

Change an agent's RAM / SSD allocation or always-on state

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.agents.resize({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `mem_mb` | `number \| null` | No | — |
| `disk_gb` | `number \| null` | No | — |
| `always_on` | `boolean \| null` | No | — |

**Output:** `any`

***

### restart

`agents.restart`

Get the Agent after the configured restart operation completes

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.agents.restart({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### setVisibility

`agents.setVisibility`

Sets who may open the agent URL: `private` or `public`

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.setVisibility({ agent_id: 'ag_3k9x2m7q', visibility: 'private' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `visibility` | `private \| public` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### shareLinks.create

`agents.shareLinks.create`

Mints a shared link

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.shareLinks.create({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `ttlSeconds` | `number \| null` | No | — |
| `endUserExternalId` | `string \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `expiresAt` | `string \| null \| null` | No | — |

***

### shareLinks.list

`agents.shareLinks.list`

Lists the agent's live links without their secrets

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.shareLinks.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   kind?: string | null,
>   endUserExternalId?: string | null | null,
>   expiresAt?: string | null | null,
>   createdAt?: string | null,
>   lastUsedAt?: string | null | null
> }[] | null
> ```

***

### shareLinks.revoke

`agents.shareLinks.revoke`

Revokes one link

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

```ts theme={null}
await corsair.maritime.api.agents.shareLinks.revoke({ agent_id: 'ag_3k9x2m7q', link_id: 'lnk_7t3n6w' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `link_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### shareLinks.revokeForEndUser

`agents.shareLinks.revokeForEndUser`

Revokes every live link of the agent bound to the end user and returns the count

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

```ts theme={null}
await corsair.maritime.api.agents.shareLinks.revokeForEndUser({ agent_id: 'ag_3k9x2m7q', endUserExternalId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `endUserExternalId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `revoked` | `number \| null` | No | — |

***

### signedWebhook.delete

`agents.signedWebhook.delete`

Removes the agent's signed webhook address

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

```ts theme={null}
await corsair.maritime.api.agents.signedWebhook.delete({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### signedWebhook.get

`agents.signedWebhook.get`

Get the agent's signed webhook address

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.signedWebhook.get({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `string \| null` | No | — |
| `scheme` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### signedWebhook.set

`agents.signedWebhook.set`

Sets the agent's one signed webhook address

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.signedWebhook.set({
	agent_id: 'ag_3k9x2m7q',
	path: '/data/notes.md',
	scheme: 'spectrum_v0',
	secret: 'examplexxxxxxxxx',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |
| `scheme` | `spectrum_v0` | Yes | — |
| `secret` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `string \| null` | No | — |
| `scheme` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### skills.delete

`agents.skills.delete`

Remove an installed skill (workspace or managed dir) and drop its lines from the dependency manifest

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

```ts theme={null}
await corsair.maritime.api.agents.skills.delete({ agent_id: 'ag_3k9x2m7q', skill_name: 'web-search' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `skill_name` | `string` | Yes | — |

**Output:** `any`

***

### skills.export

`agents.skills.export`

Download an installed skill as a .tar.gz: the other half of upload

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.skills.export({ agent_id: 'ag_3k9x2m7q', skill_name: 'web-search' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `skill_name` | `string` | Yes | — |

**Output:** `any`

***

### skills.install

`agents.skills.install`

Install a skill from ClawHub on an agent

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.skills.install({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `slug` | `string \| null` | No | — |
| `git` | `string \| null` | No | — |
| `version` | `string \| null` | No | — |
| `force` | `boolean` | No | — |
| `env` | `Record<string, string> \| null` | No | — |

**Output:** `any`

***

### skills.list

`agents.skills.list`

Enumerate OpenClaw skills available in this agent's runtime

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.skills.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### skills.search

`agents.skills.search`

Search the framework's community registry server-side: ClawHub (clawhub.ai) for openclaw-family agents, skills.sh for hermes-family

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.skills.search({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `q` | `string` | No | ClawHub search query (empty returns nothing) |
| `limit` | `number` | No | — |

**Output:** `any`

***

### skills.setAllowlist

`agents.skills.setAllowlist`

Set the per-agent skill toggle state inside the running container

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.skills.setAllowlist({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `allowlist` | `string[] \| null` | No | — |

**Output:** `any`

***

### skills.setEnv

`agents.skills.setEnv`

Upsert env vars for skills that gate on them (NOTION\_API\_KEY, GOOGLE\_PLACES\_API\_KEY, …) and trigger a container restart so the agent's gateway picks them up

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.skills.setEnv({
	agent_id: 'ag_3k9x2m7q',
	env: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `env` | `Record<string, string>` | Yes | — |

**Output:** `any`

***

### skills.upload

`agents.skills.upload`

Install a CUSTOM skill from an uploaded archive, then run the same just-works pipeline as /skills/install (env apply, binary auto-resolve, final-state report)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.skills.upload({ agent_id: 'ag_3k9x2m7q', archiveBase64: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `archiveBase64` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `env` | `Record<string, string> \| null` | No | — |

**Output:** `any`

***

### sleep

`agents.sleep`

Put an agent to sleep now (it wakes on the next message, webhook or trigger)

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

```ts theme={null}
await corsair.maritime.api.agents.sleep({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### start

`agents.start`

Start a stopped agent (billed while it runs)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.agents.start({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### stats

`agents.stats`

Get an agent's CPU, memory and disk use

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.stats({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### stop

`agents.stop`

Stops immediately or accepts a graceful stop for the Agent's current boot

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

```ts theme={null}
await corsair.maritime.api.agents.stop({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `idempotency_key` | `string` | No | Idempotency-Key header: a retry with the same key returns what this key already did instead of doing it again. Leave it out and the plugin sends a new random key. |
| `drain_timeout_seconds` | `number` | No | — |
| `force` | `boolean` | No | — |
| `deadline_at` | `string` | No | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   description?: string | null | null,
>   instructions?: string | null | null,
>   externalId?: string | null | null,
>   framework?: string | null,
>   tier?: string | null,
>   status?: string | null,
>   githubRepo?: string | null | null,
>   autoPair?: boolean | null,
>   exposedPort?: number | null | null,
>   healthCheckPath?: string | null | null,
>   hasWebUi?: boolean | null,
>   templateId?: string | null | null,
>   publicPlay?: boolean | null,
>   publicWeb?: boolean | null,
>   publicUrl?: string | null | null,
>   visibility?: string | null,
>   webUrl?: string | null | null,
>   desktopEnabled?: boolean | null,
>   invocationCount?: number | null,
>   totalComputeSeconds?: number | null,
>   memMb?: number | null | null,
>   vcpus?: number | null | null,
>   idleTtlSeconds?: number | null | null,
>   diskMb?: number | null | null,
>   computeMinutesLimit?: number | null | null,
>   sleepPolicy?: string | null,
>   lastStartedAt?: string | null | null,
>   lastActiveAt?: string | null | null,
>   statusChangedAt?: string | null | null,
>   derivedImageTag?: string | null | null,
>   imageName?: string | null | null,
>   browserbaseConfigured?: boolean | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> } | {
>   id?: string | null,
>   kind?: string | null,
>   state?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   deadline_at?: string | null,
>   agent_id?: string | null | null,
>   queue_reason?: string | null | null,
>   result?: {
>     agent_id?: string | null | null,
>     snapshot_id?: string | null | null,
>     delivery_id?: string | null | null,
>     deletion_report_id?: string | null | null,
>     boot_id?: string | null | null,
>     drain_outcome?: string | null | null
>   } | null | null,
>   error?: {
>     type?: string | null,
>     title?: string | null,
>     status?: number | null,
>     code?: string | null,
>     detail?: string | null,
>     request_id?: string | null,
>     retryable?: boolean | null,
>     violations?: {
>       field?: string | null,
>       reason?: string | null
>     }[] | null | null
>   } | null | null,
>   targets?: {
>     agent_id?: string | null,
>     state?: string | null,
>     error?: {
>       type?: string | null,
>       title?: string | null,
>       status?: number | null,
>       code?: string | null,
>       detail?: string | null,
>       request_id?: string | null,
>       retryable?: boolean | null,
>       violations?: {
>         field?: string | null,
>         reason?: string | null
>       }[] | null | null
>     } | null | null
>   }[] | null | null,
>   outcome?: string | null | null
> }
> ```

***

### triggers.create

`agents.triggers.create`

Create a trigger that wakes an agent on a schedule or event

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.triggers.create({ agent_id: 'ag_3k9x2m7q', type: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `type` | `string` | Yes | — |
| `config` | `object` | No | — |
| `enabled` | `boolean` | No | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `config` | `object \| null` | No | — |
| `enabled` | `boolean \| null` | No | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### triggers.delete

`agents.triggers.delete`

Delete one of an agent's triggers

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

```ts theme={null}
await corsair.maritime.api.agents.triggers.delete({ agent_id: 'ag_3k9x2m7q', trigger_id: 'trg_6b1m9q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `trigger_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### triggers.list

`agents.triggers.list`

List an agent's triggers

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.triggers.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   type?: string | null,
>   config?: {
>   } | null,
>   enabled?: boolean | null
> }[]
> ```

***

### triggers.update

`agents.triggers.update`

Update one of an agent's triggers

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.triggers.update({ agent_id: 'ag_3k9x2m7q', trigger_id: 'trg_6b1m9q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `trigger_id` | `string` | Yes | — |
| `config` | `object \| null` | No | — |
| `enabled` | `boolean \| null` | No | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `config` | `object \| null` | No | — |
| `enabled` | `boolean \| null` | No | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### update

`agents.update`

Update agent metadata

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.update({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `instructions` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `githubRepo` | `string \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null` | No | — |
| `healthCheckPath` | `string \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### webhookToken.get

`agents.webhookToken.get`

Get the invoke token for an agent you own, plus a ready-to-use URL

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.webhookToken.get({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### webhookToken.rotate

`agents.webhookToken.rotate`

Replaces the agent's invoke token with a new stored secret

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

```ts theme={null}
await corsair.maritime.api.agents.webhookToken.rotate({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### whatsapp.cancel

`agents.whatsapp.cancel`

Cancel the WhatsApp linking that agents.whatsapp.start began

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.cancel({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### whatsapp.log

`agents.whatsapp.log`

Get the last \~4KB of helper stdout/stderr for debugging

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.log({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### whatsapp.pairings.approve

`agents.whatsapp.pairings.approve`

Approve a WhatsApp contact asking to talk to an agent, by pairing code

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.pairings.approve({ agent_id: 'ag_3k9x2m7q', code: 'ABC123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `code` | `string` | Yes | — |

**Output:** `any`

***

### whatsapp.pairings.deny

`agents.whatsapp.pairings.deny`

Deny a WhatsApp contact asking to talk to an agent, by pairing code

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.pairings.deny({ agent_id: 'ag_3k9x2m7q', code: 'ABC123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `code` | `string` | Yes | — |

**Output:** `any`

***

### whatsapp.pairings.list

`agents.whatsapp.pairings.list`

Get the WhatsApp pending pairing list + current allowlist

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.pairings.list({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### whatsapp.start

`agents.whatsapp.start`

Start linking a WhatsApp number to an agent (returns the QR or pairing step)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.start({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

### whatsapp.status

`agents.whatsapp.status`

Get the state of an agent's WhatsApp link

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agents.whatsapp.status({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output:** `any`

***

## Agent Templates

### list

`agentTemplates.list`

List the agent templates (OpenClaw, Hermes, Codex, Claude Code ...) agents.create takes as templateId; public

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.agentTemplates.list({});
```

**Input:** *empty object*

**Output:** `any`

***

## Api Keys

### create

`apiKeys.create`

Create a new API key

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

```ts theme={null}
await corsair.maritime.api.apiKeys.create({ name: 'build-42' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Human-readable name for this key |
| `scopes` | `string[]` | No | Scopes: provision (create), deploy (lifecycle/chat), secrets (env vars), manage (delete + everything, wildcard). fleet grants the automatically bound fleet; nova is legacy and exclusive. Defaults to full access; pass a narrower set to restrict a key. |
| `expires_in_days` | `number \| null` | No | Key expiry in days from now. Null = never expires |
| `project_id` | `string \| null` | No | Restrict this key to one project (plan 22 §3). Scoped keys only work on the /api/v1 partner surface (front door, usage) for that project; every other endpoint rejects them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `key_prefix` | `string \| null` | No | — |
| `scopes` | `string[] \| null` | No | — |
| `is_active` | `boolean \| null` | No | — |
| `project_id` | `string \| null \| null` | No | — |
| `fleet_id` | `string \| null \| null` | No | — |
| `last_used_at` | `string \| null \| null` | No | — |
| `expires_at` | `string \| null \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `computer_sessions_30d` | `number \| null` | No | — |
| `raw_key` | `string \| null` | No | Full API key. Store securely, shown only once |

***

### list

`apiKeys.list`

List the account's API keys with their scopes (no secrets)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.apiKeys.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   key_prefix?: string | null,
>   scopes?: string[] | null,
>   is_active?: boolean | null,
>   project_id?: string | null | null,
>   fleet_id?: string | null | null,
>   last_used_at?: string | null | null,
>   expires_at?: string | null | null,
>   created_at?: string | null,
>   computer_sessions_30d?: number | null
> }[]
> ```

***

### revoke

`apiKeys.revoke`

Revoke an account API key; it stops working at once

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

```ts theme={null}
await corsair.maritime.api.apiKeys.revoke({ key_id: 'key_1m9x4c' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

## Appium

### sessions.get

`appium.sessions.get`

One session with download URLs of its video, logcat and command log, valid for one hour

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.appium.sessions.get({ session_id: 'ses_4b7w1x' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `computerId` | `string \| null` | No | — |
| `phoneNumber` | `number \| null \| null` | No | — |
| `phoneName` | `string \| null \| null` | No | — |
| `name` | `string \| null \| null` | No | — |
| `build` | `string \| null \| null` | No | — |
| `status` | `string \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `endedAt` | `string \| null \| null` | No | — |
| `durationS` | `number \| null` | No | — |
| `commandCount` | `number \| null` | No | — |
| `hasVideo` | `boolean \| null` | No | — |
| `hasLogcat` | `boolean \| null` | No | — |
| `hasCommands` | `boolean \| null` | No | — |
| `error` | `string \| null \| null` | No | — |
| `videoUrl` | `string \| null \| null` | No | — |
| `logcatUrl` | `string \| null \| null` | No | — |
| `commandsUrl` | `string \| null \| null` | No | — |
| `capabilities` | `object \| null` | No | — |

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null | null
> ```

***

### sessions.list

`appium.sessions.list`

The account's Appium sessions, newest first, of one phone when `computerId` is given

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.appium.sessions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computerId` | `string` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sessions` | `object[] \| null` | No | — |

> [accordion] sessions full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   computerId?: string | null,
>   phoneNumber?: number | null | null,
>   phoneName?: string | null | null,
>   name?: string | null | null,
>   build?: string | null | null,
>   status?: string | null,
>   startedAt?: string | null,
>   endedAt?: string | null | null,
>   durationS?: number | null,
>   commandCount?: number | null,
>   hasVideo?: boolean | null,
>   hasLogcat?: boolean | null,
>   hasCommands?: boolean | null,
>   error?: string | null | null
> }[] | null
> ```

***

## Apps

### delete

`apps.delete`

Deletes the app and its file

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

```ts theme={null}
await corsair.maritime.api.apps.delete({ app_id: 'app_6q2k8n' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### get

`apps.get`

One app of the account

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.apps.get({ app_id: 'app_6q2k8n' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `sha256` | `string \| null` | No | — |
| `sizeBytes` | `number \| null` | No | — |
| `appUrl` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

***

### list

`apps.list`

The account's apps, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.apps.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apps` | `object[] \| null` | No | — |

> [accordion] apps full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   sha256?: string | null,
>   sizeBytes?: number | null,
>   appUrl?: string | null,
>   createdAt?: string | null
> }[] | null
> ```

***

### upload

`apps.upload`

Stores the APK in the multipart field `file` (at most 1 GiB)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.apps.upload({
	file: { base64: 'UEsDBBQAAAAIAA==', filename: 'app-release.apk', contentType: 'application/vnd.android.package-archive' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | The APK: a public URL, \{url}, or \{base64, filename}. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `sha256` | `string \| null` | No | — |
| `sizeBytes` | `number \| null` | No | — |
| `appUrl` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

***

## Billing

### agentPay.createLink

`billing.agentPay.createLink`

A short-lived link an agent pays at with an MPP client, for example `link-cli mpp pay <payUrl> -X POST`

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.agentPay.createLink({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `plan` | `string` | No | — |

**Output:** `any`

***

### agents

`billing.agents`

Get this billing period cost per agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.agents({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   agentId?: string | null,
>   agentName?: string | null,
>   tier?: string | null,
>   cost?: number | null,
>   invocations?: number | null,
>   computeMinutes?: number | null,
>   computeMinutesThisPeriod?: number | null,
>   invocationsThisPeriod?: number | null,
>   limitMinutes?: number | null | null,
>   usagePercent?: number | null
> }[]
> ```

***

### cancelSwitchToUsage

`billing.cancelSwitchToUsage`

Cancel a pending switch to usage billing

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

```ts theme={null}
await corsair.maritime.api.billing.cancelSwitchToUsage({});
```

**Input:** *empty object*

**Output:** `any`

***

### config

`billing.config`

Get the live price list Maritime bills with

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.config({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `v2Enabled` | `boolean \| null` | No | — |
| `agentFeeCentsPerMonth` | `number \| null` | No | — |
| `maxConcurrentActive` | `number \| null` | No | — |
| `bundles` | `object \| null` | No | — |

> [accordion] bundles full type
>
> ```ts theme={null}
> Record<string, {
>   priceCents?: number | null,
>   creditCents?: number | null,
>   concurrent?: number | null | null
> }> | null
> ```

***

### machineTypes

`billing.machineTypes`

List machine types with their prices

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.machineTypes({});
```

**Input:** *empty object*

**Output:** `any`

***

### meteredUsage

`billing.meteredUsage`

Get this billing period: plan credit, cents used, overage, and usage by machine type and machine

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.meteredUsage({});
```

**Input:** *empty object*

**Output:** `any`

***

### plan.change

`billing.plan.change`

Change the selected plan under the ordinary checkout rules

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.plan.change({ plan: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `plan` | `string` | Yes | — |
| `returnPath` | `string \| null` | No | — |
| `confirm` | `boolean` | No | — |
| `promoCode` | `string \| null` | No | — |

**Output:** `any`

***

### plan.changeWithTrial

`billing.plan.changeWithTrial`

Open Starter Checkout only while a trial is still available

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.plan.changeWithTrial({ plan: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `plan` | `string` | Yes | — |
| `returnPath` | `string \| null` | No | — |
| `confirm` | `boolean` | No | — |
| `promoCode` | `string \| null` | No | — |

**Output:** `any`

***

### plan.preview

`billing.plan.preview`

What picking `plan` would do now: charge today, discount, awake limit and the sentence to show before confirming

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.plan.preview({ plan: 'example' });
```

**Input**

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

**Output:** `any`

***

### plan.resume

`billing.plan.resume`

Resume a plan that was set to cancel (charges the plan fee)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.plan.resume({});
```

**Input:** *empty object*

**Output:** `any`

***

### retryPayment

`billing.retryPayment`

Pays a past-due plan's open invoice now with the card on file

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.retryPayment({});
```

**Input:** *empty object*

**Output:** `any`

***

### summary

`billing.summary`

Get the billing summary: agents, cost and compute minutes this period

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.summary({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalAgents` | `number \| null` | No | — |
| `totalCost` | `number \| null` | No | — |
| `computeMinutes` | `number \| null` | No | — |
| `agents` | `object[] \| null` | No | — |
| `billingPeriod` | `string \| null` | No | — |

> [accordion] agents full type
>
> ```ts theme={null}
> {
>   agentId?: string | null,
>   agentName?: string | null,
>   tier?: string | null,
>   cost?: number | null,
>   invocations?: number | null,
>   computeMinutes?: number | null,
>   computeMinutesThisPeriod?: number | null,
>   invocationsThisPeriod?: number | null,
>   limitMinutes?: number | null | null,
>   usagePercent?: number | null
> }[] | null
> ```

***

### switchToUsage

`billing.switchToUsage`

A seat-plan account moves to a usage plan at its seat period end

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.switchToUsage({ plan: 'example' });
```

**Input**

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

**Output:** `any`

***

### trial.cancel

`billing.trial.cancel`

Cancel the free trial

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

```ts theme={null}
await corsair.maritime.api.billing.trial.cancel({});
```

**Input:** *empty object*

**Output:** `any`

***

### trial.get

`billing.trial.get`

Get the free trial state

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.trial.get({});
```

**Input:** *empty object*

**Output:** `any`

***

### trial.start

`billing.trial.start`

Start the 7-day free trial (needs a card on file)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.billing.trial.start({});
```

**Input**

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

**Output:** `any`

***

### usage

`billing.usage`

Get raw usage data for the current billing period

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.billing.usage({});
```

**Input:** *empty object*

**Output:** `any`

***

## Computers

### actions

`computers.actions`

Run one action (screenshot, click, type, key, scroll ...) or a batch on a computer; wakes it

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.computers.actions({ computer_id: 'cmp_7h2k9d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `action` | `string` | No | — |
| `coordinate` | `number[] \| null` | No | — |
| `startCoordinate` | `number[] \| null` | No | — |
| `text` | `string \| null` | No | — |
| `modifier` | `string \| null` | No | — |
| `key` | `string \| null` | No | — |
| `repeat` | `number \| null` | No | — |
| `scrollDirection` | `up \| down \| left \| right \| null` | No | — |
| `scrollAmount` | `number \| null` | No | — |
| `duration` | `number \| null` | No | — |
| `region` | `number[] \| null` | No | — |
| `package` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `path` | `string \| null` | No | — |
| `detail` | `boolean \| null` | No | — |
| `noScreenshot` | `boolean \| null` | No | — |
| `format` | `png \| jpeg \| null` | No | — |
| `quality` | `number \| null` | No | — |
| `actions` | `object[]` | No | — |

> [accordion] actions full type
>
> ```ts theme={null}
> {
>   action: string,
>   coordinate?: number[] | null,
>   startCoordinate?: number[] | null,
>   text?: string | null,
>   modifier?: string | null,
>   key?: string | null,
>   repeat?: number | null,
>   scrollDirection?: up | down | left | right | null,
>   scrollAmount?: number | null,
>   duration?: number | null,
>   region?: number[] | null,
>   package?: string | null,
>   url?: string | null,
>   path?: string | null,
>   detail?: boolean | null,
>   noScreenshot?: boolean | null,
>   format?: png | jpeg | null,
>   quality?: number | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   action?: string | null | null,
>   ok?: boolean | null | null,
>   isError?: boolean | null | null,
>   error?: string | null | null,
>   frameId?: number | null | null,
>   imageB64?: string | null | null,
>   width?: number | null | null,
>   height?: number | null | null,
>   mime?: string | null | null,
>   scale?: number | null | null,
>   coordinate?: number[] | null | null,
>   blocked?: boolean | null | null,
>   mode?: string | null | null,
>   reason?: string | null | null,
>   hint?: string | null | null,
>   note?: string | null | null
> } | {
>   results?: {
>     action?: string | null | null,
>     ok?: boolean | null | null,
>     isError?: boolean | null | null,
>     error?: string | null | null,
>     frameId?: number | null | null,
>     imageB64?: string | null | null,
>     width?: number | null | null,
>     height?: number | null | null,
>     mime?: string | null | null,
>     scale?: number | null | null,
>     coordinate?: number[] | null | null,
>     blocked?: boolean | null | null,
>     mode?: string | null | null,
>     reason?: string | null | null,
>     hint?: string | null | null,
>     note?: string | null | null
>   }[] | null
> }
> ```

***

### completeTakeover

`computers.completeTakeover`

Hand control back to the agent (viewer token, control mode)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.computers.completeTakeover({ computer_id: 'cmp_7h2k9d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `success` | `boolean` | No | — |
| `note` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `takeoverSeq` | `number \| null \| null` | No | — |
| `screenshot` | `object \| null` | No | A desktopd action result with camelCase names; extra detail keys pass through. |

> [accordion] screenshot full type
>
> ```ts theme={null}
> {
>   action?: string | null | null,
>   ok?: boolean | null | null,
>   isError?: boolean | null | null,
>   error?: string | null | null,
>   frameId?: number | null | null,
>   imageB64?: string | null | null,
>   width?: number | null | null,
>   height?: number | null | null,
>   mime?: string | null | null,
>   scale?: number | null | null,
>   coordinate?: number[] | null | null,
>   blocked?: boolean | null | null,
>   mode?: string | null | null,
>   reason?: string | null | null,
>   hint?: string | null | null,
>   note?: string | null | null
> } | null | null
> ```

***

### create

`computers.create`

Get or create the computer (Linux or Windows desktop, Android phone) of one end user; billed while awake

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.computers.create({ externalUserId: 'customer-481', os: 'linux' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `externalUserId` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `os` | `linux \| windows \| android` | No | — |
| `arch` | `x86_64 \| arm64` | No | — |
| `screen` | `object \| null` | No | The screen size of a new computer, in pixels. |
| `network` | `object \| null` | No | — |

> [accordion] screen full type
>
> ```ts theme={null}
> {
>   width: number,
>   height: number
> } | null
> ```

> [accordion] network full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `os` | `string \| null` | No | — |
| `arch` | `string \| null` | No | — |
| `externalUserId` | `string \| null \| null` | No | — |
| `name` | `string \| null \| null` | No | — |
| `status` | `string \| null` | No | — |
| `screen` | `object \| null` | No | — |
| `mode` | `string \| null` | No | — |
| `modeReason` | `string \| null \| null` | No | — |
| `takeoverSeq` | `number \| null \| null` | No | — |
| `takeoverExpiresAt` | `string \| null \| null` | No | — |
| `lastTakeoverResult` | `string \| null \| null` | No | — |
| `lastTakeoverNote` | `string \| null \| null` | No | — |
| `lastActionAt` | `string \| null \| null` | No | — |
| `lastWakeMs` | `number \| null \| null` | No | — |
| `lastWakeMethod` | `string \| null \| null` | No | — |
| `errorMessage` | `string \| null \| null` | No | — |
| `session` | `object \| null` | No | The open session on a computer, as the dashboard list shows it. |
| `device` | `object \| null` | No | The physical phone behind a Metal computer, as of `checked_at`. |
| `createdAt` | `string \| null` | No | — |

> [accordion] screen full type
>
> ```ts theme={null}
> {
>   width?: number | null,
>   height?: number | null,
>   modelWidth?: number | null
> } | null
> ```

> [accordion] session full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   startedAt?: string | null,
>   lastActionAt?: string | null,
>   actions?: number | null,
>   screenshots?: number | null,
>   client?: string | null | null
> } | null | null
> ```

> [accordion] device full type
>
> ```ts theme={null}
> {
>   number?: number | null | null,
>   model?: string | null | null,
>   androidVersion?: string | null | null,
>   batteryPercent?: number | null | null,
>   temperatureC?: number | null | null,
>   charging?: boolean | null | null,
>   online?: boolean | null,
>   checkedAt?: string | null | null,
>   adbPort?: number | null | null
> } | null | null
> ```

***

### createViewer

`computers.createViewer`

Mint a viewer link (watch or control)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.computers.createViewer({ computer_id: 'cmp_7h2k9d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `mode` | `watch \| control` | No | — |
| `ttlS` | `number` | No | — |
| `reason` | `string \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |
| `mode` | `string \| null` | No | — |

***

### delete

`computers.delete`

Delete a computer, its volume, and its snapshots

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

```ts theme={null}
await corsair.maritime.api.computers.delete({ computer_id: 'cmp_7h2k9d' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### exec

`computers.exec`

Run a shell command inside the computer

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.computers.exec({ computer_id: 'cmp_7h2k9d', command: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `command` | `string` | Yes | — |
| `timeoutS` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `exitCode` | `number \| null \| null` | No | — |
| `stdout` | `string \| null` | No | — |
| `stderr` | `string \| null` | No | — |

***

### files.list

`computers.files.list`

List a directory on a computer's disk

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.files.list({ computer_id: 'cmp_7h2k9d', path: '/data/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |

**Output**

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

> [accordion] entries full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   size?: number | null,
>   isDir?: boolean | null,
>   mtime?: number | null | null
> }[] | null
> ```

***

### files.read

`computers.files.read`

Read a file (raw bytes)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.files.read({ computer_id: 'cmp_7h2k9d', path: '/data/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### files.write

`computers.files.write`

Write a file (raw body)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.computers.files.write({ computer_id: 'cmp_7h2k9d', path: '/data/notes.md', content: 'hello from Corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |
| `content` | `string` | Yes | The file content: UTF-8 text, or base64 when encoding is base64. |
| `encoding` | `utf8 \| base64` | No | How content is written: 'utf8' (default) or 'base64' for binary data. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### get

`computers.get`

Get one computer: OS, state, end user and screen

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.get({ computer_id: 'cmp_7h2k9d' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `os` | `string \| null` | No | — |
| `arch` | `string \| null` | No | — |
| `externalUserId` | `string \| null \| null` | No | — |
| `name` | `string \| null \| null` | No | — |
| `status` | `string \| null` | No | — |
| `screen` | `object \| null` | No | — |
| `mode` | `string \| null` | No | — |
| `modeReason` | `string \| null \| null` | No | — |
| `takeoverSeq` | `number \| null \| null` | No | — |
| `takeoverExpiresAt` | `string \| null \| null` | No | — |
| `lastTakeoverResult` | `string \| null \| null` | No | — |
| `lastTakeoverNote` | `string \| null \| null` | No | — |
| `lastActionAt` | `string \| null \| null` | No | — |
| `lastWakeMs` | `number \| null \| null` | No | — |
| `lastWakeMethod` | `string \| null \| null` | No | — |
| `errorMessage` | `string \| null \| null` | No | — |
| `session` | `object \| null` | No | The open session on a computer, as the dashboard list shows it. |
| `device` | `object \| null` | No | The physical phone behind a Metal computer, as of `checked_at`. |
| `createdAt` | `string \| null` | No | — |

> [accordion] screen full type
>
> ```ts theme={null}
> {
>   width?: number | null,
>   height?: number | null,
>   modelWidth?: number | null
> } | null
> ```

> [accordion] session full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   startedAt?: string | null,
>   lastActionAt?: string | null,
>   actions?: number | null,
>   screenshots?: number | null,
>   client?: string | null | null
> } | null | null
> ```

> [accordion] device full type
>
> ```ts theme={null}
> {
>   number?: number | null | null,
>   model?: string | null | null,
>   androidVersion?: string | null | null,
>   batteryPercent?: number | null | null,
>   temperatureC?: number | null | null,
>   charging?: boolean | null | null,
>   online?: boolean | null,
>   checkedAt?: string | null | null,
>   adbPort?: number | null | null
> } | null | null
> ```

***

### installApp

`computers.installApp`

Runs `adb install -r` (with `-g` unless `grantPermissions` is false) on the phone

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.computers.installApp({ computer_id: 'cmp_7h2k9d', appId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `appId` | `string` | Yes | — |
| `grantPermissions` | `boolean` | No | — |

**Output**

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

***

### list

`computers.list`

List computers, optionally for one end user

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `externalUserId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `computers` | `object[] \| null` | No | — |

> [accordion] computers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   os?: string | null,
>   arch?: string | null,
>   externalUserId?: string | null | null,
>   name?: string | null | null,
>   status?: string | null,
>   screen?: {
>     width?: number | null,
>     height?: number | null,
>     modelWidth?: number | null
>   } | null,
>   mode?: string | null,
>   modeReason?: string | null | null,
>   takeoverSeq?: number | null | null,
>   takeoverExpiresAt?: string | null | null,
>   lastTakeoverResult?: string | null | null,
>   lastTakeoverNote?: string | null | null,
>   lastActionAt?: string | null | null,
>   lastWakeMs?: number | null | null,
>   lastWakeMethod?: string | null | null,
>   errorMessage?: string | null | null,
>   session?: {
>     id?: string | null,
>     startedAt?: string | null,
>     lastActionAt?: string | null,
>     actions?: number | null,
>     screenshots?: number | null,
>     client?: string | null | null
>   } | null | null,
>   device?: {
>     number?: number | null | null,
>     model?: string | null | null,
>     androidVersion?: string | null | null,
>     batteryPercent?: number | null | null,
>     temperatureC?: number | null | null,
>     charging?: boolean | null | null,
>     online?: boolean | null,
>     checkedAt?: string | null | null,
>     adbPort?: number | null | null
>   } | null | null,
>   createdAt?: string | null
> }[] | null
> ```

***

### screenshot

`computers.screenshot`

Screenshot as image bytes (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.screenshot({ computer_id: 'cmp_7h2k9d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | — |
| `format` | `string` | No | — |
| `quality` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### sessions.close

`computers.sessions.close`

Close the open session (30 s grace before sleep)

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

```ts theme={null}
await corsair.maritime.api.computers.sessions.close({ computer_id: 'cmp_7h2k9d' });
```

**Input**

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

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   computerId?: string | null,
>   startedAt?: string | null,
>   lastActionAt?: string | null,
>   endedAt?: string | null | null,
>   wallSeconds?: number | null,
>   actions?: number | null,
>   screenshots?: number | null,
>   bytesOut?: number | null,
>   invocationsCharged?: number | null,
>   endReason?: string | null | null,
>   client?: string | null | null,
>   modelHint?: string | null | null,
>   graceUntil?: string | null | null
> } | {
>   success: true
> }
> ```

***

### sessions.list

`computers.sessions.list`

List a computer's recent sessions (invocations)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.sessions.list({ computer_id: 'cmp_7h2k9d' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sessions` | `object[] \| null` | No | — |

> [accordion] sessions full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   computerId?: string | null,
>   startedAt?: string | null,
>   lastActionAt?: string | null,
>   endedAt?: string | null | null,
>   wallSeconds?: number | null,
>   actions?: number | null,
>   screenshots?: number | null,
>   bytesOut?: number | null,
>   invocationsCharged?: number | null,
>   endReason?: string | null | null,
>   client?: string | null | null,
>   modelHint?: string | null | null,
>   graceUntil?: string | null | null
> }[] | null
> ```

***

### sleep

`computers.sleep`

Sleep a computer (closes the open session)

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

```ts theme={null}
await corsair.maritime.api.computers.sleep({ computer_id: 'cmp_7h2k9d' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `os` | `string \| null` | No | — |
| `arch` | `string \| null` | No | — |
| `externalUserId` | `string \| null \| null` | No | — |
| `name` | `string \| null \| null` | No | — |
| `status` | `string \| null` | No | — |
| `screen` | `object \| null` | No | — |
| `mode` | `string \| null` | No | — |
| `modeReason` | `string \| null \| null` | No | — |
| `takeoverSeq` | `number \| null \| null` | No | — |
| `takeoverExpiresAt` | `string \| null \| null` | No | — |
| `lastTakeoverResult` | `string \| null \| null` | No | — |
| `lastTakeoverNote` | `string \| null \| null` | No | — |
| `lastActionAt` | `string \| null \| null` | No | — |
| `lastWakeMs` | `number \| null \| null` | No | — |
| `lastWakeMethod` | `string \| null \| null` | No | — |
| `errorMessage` | `string \| null \| null` | No | — |
| `session` | `object \| null` | No | The open session on a computer, as the dashboard list shows it. |
| `device` | `object \| null` | No | The physical phone behind a Metal computer, as of `checked_at`. |
| `createdAt` | `string \| null` | No | — |

> [accordion] screen full type
>
> ```ts theme={null}
> {
>   width?: number | null,
>   height?: number | null,
>   modelWidth?: number | null
> } | null
> ```

> [accordion] session full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   startedAt?: string | null,
>   lastActionAt?: string | null,
>   actions?: number | null,
>   screenshots?: number | null,
>   client?: string | null | null
> } | null | null
> ```

> [accordion] device full type
>
> ```ts theme={null}
> {
>   number?: number | null | null,
>   model?: string | null | null,
>   androidVersion?: string | null | null,
>   batteryPercent?: number | null | null,
>   temperatureC?: number | null | null,
>   charging?: boolean | null | null,
>   online?: boolean | null,
>   checkedAt?: string | null | null,
>   adbPort?: number | null | null
> } | null | null
> ```

***

### tools.call

`computers.tools.call`

Run one read-only tool deployed to a computer

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.computers.tools.call({ computer_id: 'cmp_7h2k9d', tool: 'read_invoice_total' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | The computer id. |
| `tool` | `string` | Yes | The tool name from computers.tools.list. |
| `arguments` | `object` | No | The tool's arguments, up to 16 KiB. |

> [accordion] arguments full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** `any`

***

### tools.list

`computers.tools.list`

List a computer's tools with their input schemas and the tool server's state

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.tools.list({ computer_id: 'cmp_7h2k9d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `computer_id` | `string` | Yes | The computer id. |

**Output:** `any`

***

### usage

`computers.usage`

Invocation usage for a period

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.computers.usage({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | No | — |
| `to` | `string` | No | — |
| `externalUserId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string \| null` | No | — |
| `to` | `string \| null` | No | — |
| `invocations` | `number \| null` | No | — |
| `wallSeconds` | `number \| null` | No | — |
| `actions` | `number \| null` | No | — |
| `screenshots` | `number \| null` | No | — |
| `computers` | `object[] \| null` | No | — |

> [accordion] computers full type
>
> ```ts theme={null}
> {
>   computerId?: string | null,
>   externalUserId?: string | null | null,
>   invocations?: number | null,
>   wallSeconds?: number | null,
>   actions?: number | null,
>   screenshots?: number | null
> }[] | null
> ```

***

### wake

`computers.wake`

Wake a computer (free; opens no session)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.computers.wake({ computer_id: 'cmp_7h2k9d' });
```

**Input**

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

**Output**

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

***

## Deleted Agents

### get

`deletedAgents.get`

One deleted agent's history

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.deletedAgents.get({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `agentId` | `string \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `name` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `finalStatus` | `string \| null` | No | — |
| `deletedAt` | `string \| null` | No | — |
| `deployments` | `Record<string, string \| null>[] \| null` | No | — |
| `logs` | `Record<string, string \| null>[] \| null` | No | — |
| `executions` | `Record<string, string \| number \| null>[] \| null` | No | — |

***

### list

`deletedAgents.list`

The caller's deleted agents with this external id, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.deletedAgents.list({ externalId: 'example' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   agentId?: string | null,
>   externalId?: string | null | null,
>   name?: string | null,
>   framework?: string | null,
>   finalStatus?: string | null,
>   deletedAt?: string | null,
>   deployments?: Record<string, string | null>[] | null,
>   logs?: Record<string, string | null>[] | null,
>   executions?: Record<string, string | number | null>[] | null
> }[]
> ```

***

## Deployments

### cancel

`deployments.cancel`

Persist cancellation intent for the worker instead of cancelling a request task

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

```ts theme={null}
await corsair.maritime.api.deployments.cancel({ deployment_id: 'dep_9f2a6b' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `commitSha` | `string \| null \| null` | No | — |
| `imageRef` | `string \| null \| null` | No | — |
| `buildLog` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `completedAt` | `string \| null \| null` | No | — |
| `failureKind` | `string \| null \| null` | No | — |
| `errorCode` | `string \| null \| null` | No | — |
| `errorTitle` | `string \| null \| null` | No | — |
| `errorMessage` | `string \| null \| null` | No | — |
| `errorAction` | `string \| null \| null` | No | — |

***

### create

`deployments.create`

Queues a deployment after checking agent and uploaded-archive ownership

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.deployments.create({ agentId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agentId` | `string` | Yes | — |
| `source` | `github \| docker \| template \| zip` | No | — |
| `repoUrl` | `string \| null` | No | — |
| `imageName` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `uploadS3Key` | `string \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `commitSha` | `string \| null \| null` | No | — |
| `imageRef` | `string \| null \| null` | No | — |
| `buildLog` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `completedAt` | `string \| null \| null` | No | — |
| `failureKind` | `string \| null \| null` | No | — |
| `errorCode` | `string \| null \| null` | No | — |
| `errorTitle` | `string \| null \| null` | No | — |
| `errorMessage` | `string \| null \| null` | No | — |
| `errorAction` | `string \| null \| null` | No | — |

***

### get

`deployments.get`

Get one deployment with its status and build log

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.deployments.get({ deployment_id: 'dep_9f2a6b' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `commitSha` | `string \| null \| null` | No | — |
| `imageRef` | `string \| null \| null` | No | — |
| `buildLog` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `completedAt` | `string \| null \| null` | No | — |
| `failureKind` | `string \| null \| null` | No | — |
| `errorCode` | `string \| null \| null` | No | — |
| `errorTitle` | `string \| null \| null` | No | — |
| `errorMessage` | `string \| null \| null` | No | — |
| `errorAction` | `string \| null \| null` | No | — |

***

### list

`deployments.list`

List all deployments for the current user's agents

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.deployments.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   agentName?: string | null,
>   framework?: string | null,
>   status?: string | null,
>   commitSha?: string | null | null,
>   startedAt?: string | null,
>   completedAt?: string | null | null
> }[]
> ```

***

### listForAgent

`deployments.listForAgent`

List deployments for a specific agent, including build logs

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.deployments.listForAgent({ agent_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_id` | `string` | Yes | — |
| `limit` | `number` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   status?: string | null,
>   commitSha?: string | null | null,
>   imageRef?: string | null | null,
>   buildLog?: string | null | null,
>   startedAt?: string | null,
>   completedAt?: string | null | null,
>   failureKind?: string | null | null,
>   errorCode?: string | null | null,
>   errorTitle?: string | null | null,
>   errorMessage?: string | null | null,
>   errorAction?: string | null | null
> }[]
> ```

***

### uploadZip

`deployments.uploadZip`

Upload a ZIP file of source code for agent deployment

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.deployments.uploadZip({
	file: { base64: 'aGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.md', contentType: 'text/markdown' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | A file: a public URL to it, or \{url, filename?, contentType?}, or \{base64, filename?, contentType?} for a small one. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** `any`

***

## Domains

### check

`domains.check`

Asks the edge for the domain's state now, instead of waiting for the next minute's check

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.domains.check({ domain_id: 'dom_3j6w9t' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `hostname` | `string \| null` | No | — |
| `kind` | `string \| null` | No | — |
| `agentId` | `string \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `url` | `string \| null \| null` | No | — |
| `dnsRecords` | `object[] \| null` | No | — |
| `error` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `liveAt` | `string \| null \| null` | No | — |
| `checkedAt` | `string \| null \| null` | No | — |

> [accordion] dnsRecords full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   name?: string | null,
>   value?: string | null,
>   purpose?: string | null
> }[] | null
> ```

***

### create

`domains.create`

Adds a domain and returns the DNS records to create

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.domains.create({ hostname: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hostname` | `string` | Yes | — |
| `agentId` | `string \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `hostname` | `string \| null` | No | — |
| `kind` | `string \| null` | No | — |
| `agentId` | `string \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `url` | `string \| null \| null` | No | — |
| `dnsRecords` | `object[] \| null` | No | — |
| `error` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `liveAt` | `string \| null \| null` | No | — |
| `checkedAt` | `string \| null \| null` | No | — |

> [accordion] dnsRecords full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   name?: string | null,
>   value?: string | null,
>   purpose?: string | null
> }[] | null
> ```

***

### delete

`domains.delete`

Stops serving the domain at once and detaches it from the edge

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

```ts theme={null}
await corsair.maritime.api.domains.delete({ domain_id: 'dom_3j6w9t' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### get

`domains.get`

Get one domain as last checked

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.domains.get({ domain_id: 'dom_3j6w9t' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `hostname` | `string \| null` | No | — |
| `kind` | `string \| null` | No | — |
| `agentId` | `string \| null \| null` | No | — |
| `state` | `string \| null` | No | — |
| `url` | `string \| null \| null` | No | — |
| `dnsRecords` | `object[] \| null` | No | — |
| `error` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `liveAt` | `string \| null \| null` | No | — |
| `checkedAt` | `string \| null \| null` | No | — |

> [accordion] dnsRecords full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   name?: string | null,
>   value?: string | null,
>   purpose?: string | null
> }[] | null
> ```

***

### labels.delete

`domains.labels.delete`

Removes a label

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

```ts theme={null}
await corsair.maritime.api.domains.labels.delete({ domain_id: 'dom_3j6w9t', label: 'support' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain_id` | `string` | Yes | — |
| `label` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### labels.list

`domains.labels.list`

Lists the names under a wildcard domain, agents' and sandbox ports'

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.domains.labels.list({ domain_id: 'dom_3j6w9t' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   label?: string | null,
>   agentId?: string | null | null,
>   sandboxId?: string | null | null,
>   port?: number | null | null,
>   url?: string | null
> }[] | null
> ```

***

### labels.set

`domains.labels.set`

Names an agent, or a sandbox's port, `<label>.<base>`

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.domains.labels.set({ domain_id: 'dom_3j6w9t', label: 'support' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain_id` | `string` | Yes | — |
| `label` | `string` | Yes | — |
| `agentId` | `string \| null` | No | — |
| `sandboxId` | `string \| null` | No | — |
| `port` | `number \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `label` | `string \| null` | No | — |
| `agentId` | `string \| null \| null` | No | — |
| `sandboxId` | `string \| null \| null` | No | — |
| `port` | `number \| null \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### list

`domains.list`

Lists the account's domains, optionally only those of one agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.domains.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agentId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `enabled` | `boolean \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   kind?: string | null,
>   agentId?: string | null | null,
>   state?: string | null,
>   url?: string | null | null,
>   dnsRecords?: {
>     type?: string | null,
>     name?: string | null,
>     value?: string | null,
>     purpose?: string | null
>   }[] | null,
>   error?: string | null | null,
>   createdAt?: string | null,
>   liveAt?: string | null | null,
>   checkedAt?: string | null | null
> }[] | null
> ```

***

## End Users

### activity

`endUsers.activity`

Get the end user's recent activity, newest first: messages, wakes, sleeps, agent creates

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.endUsers.activity({ external_id: 'customer-481' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `external_id` | `string` | Yes | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   kind?: string | null,
>   at?: string | null,
>   agentId?: string | null | null,
>   agentName?: string | null | null,
>   text?: string | null | null,
>   reply?: string | null | null,
>   replies?: string[] | null,
>   images?: string[] | null,
>   repliedAt?: string | null | null,
>   status?: string | null | null,
>   computeSeconds?: number | null | null,
>   scheduled?: boolean | null,
>   scheduleLabel?: string | null | null
> }[] | null
> ```

***

### agents.create

`endUsers.agents.create`

Creates the end user's agent, exactly once

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.endUsers.agents.create({ external_id: 'customer-481' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `external_id` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `externalId` | `string \| null` | No | — |
| `instructions` | `string \| null` | No | — |
| `framework` | `string` | No | — |
| `tier` | `string` | No | — |
| `memMb` | `number \| null` | No | — |
| `vcpus` | `number \| null` | No | — |
| `idleTtlSeconds` | `number \| null` | No | — |
| `diskGb` | `number \| null` | No | — |
| `computeMinutesLimit` | `number \| null` | No | — |
| `githubRepo` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `imageName` | `string \| null` | No | — |
| `templateId` | `string \| null` | No | — |
| `autoPair` | `boolean` | No | — |
| `gatewayPassword` | `string \| null` | No | — |
| `serverId` | `string \| null` | No | — |
| `initialEnvVars` | `object[]` | No | — |
| `useMaritimeLlm` | `boolean` | No | — |
| `exposedPort` | `number \| null` | No | — |
| `healthCheckPath` | `string \| null` | No | — |
| `hasWebUi` | `boolean` | No | — |
| `publicWeb` | `boolean` | No | — |
| `desktop` | `boolean` | No | — |
| `uploadS3Key` | `string \| null` | No | — |
| `addOns` | `string[]` | No | — |
| `network` | `object \| null` | No | — |

> [accordion] initialEnvVars full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string,
>   isSecret?: boolean
> }[]
> ```

> [accordion] network full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null \| null` | No | — |
| `instructions` | `string \| null \| null` | No | — |
| `externalId` | `string \| null \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `githubRepo` | `string \| null \| null` | No | — |
| `autoPair` | `boolean \| null` | No | — |
| `exposedPort` | `number \| null \| null` | No | — |
| `healthCheckPath` | `string \| null \| null` | No | — |
| `hasWebUi` | `boolean \| null` | No | — |
| `templateId` | `string \| null \| null` | No | — |
| `publicPlay` | `boolean \| null` | No | — |
| `publicWeb` | `boolean \| null` | No | — |
| `publicUrl` | `string \| null \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `webUrl` | `string \| null \| null` | No | — |
| `desktopEnabled` | `boolean \| null` | No | — |
| `invocationCount` | `number \| null` | No | — |
| `totalComputeSeconds` | `number \| null` | No | — |
| `memMb` | `number \| null \| null` | No | — |
| `vcpus` | `number \| null \| null` | No | — |
| `idleTtlSeconds` | `number \| null \| null` | No | — |
| `diskMb` | `number \| null \| null` | No | — |
| `computeMinutesLimit` | `number \| null \| null` | No | — |
| `sleepPolicy` | `string \| null` | No | — |
| `lastStartedAt` | `string \| null \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `statusChangedAt` | `string \| null \| null` | No | — |
| `derivedImageTag` | `string \| null \| null` | No | — |
| `imageName` | `string \| null \| null` | No | — |
| `browserbaseConfigured` | `boolean \| null` | No | — |
| `projectId` | `string \| null \| null` | No | — |
| `projectRole` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |

***

### agents.list

`endUsers.agents.list`

Get the end user's agents in the full agent shape

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.endUsers.agents.list({ external_id: 'customer-481' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   description?: string | null | null,
>   instructions?: string | null | null,
>   externalId?: string | null | null,
>   framework?: string | null,
>   tier?: string | null,
>   status?: string | null,
>   githubRepo?: string | null | null,
>   autoPair?: boolean | null,
>   exposedPort?: number | null | null,
>   healthCheckPath?: string | null | null,
>   hasWebUi?: boolean | null,
>   templateId?: string | null | null,
>   publicPlay?: boolean | null,
>   publicWeb?: boolean | null,
>   publicUrl?: string | null | null,
>   visibility?: string | null,
>   webUrl?: string | null | null,
>   desktopEnabled?: boolean | null,
>   invocationCount?: number | null,
>   totalComputeSeconds?: number | null,
>   memMb?: number | null | null,
>   vcpus?: number | null | null,
>   idleTtlSeconds?: number | null | null,
>   diskMb?: number | null | null,
>   computeMinutesLimit?: number | null | null,
>   sleepPolicy?: string | null,
>   lastStartedAt?: string | null | null,
>   lastActiveAt?: string | null | null,
>   statusChangedAt?: string | null | null,
>   derivedImageTag?: string | null | null,
>   imageName?: string | null | null,
>   browserbaseConfigured?: boolean | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   createdAt?: string | null,
>   updatedAt?: string | null
> }[]
> ```

***

### delete

`endUsers.delete`

Deletes the end user and every agent it owns, with their data

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

```ts theme={null}
await corsair.maritime.api.endUsers.delete({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### get

`endUsers.get`

Get one end user with its agents and access rollups

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.endUsers.get({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `externalId` | `string \| null` | No | — |
| `displayName` | `string \| null \| null` | No | — |
| `metadata` | `Record<string, string \| number \| number \| boolean \| null> \| null` | No | — |
| `tags` | `string[] \| null` | No | — |
| `status` | `string \| null` | No | — |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `agentCount` | `number \| null` | No | — |
| `agents` | `object[] \| null` | No | — |
| `aiSpendCents30d` | `number \| null` | No | — |
| `messageCount` | `number \| null` | No | — |
| `lastMessage` | `object \| null` | No | The last thing said between the end user and their agent. |
| `activity14d` | `number[] \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `liveTokenCount` | `number \| null` | No | — |

> [accordion] agents full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   framework?: string | null | null,
>   templateId?: string | null | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   baseAgent?: {
>     id?: string | null,
>     name?: string | null
>   } | null | null,
>   createdAt?: string | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

> [accordion] lastMessage full type
>
> ```ts theme={null}
> {
>   at?: string | null,
>   fromAgent?: boolean | null,
>   text?: string | null | null,
>   imageCount?: number | null,
>   failed?: boolean | null
> } | null | null
> ```

***

### list

`endUsers.list`

Lists the account's end users one page at a time, newest first unless sorted by activity

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.endUsers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `tag` | `string` | No | — |
| `externalIdPrefix` | `string` | No | — |
| `lastActiveBefore` | `string` | No | — |
| `lastActiveAfter` | `string` | No | — |
| `q` | `string` | No | Matches an external id prefix or a display name |
| `projectId` | `string` | No | Only users of this agent group |
| `agentId` | `string` | No | Only the user that owns this agent |
| `sort` | `string` | No | created or lastActive |
| `cursor` | `string` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |
| `nextCursor` | `string \| null \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   externalId?: string | null,
>   displayName?: string | null | null,
>   metadata?: Record<string, string | number | number | boolean | null> | null,
>   tags?: string[] | null,
>   status?: string | null,
>   policy?: Record<string, number | number> | null | null,
>   agentCount?: number | null,
>   agents?: {
>     id?: string | null,
>     name?: string | null,
>     status?: string | null,
>     framework?: string | null | null,
>     templateId?: string | null | null,
>     projectId?: string | null | null,
>     projectRole?: string | null | null,
>     baseAgent?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null,
>     createdAt?: string | null,
>     lastActiveAt?: string | null | null
>   }[] | null,
>   aiSpendCents30d?: number | null,
>   messageCount?: number | null,
>   lastMessage?: {
>     at?: string | null,
>     fromAgent?: boolean | null,
>     text?: string | null | null,
>     imageCount?: number | null,
>     failed?: boolean | null
>   } | null | null,
>   activity14d?: number[] | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

***

### policy.delete

`endUsers.policy.delete`

Removes the policy

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

```ts theme={null}
await corsair.maritime.api.endUsers.policy.delete({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `appliedToAgents` | `number \| null` | No | — |

***

### policy.get

`endUsers.policy.get`

Get the end user's policy, or null when none is set

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.endUsers.policy.get({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `appliedToAgents` | `number \| null` | No | — |

***

### policy.set

`endUsers.policy.set`

Replaces the end user's policy and applies it to every agent it owns now

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.endUsers.policy.set({
	external_id: 'customer-481',
	policy: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `external_id` | `string` | Yes | — |
| `policy` | `Record<string, number \| number \| null>` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `appliedToAgents` | `number \| null` | No | — |

***

### resume

`endUsers.resume`

Makes a suspended end user active again

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.endUsers.resume({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `externalId` | `string \| null` | No | — |
| `displayName` | `string \| null \| null` | No | — |
| `metadata` | `Record<string, string \| number \| number \| boolean \| null> \| null` | No | — |
| `tags` | `string[] \| null` | No | — |
| `status` | `string \| null` | No | — |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `agentCount` | `number \| null` | No | — |
| `agents` | `object[] \| null` | No | — |
| `aiSpendCents30d` | `number \| null` | No | — |
| `messageCount` | `number \| null` | No | — |
| `lastMessage` | `object \| null` | No | The last thing said between the end user and their agent. |
| `activity14d` | `number[] \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |

> [accordion] agents full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   framework?: string | null | null,
>   templateId?: string | null | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   baseAgent?: {
>     id?: string | null,
>     name?: string | null
>   } | null | null,
>   createdAt?: string | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

> [accordion] lastMessage full type
>
> ```ts theme={null}
> {
>   at?: string | null,
>   fromAgent?: boolean | null,
>   text?: string | null | null,
>   imageCount?: number | null,
>   failed?: boolean | null
> } | null | null
> ```

***

### summary

`endUsers.summary`

Get the account's users now and per UTC day: total, new, active, messages, people using it, and AI spend

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.endUsers.summary({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `days` | `number` | No | — |
| `excludeTags` | `string` | No | Comma-separated tags; users with any are left out |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalUsers` | `number \| null` | No | — |
| `activeUsers7d` | `number \| null` | No | — |
| `neverMessaged` | `number \| null` | No | — |
| `messages` | `number \| null` | No | — |
| `days` | `object[] \| null` | No | — |

> [accordion] days full type
>
> ```ts theme={null}
> {
>   day?: string | null,
>   users?: number | null,
>   newUsers?: number | null,
>   activeUsers?: number | null,
>   messages?: number | null,
>   usingUsers?: number | null,
>   aiCents?: number | null
> }[] | null
> ```

***

### suspend

`endUsers.suspend`

Suspends the end user: its agents go to sleep and refuse wakes and LLM calls

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

```ts theme={null}
await corsair.maritime.api.endUsers.suspend({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `externalId` | `string \| null` | No | — |
| `displayName` | `string \| null \| null` | No | — |
| `metadata` | `Record<string, string \| number \| number \| boolean \| null> \| null` | No | — |
| `tags` | `string[] \| null` | No | — |
| `status` | `string \| null` | No | — |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `agentCount` | `number \| null` | No | — |
| `agents` | `object[] \| null` | No | — |
| `aiSpendCents30d` | `number \| null` | No | — |
| `messageCount` | `number \| null` | No | — |
| `lastMessage` | `object \| null` | No | The last thing said between the end user and their agent. |
| `activity14d` | `number[] \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |

> [accordion] agents full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   framework?: string | null | null,
>   templateId?: string | null | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   baseAgent?: {
>     id?: string | null,
>     name?: string | null
>   } | null | null,
>   createdAt?: string | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

> [accordion] lastMessage full type
>
> ```ts theme={null}
> {
>   at?: string | null,
>   fromAgent?: boolean | null,
>   text?: string | null | null,
>   imageCount?: number | null,
>   failed?: boolean | null
> } | null | null
> ```

***

### tokens.create

`endUsers.tokens.create`

Mints a short-lived token the end user's own client uses to reach one of its agents

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

```ts theme={null}
await corsair.maritime.api.endUsers.tokens.create({ external_id: 'customer-481' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `external_id` | `string` | Yes | — |
| `agentId` | `string \| null` | No | — |
| `scopes` | `string[] \| null` | No | — |
| `ttlSeconds` | `number \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `scopes` | `string[] \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |

***

### tokens.revoke

`endUsers.tokens.revoke`

Revokes every live token of the end user

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

```ts theme={null}
await corsair.maritime.api.endUsers.tokens.revoke({ external_id: 'customer-481' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### upsert

`endUsers.upsert`

Creates the end user, or updates the fields sent

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.endUsers.upsert({ external_id: 'customer-481' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `external_id` | `string` | Yes | — |
| `displayName` | `string \| null` | No | — |
| `metadata` | `Record<string, string \| number \| number \| boolean \| null> \| null` | No | — |
| `tags` | `string[] \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `externalId` | `string \| null` | No | — |
| `displayName` | `string \| null \| null` | No | — |
| `metadata` | `Record<string, string \| number \| number \| boolean \| null> \| null` | No | — |
| `tags` | `string[] \| null` | No | — |
| `status` | `string \| null` | No | — |
| `policy` | `Record<string, number \| number> \| null \| null` | No | — |
| `agentCount` | `number \| null` | No | — |
| `agents` | `object[] \| null` | No | — |
| `aiSpendCents30d` | `number \| null` | No | — |
| `messageCount` | `number \| null` | No | — |
| `lastMessage` | `object \| null` | No | The last thing said between the end user and their agent. |
| `activity14d` | `number[] \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |

> [accordion] agents full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   framework?: string | null | null,
>   templateId?: string | null | null,
>   projectId?: string | null | null,
>   projectRole?: string | null | null,
>   baseAgent?: {
>     id?: string | null,
>     name?: string | null
>   } | null | null,
>   createdAt?: string | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

> [accordion] lastMessage full type
>
> ```ts theme={null}
> {
>   at?: string | null,
>   fromAgent?: boolean | null,
>   text?: string | null | null,
>   imageCount?: number | null,
>   failed?: boolean | null
> } | null | null
> ```

***

## Feedback

### create

`feedback.create`

Send a report to Maritime's founders (docs, SDK, API, CLI ...); 5 a minute, 20 a day

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

```ts theme={null}
await corsair.maritime.api.feedback.create({ kind: 'docs', subject: 'GET /v1/templates', message: 'The page lists this route but it answers 404.' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string` | Yes | What went wrong, in plain words. Include what you expected. |
| `kind` | `string` | No | What the report is about: one of \['api', 'cli', 'computers', 'dashboard', 'docs', 'other', 'sdk']. |
| `subject` | `string \| null` | No | The page URL, endpoint, SDK method or CLI command the report concerns. |
| `agentId` | `string \| null` | No | The Maritime agent the report is about, when there is one. |
| `requestId` | `string \| null` | No | The X-Request-Id of the failing call, when the report is about one. |
| `statusCode` | `number \| null` | No | HTTP status of the failing call, when the report is about one. |
| `tool` | `string \| null` | No | Who is sending, e.g. "claude-code/2.1.0" or "codex". |
| `context` | `Record<string, string \| number \| number \| boolean \| null> \| null` | No | Up to 20 flat key/value pairs (SDK version, OS, ...). Never put secrets or env values here. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `kind` | `string \| null` | No | — |
| `subject` | `string \| null \| null` | No | — |
| `message` | `string \| null` | No | — |
| `agentId` | `string \| null \| null` | No | — |
| `requestId` | `string \| null \| null` | No | — |
| `statusCode` | `number \| null \| null` | No | — |
| `tool` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

***

### list

`feedback.list`

Lists the calling account's most recent reports, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.feedback.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   kind?: string | null,
>   subject?: string | null | null,
>   message?: string | null,
>   agentId?: string | null | null,
>   requestId?: string | null | null,
>   statusCode?: number | null | null,
>   tool?: string | null | null,
>   createdAt?: string | null
> }[]
> ```

***

## Fleet

### activity

`fleet.activity`

Per-agent activity over a recent window

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.fleet.activity({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hours` | `number` | No | — |
| `group` | `string` | No | — |
| `tzOffsetMinutes` | `number` | No | — |

**Output:** `any`

***

### batchCreate

`fleet.batchCreate`

Spin up N identical agents named \{prefix}-1..N

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.fleet.batchCreate({ namePrefix: 'example', count: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `namePrefix` | `string` | Yes | — |
| `count` | `number` | Yes | — |
| `templateId` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `githubRepo` | `string \| null` | No | — |
| `instructions` | `string \| null` | No | — |
| `tier` | `string \| null` | No | — |
| `idleTtlSeconds` | `number \| null` | No | — |
| `envVars` | `object[]` | No | — |

> [accordion] envVars full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string,
>   isSecret?: boolean
> }[]
> ```

**Output:** `any`

***

### overview

`fleet.overview`

Summary + the full agent list in one call

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.fleet.overview({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### propagate

`fleet.propagate`

Write one file into many of the caller's agents; optionally restart them

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.fleet.propagate({
	path: '/data/notes.md',
	content: 'hello from Corsair',
	agentIds: ['example'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `agentIds` | `string[]` | Yes | — |
| `restart` | `boolean` | No | — |

**Output:** `any`

***

### summary

`fleet.summary`

Get the health and usage summary of the account's agents

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.fleet.summary({});
```

**Input:** *empty object*

**Output:** *empty object*

***

## Health

### check

`health.check`

Check that the Maritime API is up (no key needed)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.health.check({});
```

**Input:** *empty object*

**Output:** `any`

***

## Llm Spend Limit

### deleteDefault

`llmSpendLimit.deleteDefault`

Removes the account default

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

```ts theme={null}
await corsair.maritime.api.llmSpendLimit.deleteDefault({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### getDefault

`llmSpendLimit.getDefault`

Get the account default

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.llmSpendLimit.getDefault({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `monthlyLimitCents` | `number \| null \| null` | No | — |

***

### setDefault

`llmSpendLimit.setDefault`

Sets the monthly limit for each agent that has no limit of its own

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.llmSpendLimit.setDefault({ monthlyLimitCents: 1 });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `monthlyLimitCents` | `number \| null \| null` | No | — |

***

## Logs

### list

`logs.list`

Get log entries across all agents owned by the current user

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.logs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `level` | `string` | No | — |
| `before` | `string` | No | Only entries strictly older than this ISO timestamp (pagination cursor). |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   level?: string | null,
>   message?: string | null,
>   timestamp?: string | null,
>   source?: string | null
> }[]
> ```

***

## Network

### activity

`network.activity`

Lists connections through Maritime Networks, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.activity({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkId` | `string` | No | — |
| `workloadKind` | `string` | No | — |
| `workloadId` | `string` | No | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | — |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   at?: string | null,
>   networkId?: string | null | null,
>   resourceId?: string | null | null,
>   resourceName?: string | null | null,
>   workloadKind?: string | null | null,
>   workloadId?: string | null | null,
>   kind?: string | null,
>   destination?: string | null,
>   outcome?: string | null,
>   bytesIn?: number | null,
>   bytesOut?: number | null,
>   durationMs?: number | null
> }[] | null
> ```

***

### install.get

`network.install.get`

Describes an install link for the IT person who runs it

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.install.get({ token: 'tok_example' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `networkName` | `string \| null` | No | — |
| `resources` | `object[] \| null` | No | — |
| `allowInternet` | `boolean \| null` | No | — |
| `commands` | `object \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |
| `edgeHost` | `string \| null` | No | — |

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   target?: string | null
> }[] | null
> ```

> [accordion] commands full type
>
> ```ts theme={null}
> {
>   windows?: string | null,
>   macos?: string | null,
>   linux?: string | null
> } | null
> ```

***

### install.unixScript

`network.install.unixScript`

Get the macOS and Linux install script for an install link

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.install.unixScript({ token: 'tok_example' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `text` | `string` | Yes | The body as text. |

***

### install.windowsScript

`network.install.windowsScript`

Get the Windows install script for an install link

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.install.windowsScript({ token: 'tok_example' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `text` | `string` | Yes | The body as text. |

***

### presets.create

`network.presets.create`

Creates an account preset

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.presets.create({ name: 'build-42' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `allow` | `string[]` | No | — |
| `deny` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `allow` | `string[] \| null` | No | — |
| `deny` | `string[] \| null` | No | — |
| `builtIn` | `boolean \| null` | No | — |
| `inUse` | `number \| null` | No | — |

***

### presets.delete

`network.presets.delete`

Deletes an account preset no workload uses

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

```ts theme={null}
await corsair.maritime.api.network.presets.delete({ preset_id: 'pre_7k1v4c' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### presets.list

`network.presets.list`

Lists the presets the account may use, built-ins first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.presets.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `presets` | `object[] \| null` | No | — |

> [accordion] presets full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   allow?: string[] | null,
>   deny?: string[] | null,
>   builtIn?: boolean | null,
>   inUse?: number | null
> }[] | null
> ```

***

### presets.update

`network.presets.update`

Changes the given parts of an account preset

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.presets.update({ preset_id: 'pre_7k1v4c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `preset_id` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `allow` | `string[] \| null` | No | — |
| `deny` | `string[] \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `allow` | `string[] \| null` | No | — |
| `deny` | `string[] \| null` | No | — |
| `builtIn` | `boolean \| null` | No | — |
| `inUse` | `number \| null` | No | — |

***

### privateNetworks.addResource

`network.privateNetworks.addResource`

Adds a resource to a network

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.addResource({ network_id: 'net_2r8m5x', name: 'build-42', target: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network_id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `target` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `networkId` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `target` | `string \| null` | No | — |
| `address` | `string \| null` | No | — |
| `approved` | `boolean \| null` | No | — |

***

### privateNetworks.create

`network.privateNetworks.create`

Creates a network

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.create({ name: 'build-42' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |
| `status` | `string \| null` | No | — |
| `statusDetail` | `string \| null \| null` | No | — |
| `allowsInternet` | `boolean \| null` | No | — |
| `connectors` | `object[] \| null` | No | — |
| `resources` | `object[] \| null` | No | — |

> [accordion] connectors full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   connected?: boolean | null,
>   lastSeenAt?: string | null | null,
>   allow?: string[] | null,
>   allowsInternet?: boolean | null
> }[] | null
> ```

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   networkId?: string | null,
>   name?: string | null,
>   target?: string | null,
>   address?: string | null,
>   approved?: boolean | null
> }[] | null
> ```

***

### privateNetworks.createInstall

`network.privateNetworks.createInstall`

Makes a new one-time install link for a network

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.createInstall({ network_id: 'net_2r8m5x' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network_id` | `string` | Yes | — |
| `allowInternet` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |
| `itUrl` | `string \| null` | No | — |
| `allowInternet` | `boolean \| null` | No | — |
| `commands` | `object \| null` | No | — |

> [accordion] commands full type
>
> ```ts theme={null}
> {
>   windows?: string | null,
>   macos?: string | null,
>   linux?: string | null
> } | null
> ```

***

### privateNetworks.delete

`network.privateNetworks.delete`

Deletes a network and everything in it

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

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.delete({ network_id: 'net_2r8m5x' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### privateNetworks.deleteResource

`network.privateNetworks.deleteResource`

Deletes a resource and every grant to it

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

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.deleteResource({ resource_id: 'res_5n9q2b' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### privateNetworks.list

`network.privateNetworks.list`

Lists the account's networks

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `networks` | `object[] \| null` | No | — |

> [accordion] networks full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   createdAt?: string | null,
>   cutOff?: boolean | null,
>   status?: string | null,
>   statusDetail?: string | null | null,
>   allowsInternet?: boolean | null,
>   connectors?: {
>     id?: string | null,
>     hostname?: string | null,
>     connected?: boolean | null,
>     lastSeenAt?: string | null | null,
>     allow?: string[] | null,
>     allowsInternet?: boolean | null
>   }[] | null,
>   resources?: {
>     id?: string | null,
>     networkId?: string | null,
>     name?: string | null,
>     target?: string | null,
>     address?: string | null,
>     approved?: boolean | null
>   }[] | null
> }[] | null
> ```

***

### privateNetworks.update

`network.privateNetworks.update`

Renames a network or changes its cut off

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.privateNetworks.update({ network_id: 'net_2r8m5x' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `network_id` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |
| `status` | `string \| null` | No | — |
| `statusDetail` | `string \| null \| null` | No | — |
| `allowsInternet` | `boolean \| null` | No | — |
| `connectors` | `object[] \| null` | No | — |
| `resources` | `object[] \| null` | No | — |

> [accordion] connectors full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   connected?: boolean | null,
>   lastSeenAt?: string | null | null,
>   allow?: string[] | null,
>   allowsInternet?: boolean | null
> }[] | null
> ```

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   networkId?: string | null,
>   name?: string | null,
>   target?: string | null,
>   address?: string | null,
>   approved?: boolean | null
> }[] | null
> ```

***

### settings.get

`network.settings.get`

Get the account-wide network settings

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.settings.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cutOff` | `boolean \| null` | No | — |
| `allowFixed` | `boolean \| null` | No | — |
| `allowCountry` | `boolean \| null` | No | — |
| `allowThrough` | `boolean \| null` | No | — |
| `patientData` | `boolean \| null` | No | — |
| `hasOwnProxy` | `boolean \| null` | No | — |
| `countryDataCapGb` | `number \| null` | No | — |
| `fixedAddresses` | `object[] \| null` | No | — |

> [accordion] fixedAddresses full type
>
> ```ts theme={null}
> {
>   region?: string | null,
>   ip?: string | null | null,
>   status?: string | null
> }[] | null
> ```

***

### settings.update

`network.settings.update`

Changes the account-wide network settings that were given

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.settings.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `cutOff` | `boolean \| null` | No | — |
| `allowFixed` | `boolean \| null` | No | — |
| `allowCountry` | `boolean \| null` | No | — |
| `allowThrough` | `boolean \| null` | No | — |
| `patientData` | `boolean \| null` | No | — |
| `ownProxyUrl` | `string \| null` | No | — |
| `countryDataCapGb` | `number \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cutOff` | `boolean \| null` | No | — |
| `allowFixed` | `boolean \| null` | No | — |
| `allowCountry` | `boolean \| null` | No | — |
| `allowThrough` | `boolean \| null` | No | — |
| `patientData` | `boolean \| null` | No | — |
| `hasOwnProxy` | `boolean \| null` | No | — |
| `countryDataCapGb` | `number \| null` | No | — |
| `fixedAddresses` | `object[] \| null` | No | — |

> [accordion] fixedAddresses full type
>
> ```ts theme={null}
> {
>   region?: string | null,
>   ip?: string | null | null,
>   status?: string | null
> }[] | null
> ```

***

### workloads.get

`network.workloads.get`

Get a workload's network settings

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.workloads.get({ kind: 'agent', workload_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string` | Yes | — |
| `workload_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `workloadId` | `string \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |
| `internet` | `object \| null` | No | — |
| `exit` | `object \| null` | No | — |
| `exitIp` | `string \| null \| null` | No | — |
| `fixedAddress` | `object \| null` | No | — |
| `enforcement` | `string \| null` | No | — |
| `metadataUrl` | `string \| null` | No | — |
| `options` | `object \| null` | No | — |
| `access` | `string[] \| null` | No | — |
| `availableResources` | `object[] \| null` | No | — |

> [accordion] internet full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   presetId?: string | null | null,
>   allow?: string[] | null,
>   deny?: string[] | null
> } | null
> ```

> [accordion] exit full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   countryCode?: string | null | null,
>   state?: string | null | null,
>   city?: string | null | null,
>   session?: string | null | null,
>   throughNetworkId?: string | null | null
> } | null
> ```

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

> [accordion] options full type
>
> ```ts theme={null}
> {
>   presets?: {
>     id?: string | null,
>     name?: string | null,
>     allow?: string[] | null,
>     deny?: string[] | null,
>     builtIn?: boolean | null,
>     inUse?: number | null
>   }[] | null,
>   fixed?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     priceLabel?: string | null
>   } | null,
>   country?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     countries?: {
>       code?: string | null,
>       name?: string | null
>     }[] | null,
>     ownProxy?: boolean | null,
>     residential?: boolean | null,
>     states?: {
>       code?: string | null,
>       name?: string | null
>     }[] | null,
>     priceLabel?: string | null,
>     upfrontDueCents?: number | null
>   } | null,
>   through?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     networks?: {
>       id?: string | null,
>       name?: string | null
>     }[] | null
>   } | null
> } | null
> ```

> [accordion] availableResources full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   networkId?: string | null,
>   name?: string | null,
>   target?: string | null,
>   address?: string | null,
>   approved?: boolean | null
> }[] | null
> ```

***

### workloads.newIp

`network.workloads.newIp`

Starts a new sticky residential session, so the workload's next connection gets a new IP

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.workloads.newIp({ kind: 'agent', workload_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string` | Yes | — |
| `workload_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `workloadId` | `string \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |
| `internet` | `object \| null` | No | — |
| `exit` | `object \| null` | No | — |
| `exitIp` | `string \| null \| null` | No | — |
| `fixedAddress` | `object \| null` | No | — |
| `enforcement` | `string \| null` | No | — |
| `metadataUrl` | `string \| null` | No | — |
| `options` | `object \| null` | No | — |
| `access` | `string[] \| null` | No | — |
| `availableResources` | `object[] \| null` | No | — |

> [accordion] internet full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   presetId?: string | null | null,
>   allow?: string[] | null,
>   deny?: string[] | null
> } | null
> ```

> [accordion] exit full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   countryCode?: string | null | null,
>   state?: string | null | null,
>   city?: string | null | null,
>   session?: string | null | null,
>   throughNetworkId?: string | null | null
> } | null
> ```

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

> [accordion] options full type
>
> ```ts theme={null}
> {
>   presets?: {
>     id?: string | null,
>     name?: string | null,
>     allow?: string[] | null,
>     deny?: string[] | null,
>     builtIn?: boolean | null,
>     inUse?: number | null
>   }[] | null,
>   fixed?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     priceLabel?: string | null
>   } | null,
>   country?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     countries?: {
>       code?: string | null,
>       name?: string | null
>     }[] | null,
>     ownProxy?: boolean | null,
>     residential?: boolean | null,
>     states?: {
>       code?: string | null,
>       name?: string | null
>     }[] | null,
>     priceLabel?: string | null,
>     upfrontDueCents?: number | null
>   } | null,
>   through?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     networks?: {
>       id?: string | null,
>       name?: string | null
>     }[] | null
>   } | null
> } | null
> ```

> [accordion] availableResources full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   networkId?: string | null,
>   name?: string | null,
>   target?: string | null,
>   address?: string | null,
>   approved?: boolean | null
> }[] | null
> ```

***

### workloads.test

`network.workloads.test`

Tries one TCP connection from inside the workload and says what to fix when it fails

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.network.workloads.test({ kind: 'agent', workload_id: 'ag_3k9x2m7q', destination: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string` | Yes | — |
| `workload_id` | `string` | Yes | — |
| `destination` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `destination` | `string \| null` | No | — |
| `reached` | `boolean \| null` | No | — |
| `durationMs` | `number \| null \| null` | No | — |
| `reason` | `string \| null \| null` | No | — |

***

### workloads.update

`network.workloads.update`

Changes the resources a workload may reach, its internet policy, its exit, or its cut off

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.network.workloads.update({ kind: 'agent', workload_id: 'ag_3k9x2m7q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string` | Yes | — |
| `workload_id` | `string` | Yes | — |
| `access` | `string[] \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |
| `internet` | `object \| null` | No | — |
| `exit` | `object \| null` | No | — |

> [accordion] internet full type
>
> ```ts theme={null}
> {
>   mode?: all | none | list,
>   presetId?: string | null,
>   allow?: string[],
>   deny?: string[]
> } | null
> ```

> [accordion] exit full type
>
> ```ts theme={null}
> {
>   mode?: shared | fixed | country | through,
>   countryCode?: string | null,
>   state?: string | null,
>   city?: string | null,
>   session?: sticky | rotating | null,
>   throughNetworkId?: string | null
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `workloadId` | `string \| null` | No | — |
| `cutOff` | `boolean \| null` | No | — |
| `internet` | `object \| null` | No | — |
| `exit` | `object \| null` | No | — |
| `exitIp` | `string \| null \| null` | No | — |
| `fixedAddress` | `object \| null` | No | — |
| `enforcement` | `string \| null` | No | — |
| `metadataUrl` | `string \| null` | No | — |
| `options` | `object \| null` | No | — |
| `access` | `string[] \| null` | No | — |
| `availableResources` | `object[] \| null` | No | — |

> [accordion] internet full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   presetId?: string | null | null,
>   allow?: string[] | null,
>   deny?: string[] | null
> } | null
> ```

> [accordion] exit full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   countryCode?: string | null | null,
>   state?: string | null | null,
>   city?: string | null | null,
>   session?: string | null | null,
>   throughNetworkId?: string | null | null
> } | null
> ```

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

> [accordion] options full type
>
> ```ts theme={null}
> {
>   presets?: {
>     id?: string | null,
>     name?: string | null,
>     allow?: string[] | null,
>     deny?: string[] | null,
>     builtIn?: boolean | null,
>     inUse?: number | null
>   }[] | null,
>   fixed?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     priceLabel?: string | null
>   } | null,
>   country?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     countries?: {
>       code?: string | null,
>       name?: string | null
>     }[] | null,
>     ownProxy?: boolean | null,
>     residential?: boolean | null,
>     states?: {
>       code?: string | null,
>       name?: string | null
>     }[] | null,
>     priceLabel?: string | null,
>     upfrontDueCents?: number | null
>   } | null,
>   through?: {
>     available?: boolean | null,
>     reason?: string | null | null,
>     networks?: {
>       id?: string | null,
>       name?: string | null
>     }[] | null
>   } | null
> } | null
> ```

> [accordion] availableResources full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   networkId?: string | null,
>   name?: string | null,
>   target?: string | null,
>   address?: string | null,
>   approved?: boolean | null
> }[] | null
> ```

***

## Notifications

### list

`notifications.list`

List the account's notifications

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.notifications.list({});
```

**Input:** *empty object*

**Output:** `any`

***

### markRead

`notifications.markRead`

Mark one notification read

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.notifications.markRead({ notification_id: 'ntf_8q4m1c' });
```

**Input**

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

**Output:** `any`

***

### readAll

`notifications.readAll`

Mark every notification read

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.notifications.readAll({});
```

**Input:** *empty object*

**Output:** `any`

***

### unreadCount

`notifications.unreadCount`

Count unread notifications

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.notifications.unreadCount({});
```

**Input:** *empty object*

**Output:** `any`

***

## Organizations

### create

`organizations.create`

Create the caller's organization: their account, shared with the people they invite

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.organizations.create({ name: 'build-42' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |

***

### delete

`organizations.delete`

Delete the organization

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

```ts theme={null}
await corsair.maritime.api.organizations.delete({ organization_id: 'org_4t7m1z' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### invites.accept

`organizations.invites.accept`

Accept an invite as the signed in person

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

```ts theme={null}
await corsair.maritime.api.organizations.invites.accept({ token: 'tok_example' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization` | `object \| null` | No | — |

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

***

### invites.create

`organizations.invites.create`

Invite one email

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

```ts theme={null}
await corsair.maritime.api.organizations.invites.create({ organization_id: 'org_4t7m1z', email: 'ops@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | Yes | — |
| `email` | `string` | Yes | — |
| `role` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |
| `invitedBy` | `string \| null` | No | — |
| `invitedByName` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |
| `link` | `string \| null \| null` | No | — |

***

### invites.list

`organizations.invites.list`

List an organization's open invites

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.organizations.invites.list({ organization_id: 'org_4t7m1z' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   email?: string | null,
>   role?: string | null,
>   invitedBy?: string | null,
>   invitedByName?: string | null | null,
>   createdAt?: string | null,
>   expiresAt?: string | null,
>   link?: string | null | null
> }[]
> ```

***

### invites.preview

`organizations.invites.preview`

Who invited you where

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.organizations.invites.preview({ token: 'tok_example' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `organizationId` | `string \| null` | No | — |
| `organizationName` | `string \| null` | No | — |
| `inviterName` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |

***

### invites.resend

`organizations.invites.resend`

Email an organization invite again

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

```ts theme={null}
await corsair.maritime.api.organizations.invites.resend({ organization_id: 'org_4t7m1z', invite_id: 'inv_2w8n5r' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | Yes | — |
| `invite_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |
| `invitedBy` | `string \| null` | No | — |
| `invitedByName` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `expiresAt` | `string \| null` | No | — |
| `link` | `string \| null \| null` | No | — |

***

### invites.revoke

`organizations.invites.revoke`

Revoke an organization invite

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

```ts theme={null}
await corsair.maritime.api.organizations.invites.revoke({ organization_id: 'org_4t7m1z', invite_id: 'inv_2w8n5r' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | Yes | — |
| `invite_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### leave

`organizations.leave`

Leave an organization

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

```ts theme={null}
await corsair.maritime.api.organizations.leave({ organization_id: 'org_4t7m1z' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### me

`organizations.me`

The person, the organization they act in, the one they own, and the others they belong to

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.organizations.me({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `userId` | `string \| null` | No | — |
| `enabled` | `boolean \| null` | No | — |
| `organization` | `object \| null` | No | — |
| `own` | `object \| null` | No | — |
| `memberships` | `object[] \| null` | No | — |

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

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

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

***

### members.changeRole

`organizations.members.changeRole`

Change a member's role in an organization

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.organizations.members.changeRole({ organization_id: 'org_4t7m1z', user_id: 'usr_9c3x6k', role: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | Yes | — |
| `user_id` | `string` | Yes | — |
| `role` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `userId` | `string \| null` | No | — |
| `name` | `string \| null \| null` | No | — |
| `email` | `string \| null \| null` | No | — |
| `role` | `string \| null` | No | — |
| `joinedAt` | `string \| null` | No | — |

***

### members.list

`organizations.members.list`

List an organization's members

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.organizations.members.list({ organization_id: 'org_4t7m1z' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   userId?: string | null,
>   name?: string | null | null,
>   email?: string | null | null,
>   role?: string | null,
>   joinedAt?: string | null
> }[]
> ```

***

### members.remove

`organizations.members.remove`

Remove a member

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

```ts theme={null}
await corsair.maritime.api.organizations.members.remove({ organization_id: 'org_4t7m1z', user_id: 'usr_9c3x6k' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | Yes | — |
| `user_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### rename

`organizations.rename`

Rename the organization

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.organizations.rename({ organization_id: 'org_4t7m1z', name: 'build-42' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `organization_id` | `string` | Yes | — |
| `name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |

***

## Plans

### cancel

`plans.cancel`

Cancel at period end (Stripe cancel\_at\_period\_end)

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

```ts theme={null}
await corsair.maritime.api.plans.cancel({});
```

**Input**

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

**Output:** `any`

***

### launchPromo

`plans.launchPromo`

Public: whether the launch credit (\$100 of AI credits for the first paid plans) is still open and how many spots remain

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.plans.launchPromo({});
```

**Input:** *empty object*

**Output:** `any`

***

### list

`plans.list`

The catalog plus this account's plan state

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.plans.list({});
```

**Input:** *empty object*

**Output:** `any`

***

### portal

`plans.portal`

Stripe Customer Portal session: update the card, browse invoices

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.plans.portal({});
```

**Input**

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

**Output:** `any`

***

### subscribe

`plans.subscribe`

Start a plan (returns a Stripe Checkout URL that collects the card), or switch/resume in place when a live subscription exists

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.plans.subscribe({ plan: 'example' });
```

**Input**

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

**Output:** `any`

***

## Preferences

### get

`preferences.get`

Get the signed-in user's preferences

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.preferences.get({});
```

**Input:** *empty object*

**Output**

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

***

### update

`preferences.update`

Update the signed-in user's preferences

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.preferences.update({});
```

**Input**

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

**Output**

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

***

## Projects

### bindings.list

`projects.bindings.list`

List a project's bindings of end users to agent instances

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.bindings.list({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output:** `any`

***

### bindings.reassign

`projects.bindings.reassign`

Move a binding to another agent instance

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.projects.bindings.reassign({ project_id: 'prj_5t8w1c', binding_id: 'bnd_5k2v8x', agentId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `binding_id` | `string` | Yes | — |
| `agentId` | `string` | Yes | — |

**Output:** `any`

***

### bindings.unbind

`projects.bindings.unbind`

Remove a binding from a project

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

```ts theme={null}
await corsair.maritime.api.projects.bindings.unbind({ project_id: 'prj_5t8w1c', binding_id: 'bnd_5k2v8x' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `binding_id` | `string` | Yes | — |

**Output:** `any`

***

### claimCodes.create

`projects.claimCodes.create`

Create claim codes end users redeem to get their own agent instance

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.projects.claimCodes.create({ project_id: 'prj_5t8w1c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `count` | `number` | No | — |
| `targetAgentId` | `string \| null` | No | — |
| `expiresInHours` | `number \| null` | No | — |

**Output:** `any`

***

### claimCodes.list

`projects.claimCodes.list`

List a project's claim codes

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.claimCodes.list({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output:** `any`

***

### get

`projects.get`

Get one project (a front door that gives each end user an agent instance)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.get({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `baseAgentId` | `string \| null \| null` | No | — |
| `newChatPolicy` | `string \| null` | No | — |
| `maxInstances` | `number \| null` | No | — |
| `warmPoolSize` | `number \| null` | No | — |
| `instanceComputeMinutesLimit` | `number \| null \| null` | No | — |
| `warmReady` | `number \| null` | No | — |
| `instances` | `object[] \| null` | No | — |
| `channels` | `object[] \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   projectRole?: string | null | null,
>   bindingCount?: number | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   channelType?: string | null,
>   botUsername?: string | null | null,
>   webhookUrl?: string | null | null,
>   enabled?: boolean | null,
>   bindingCount?: number | null
> }[] | null
> ```

***

### list

`projects.list`

The user's projects with rollups: the primary list surface

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.list({});
```

**Input:** *empty object*

**Output:** `any`

***

### messages.get

`projects.messages.get`

Get a message sent to a project and its reply

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.messages.get({ project_id: 'prj_5t8w1c', message_id: 'msg_9n3c5k' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `message_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `messageId` | `string \| null` | No | — |
| `externalUserId` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `reply` | `string \| null \| null` | No | — |
| `error` | `string \| null \| null` | No | — |
| `userCreated` | `boolean \| null` | No | — |
| `metadata` | `object \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `repliedAt` | `string \| null \| null` | No | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null | null
> ```

***

### messages.send

`projects.messages.send`

Send a message to an end user's agent through a project

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

```ts theme={null}
await corsair.maritime.api.projects.messages.send({ project_id: 'prj_5t8w1c', externalUserId: 'example', message: 'Summarize today' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `idempotency_key` | `string` | No | Idempotency-Key header: a retry with the same key returns what this key already did instead of doing it again. Leave it out and the plugin sends a new random key. |
| `externalUserId` | `string` | Yes | The caller's own end-user id (opaque to Maritime) |
| `message` | `string` | Yes | — |
| `wait` | `number` | No | Seconds to wait for the reply inline; 0 = ack immediately |
| `claimCode` | `string \| null` | No | Claim code, for projects with new\_chat\_policy=claim |
| `displayName` | `string \| null` | No | — |
| `metadata` | `object \| null` | No | Opaque passthrough, echoed on reads and reply webhooks |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

**Output:** `any`

***

### syncInstances

`projects.syncInstances`

Push a project's source agent env to every instance and reload them

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.projects.syncInstances({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output:** `any`

***

### telegram.connect

`projects.telegram.connect`

Point a Telegram bot at this project: validate via getMe, register the webhook, upsert the channel row

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.projects.telegram.connect({ project_id: 'prj_5t8w1c', botToken: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `botToken` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `channelType` | `string \| null` | No | — |
| `botUsername` | `string \| null \| null` | No | — |
| `webhookUrl` | `string \| null \| null` | No | — |
| `enabled` | `boolean \| null` | No | — |
| `bindingCount` | `number \| null` | No | — |

***

### telegram.disconnect

`projects.telegram.disconnect`

Disconnect a project's Telegram bot

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

```ts theme={null}
await corsair.maritime.api.projects.telegram.disconnect({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output:** `any`

***

### update

`projects.update`

Update a project's settings

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.projects.update({ project_id: 'prj_5t8w1c' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `name` | `string \| null` | No | — |
| `newChatPolicy` | `string \| null` | No | — |
| `maxInstances` | `number \| null` | No | — |
| `warmPoolSize` | `number \| null` | No | — |
| `instanceComputeMinutesLimit` | `number \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `baseAgentId` | `string \| null \| null` | No | — |
| `newChatPolicy` | `string \| null` | No | — |
| `maxInstances` | `number \| null` | No | — |
| `warmPoolSize` | `number \| null` | No | — |
| `instanceComputeMinutesLimit` | `number \| null \| null` | No | — |
| `warmReady` | `number \| null` | No | — |
| `instances` | `object[] \| null` | No | — |
| `channels` | `object[] \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   status?: string | null,
>   projectRole?: string | null | null,
>   bindingCount?: number | null,
>   lastActiveAt?: string | null | null
> }[] | null
> ```

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   channelType?: string | null,
>   botUsername?: string | null | null,
>   webhookUrl?: string | null | null,
>   enabled?: boolean | null,
>   bindingCount?: number | null
> }[] | null
> ```

***

### usage

`projects.usage`

Get what each end user's agent instance cost over the last 30 days

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.usage({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output:** `any`

***

### users.get

`projects.users.get`

Get one end user of a project and their agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.users.get({ project_id: 'prj_5t8w1c', external_user_id: 'customer-481' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `external_user_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `externalUserId` | `string \| null` | No | — |
| `agentId` | `string \| null` | No | — |
| `agentStatus` | `string \| null \| null` | No | — |
| `displayName` | `string \| null \| null` | No | — |
| `messageCount` | `number \| null` | No | — |
| `lastActiveAt` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

***

### users.list

`projects.users.list`

The project's end-user list: every identity bound via the HTTP front door

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.projects.users.list({ project_id: 'prj_5t8w1c' });
```

**Input**

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   externalUserId?: string | null,
>   agentId?: string | null,
>   agentStatus?: string | null | null,
>   displayName?: string | null | null,
>   messageCount?: number | null,
>   lastActiveAt?: string | null | null,
>   createdAt?: string | null
> }[]
> ```

***

### users.unbind

`projects.users.unbind`

Unbind an end-user

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

```ts theme={null}
await corsair.maritime.api.projects.users.unbind({ project_id: 'prj_5t8w1c', external_user_id: 'customer-481' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_id` | `string` | Yes | — |
| `external_user_id` | `string` | Yes | — |
| `delete_agent` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

## Sandboxes

### code.run

`sandboxes.code.run`

Run python in a persistent kernel on a code-interpreter sandbox

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.sandboxes.code.run({ sandbox_id: 'sbx-k3m7q2ab', code: 'print(1 + 1)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `code` | `string` | Yes | The code to run. |
| `language` | `python` | No | 'python' (the only language). |
| `context` | `string` | No | A kernel context name; calls without one share the default context. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results` | `object[] \| null` | No | — |
| `logs` | `object \| null` | No | — |
| `error` | `object \| null` | No | — |
| `executionCount` | `number \| null \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

> [accordion] logs full type
>
> ```ts theme={null}
> {
>   stdout?: string[] | null,
>   stderr?: string[] | null
> } | null
> ```

> [accordion] error full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   value?: string | null,
>   traceback?: string | null
> } | null | null
> ```

***

### commands.get

`sandboxes.commands.get`

Get a command and its output

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.commands.get({ sandbox_id: 'sbx-k3m7q2ab', command_id: 'cmd_2b7x9k' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `command_id` | `string` | Yes | The command id from sandboxes.commands.run. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `sandboxId` | `string \| null` | No | — |
| `cmd` | `string \| string[] \| null` | No | — |
| `cwd` | `string \| null` | No | — |
| `background` | `boolean \| null` | No | — |
| `state` | `string \| null` | No | 'running', 'exited' or 'killed'. |
| `exitCode` | `number \| null \| null` | No | — |
| `signal` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `endedAt` | `string \| null \| null` | No | — |
| `stdout` | `string \| null` | No | The first 1 MiB of output. |
| `stderr` | `string \| null` | No | — |
| `truncated` | `boolean \| null` | No | — |

***

### commands.history

`sandboxes.commands.history`

Get `{ data }` with recent commands from the host, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.commands.history({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | — |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

### commands.kill

`sandboxes.commands.kill`

Kill a running command in a virtual machine (SIGTERM, then SIGKILL after 10 s)

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

```ts theme={null}
await corsair.maritime.api.sandboxes.commands.kill({ sandbox_id: 'sbx-k3m7q2ab', command_id: 'cmd_2b7x9k' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `command_id` | `string` | Yes | The command id. |
| `signal` | `SIGTERM \| SIGKILL` | No | SIGTERM (default; SIGKILL follows after 10 seconds) or SIGKILL. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `sandboxId` | `string \| null` | No | — |
| `cmd` | `string \| string[] \| null` | No | — |
| `cwd` | `string \| null` | No | — |
| `background` | `boolean \| null` | No | — |
| `state` | `string \| null` | No | 'running', 'exited' or 'killed'. |
| `exitCode` | `number \| null \| null` | No | — |
| `signal` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `endedAt` | `string \| null \| null` | No | — |
| `stdout` | `string \| null` | No | The first 1 MiB of output. |
| `stderr` | `string \| null` | No | — |
| `truncated` | `boolean \| null` | No | — |

***

### commands.run

`sandboxes.commands.run`

Run a command in a virtual machine and get exitCode, stdout and stderr (or a command id with background)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.sandboxes.commands.run({ sandbox_id: 'sbx-k3m7q2ab', cmd: 'uname -a', timeoutSeconds: 30 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `cmd` | `string \| string[]` | Yes | A string runs through /bin/sh -c; an array runs as argv with no shell. |
| `cwd` | `string` | No | Absolute working directory. Default: the home directory of 'user'. |
| `env` | `Record<string, string>` | No | Extra environment variables. |
| `stdin` | `string` | No | UTF-8 text sent to the process, then stdin closes. |
| `background` | `boolean` | No | true returns at once with the command id (read it with sandboxes.commands.get); false (default) waits for the exit. |
| `timeoutSeconds` | `number` | No | Kill the command after this long, 1 to 3,600. Default 60 in the foreground, none in the background. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `sandboxId` | `string \| null` | No | — |
| `cmd` | `string \| string[] \| null` | No | — |
| `cwd` | `string \| null` | No | — |
| `background` | `boolean \| null` | No | — |
| `state` | `string \| null` | No | 'running', 'exited' or 'killed'. |
| `exitCode` | `number \| null \| null` | No | — |
| `signal` | `string \| null \| null` | No | — |
| `startedAt` | `string \| null` | No | — |
| `endedAt` | `string \| null \| null` | No | — |
| `stdout` | `string \| null` | No | The first 1 MiB of output. |
| `stderr` | `string \| null` | No | — |
| `truncated` | `boolean \| null` | No | — |

***

### create

`sandboxes.create`

Create a virtual machine (sbx-...) from a snapshot, template or image, or return the live one with the same name; billed per second while running

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.sandboxes.create({
	name: 'build-42',
	size: 'small',
	idleTimeoutSeconds: 300,
	onIdle: 'kill',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | A name; creating with a name a live sandbox already has returns that sandbox. |
| `from` | `string` | No | What to start from: a saved snapshot name, a stock or customer template name, or a public OCI image. Default 'base'. |
| `size` | `small \| medium \| large \| xlarge` | No | A size preset: small (default), medium, large or xlarge. vcpu, memoryMib and diskGib override its values. |
| `vcpu` | `number` | No | vCPUs, 1 to 16. |
| `memoryMib` | `number` | No | Memory in MiB: 1,024 to 65,536, whole GiB. |
| `diskGib` | `number` | No | Disk in GiB, 5 to 500. |
| `screen` | `none \| linux` | No | 'linux' gives the sandbox a desktop screen (see sandboxes.createScreenViewer). |
| `network` | `object` | No | Outbound network policy. |
| `endUser` | `string` | No | Your end user's id, for per-user caps and usage. |
| `forEndUser` | `boolean` | No | Count the sandbox against the end user (endUser) rather than the account. |
| `env` | `Record<string, string>` | No | Environment variables for every command. |
| `metadata` | `Record<string, string>` | No | Your own string labels; sandboxes.list filters on them. |
| `idleTimeoutSeconds` | `number` | No | Seconds without activity before onIdle acts, 60 to 86,400. Default 300. |
| `onIdle` | `pause \| kill` | No | What going idle does: 'pause' (default) or 'kill'. |
| `timeLimitSeconds` | `number` | No | Kills the sandbox this long after it starts running, whatever its activity: 60 to 86,400. |
| `keepAwake` | `boolean` | No | Never pause or end for idleness. |
| `failFast` | `boolean` | No | Fail at once when there is no capacity instead of waiting. |

> [accordion] network full type
>
> ```ts theme={null}
> {
>   egress: all | none | allowlist,
>   hosts?: string[]
> }
> ```

**Output:** `any`

***

### createScreenViewer

`sandboxes.createScreenViewer`

Get `{ url }` of a screen viewer that works for one hour

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxes.createScreenViewer({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### createUrl

`sandboxes.createUrl`

Get `{ url }` for one port, private with the URL token or public

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxes.createUrl({ sandbox_id: 'sbx-k3m7q2ab', port: 3000 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | — |
| `port` | `number` | Yes | The port a server in the sandbox listens on. |
| `token` | `boolean` | No | true (default): the URL carries the sandbox urlToken and the port stays private. false makes the port public. |

**Output:** `any`

***

### ephemeral.create

`sandboxes.ephemeral.create`

Create a virtual machine that ends with its disk after idleMinutes without activity or at timeLimitMinutes; billed per second

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.sandboxes.ephemeral.create({ name: 'job-42', idleMinutes: 5, timeLimitMinutes: 30 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | A name; creating with a name a live sandbox already has returns that sandbox. |
| `from` | `string` | No | What to start from: a saved snapshot name, a stock or customer template name, or a public OCI image. Default 'base'. |
| `size` | `small \| medium \| large \| xlarge` | No | A size preset: small (default), medium, large or xlarge. vcpu, memoryMib and diskGib override its values. |
| `vcpu` | `number` | No | vCPUs, 1 to 16. |
| `memoryMib` | `number` | No | Memory in MiB: 1,024 to 65,536, whole GiB. |
| `diskGib` | `number` | No | Disk in GiB, 5 to 500. |
| `screen` | `none \| linux` | No | 'linux' gives the sandbox a desktop screen (see sandboxes.createScreenViewer). |
| `network` | `object` | No | Outbound network policy. |
| `endUser` | `string` | No | Your end user's id, for per-user caps and usage. |
| `forEndUser` | `boolean` | No | Count the sandbox against the end user (endUser) rather than the account. |
| `env` | `Record<string, string>` | No | Environment variables for every command. |
| `metadata` | `Record<string, string>` | No | Your own string labels; sandboxes.list filters on them. |
| `idleMinutes` | `number` | No | Minutes without activity before the sandbox ends: 1 to 60. Default 5. |
| `timeLimitMinutes` | `number` | No | Minutes until the sandbox ends whatever its activity: 5 to 1440. Default 1440. |
| `onIdle` | `kill \| pause` | No | What going idle does: 'kill' (default) or 'pause'. |

> [accordion] network full type
>
> ```ts theme={null}
> {
>   egress: all | none | allowlist,
>   hosts?: string[]
> }
> ```

**Output:** `any`

***

### ephemeral.extend

`sandboxes.ephemeral.extend`

Restarts the sandbox's time limit from now: `timeLimitMinutes` (or `lifetimeMinutes`) more

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.sandboxes.ephemeral.extend({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | — |
| `timeLimitMinutes` | `number` | No | Minutes from now until the time limit ends the sandbox: 5 to 1440. Default 1440. |

**Output:** `any`

***

### ephemeral.kill

`sandboxes.ephemeral.kill`

Ends the sandbox now

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

```ts theme={null}
await corsair.maritime.api.sandboxes.ephemeral.kill({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### ephemeral.list

`sandboxes.ephemeral.list`

Lists the sandboxes that have not ended, newest first, as `{ sandboxes, nextCursor }`

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.ephemeral.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

### files.delete

`sandboxes.files.delete`

Remove a file, or a directory with recursive

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

```ts theme={null}
await corsair.maritime.api.sandboxes.files.delete({ sandbox_id: 'sbx-k3m7q2ab', path: '/home/user/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `path` | `string` | Yes | Absolute path. |
| `recursive` | `boolean` | No | Remove a directory and everything in it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### files.list

`sandboxes.files.list`

List one directory of a sandbox (not recursive)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.files.list({ sandbox_id: 'sbx-k3m7q2ab', path: '/home/user' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `path` | `string` | Yes | Absolute path of the directory. |

**Output**

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

> [accordion] data full type
>
> ```ts theme={null}
> {
>   path?: string | null,
>   type?: string | null,
>   sizeBytes?: number | null,
>   modifiedAt?: string | null
> }[] | null
> ```

***

### files.read

`sandboxes.files.read`

Read a file from a virtual machine's disk (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.files.read({ sandbox_id: 'sbx-k3m7q2ab', path: '/home/user/notes.md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `path` | `string` | Yes | Absolute path of the file. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### files.write

`sandboxes.files.write`

Create or replace a file on a sandbox's disk

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxes.files.write({ sandbox_id: 'sbx-k3m7q2ab', path: '/home/user/notes.md', content: 'hello from Corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | The sandbox id (sbx-...) or name. The plugin reads its data plane URL and secret first. |
| `path` | `string` | Yes | Absolute path; parent directories are created. |
| `content` | `string` | Yes | The file content: UTF-8 text, or base64 when encoding is base64. |
| `encoding` | `utf8 \| base64` | No | How content is written: 'utf8' (default) or 'base64' for binary data. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### get

`sandboxes.get`

Get one sandbox by id or name

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.get({ id_or_name: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### info

`sandboxes.info`

Get Sandbox info read from the host

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.info({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### kill

`sandboxes.kill`

End a virtual machine and delete its disk

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

```ts theme={null}
await corsair.maritime.api.sandboxes.kill({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### list

`sandboxes.list`

Lists the account's sandboxes, newest first, as `{ data, nextCursor }`

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.list({
	state: ['running'],
	limit: 20,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `(starting \| running \| pausing \| paused \| resuming \| ended)[]` | No | Only sandboxes in these states. |
| `namePrefix` | `string` | No | Only sandboxes whose name starts with this. |
| `endUser` | `string` | No | Only sandboxes of this end user. |
| `metadata` | `Record<string, string>` | No | Only sandboxes with these metadata values (sent as metadata\[key]=value). |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

### pause

`sandboxes.pause`

Pauses the sandbox and returns it once paused

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxes.pause({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### promote

`sandboxes.promote`

Promote a virtual machine to a kept agent box (Maritime answers 501 promote\_unavailable in API version 1)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.sandboxes.promote({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### rotateSecret

`sandboxes.rotateSecret`

Replaces the sandbox secret and URL token and returns the Sandbox object

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

```ts theme={null}
await corsair.maritime.api.sandboxes.rotateSecret({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

### save

`sandboxes.save`

Saves a snapshot of the sandbox under `name`

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxes.save({ sandbox_id: 'sbx-k3m7q2ab', name: 'build-42' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | — |
| `name` | `string` | Yes | The snapshot name: pass it as from to sandboxes.create. |

**Output:** `any`

***

### update

`sandboxes.update`

Changes metadata, the idle timer, keepAwake, or the network policy

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxes.update({
	sandbox_id: 'sbx-k3m7q2ab',
	network: { egress: 'all' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox_id` | `string` | Yes | — |
| `metadata` | `Record<string, string>` | No | Replaces the metadata labels. |
| `idleTimeoutSeconds` | `number` | No | Seconds without activity before onIdle acts. |
| `keepAwake` | `boolean` | No | Never pause or end for idleness. |
| `network` | `object` | No | Outbound network policy. |

> [accordion] network full type
>
> ```ts theme={null}
> {
>   egress: all | none | allowlist,
>   hosts?: string[]
> }
> ```

**Output:** `any`

***

### usage

`sandboxes.usage`

Get what the sandbox uses now, measured by its host

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxes.usage({ sandbox_id: 'sbx-k3m7q2ab' });
```

**Input**

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

**Output:** `any`

***

## Sandbox Keys

### create

`sandboxKeys.create`

Creates a per-sandbox key; the secret is returned only here

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

```ts theme={null}
await corsair.maritime.api.sandboxKeys.create({ sandbox: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox` | `string` | Yes | The sandbox id the key is for. |
| `ttlSeconds` | `number` | No | Lifetime, 60 to 2,592,000 seconds. Default 86,400. |

**Output:** `any`

***

### list

`sandboxKeys.list`

Lists per-sandbox keys without secrets

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxKeys.list({ sandbox: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sandbox` | `string` | Yes | The sandbox id. |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

### revoke

`sandboxKeys.revoke`

Revokes a per-sandbox key and rotates its sandbox's secrets

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

```ts theme={null}
await corsair.maritime.api.sandboxKeys.revoke({ key_id: 'key_1m9x4c' });
```

**Input**

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

**Output:** `any`

***

## Sandbox Webhooks

### create

`sandboxWebhooks.create`

Register an https URL for virtual machine events (the signing secret is returned once)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.sandboxWebhooks.create({
	url: 'https://example.com/maritime/sandbox-events',
	events: ['sandbox.ended', 'sandbox.error'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | An https URL. |
| `events` | `(sandbox.created \| sandbox.running \| sandbox.paused \| sandbox.resumed \| sandbox.ended \| sandbox.pause_failed \| sandbox.error)[]` | Yes | At least one event type. |

**Output:** `any`

***

### delete

`sandboxWebhooks.delete`

Deletes a webhook endpoint

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

```ts theme={null}
await corsair.maritime.api.sandboxWebhooks.delete({ webhook_id: 'whk_1c5v7n' });
```

**Input**

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

**Output:** `any`

***

### deliveries

`sandboxWebhooks.deliveries`

Lists one endpoint's deliveries from the last 30 days

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxWebhooks.deliveries({ webhook_id: 'whk_1c5v7n' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhook_id` | `string` | Yes | — |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

### list

`sandboxWebhooks.list`

Lists webhook endpoints without secrets, paged

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.sandboxWebhooks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

## Secrets

### delete

`secrets.delete`

Deletes an account secret

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

```ts theme={null}
await corsair.maritime.api.secrets.delete({ name: 'build-42' });
```

**Input**

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

**Output:** `any`

***

### list

`secrets.list`

Lists account secret names, paged

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.secrets.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

### set

`secrets.set`

Creates or replaces an account secret

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.secrets.set({ name: 'build-42', value: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `value` | `string` | Yes | The secret value, at most 32 KiB. Never returned. |

**Output:** `any`

***

## Servers

### list

`servers.list`

The swarm servers, whether each is free, yours or rented by someone else, and your open lease

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.servers.list({});
```

**Input:** *empty object*

**Output:** `any`

***

### release

`servers.release`

Release the rented swarm server; billing stops and every virtual machine on it ends

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

```ts theme={null}
await corsair.maritime.api.servers.release({});
```

**Input:** *empty object*

**Output:** `any`

***

### rent

`servers.rent`

Rent a whole swarm server for this account (\$1 a minute while rented, billed per second)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.servers.rent({});
```

**Input:** *empty object*

**Output:** `any`

***

## Snapshots

### delete

`snapshots.delete`

Deletes a saved snapshot

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

```ts theme={null}
await corsair.maritime.api.snapshots.delete({ name: 'build-42' });
```

**Input**

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

**Output:** `any`

***

### get

`snapshots.get`

Get one saved snapshot or stock template

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.snapshots.get({ name: 'build-42' });
```

**Input**

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

**Output:** `any`

***

### list

`snapshots.list`

Lists saved snapshots and stock templates

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.snapshots.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

## Stripe

### createPortalSession

`stripe.createPortalSession`

Create a Stripe Customer Portal session

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.stripe.createPortalSession({});
```

**Input:** *empty object*

**Output**

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

***

### invoices

`stripe.invoices`

List invoices for the current user, each labeled with its product

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.stripe.invoices({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stripeInvoiceId?: string | null,
>   product?: string | null | null,
>   amountPaid?: number | null,
>   currency?: string | null,
>   status?: string | null,
>   invoicePdfUrl?: string | null | null,
>   hostedInvoiceUrl?: string | null | null,
>   amountDue?: number | null | null,
>   paymentFailed?: boolean | null | null,
>   billingPeriodStart?: string | null | null,
>   billingPeriodEnd?: string | null | null,
>   paidAt?: string | null | null,
>   createdAt?: string | null
> }[]
> ```

***

### paymentMethods

`stripe.paymentMethods`

List payment methods for the current user

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.stripe.paymentMethods({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   type?: string | null,
>   cardBrand?: string | null | null,
>   cardLast4?: string | null | null,
>   cardExpMonth?: number | null | null,
>   cardExpYear?: number | null | null,
>   isDefault?: boolean | null
> }[]
> ```

***

### subscriptions.cancel

`stripe.subscriptions.cancel`

Cancel a subscription

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

```ts theme={null}
await corsair.maritime.api.stripe.subscriptions.cancel({ subscription_id: 'sub_2x6m8q' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subscription_id` | `string` | Yes | — |
| `immediate` | `boolean` | No | — |

**Output:** `any`

***

### subscriptions.list

`stripe.subscriptions.list`

List subscriptions for the current user

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.stripe.subscriptions.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agentId?: string | null,
>   agentName?: string | null | null,
>   tier?: string | null,
>   status?: string | null,
>   cancelAtPeriodEnd?: boolean | null,
>   currentPeriodStart?: string | null | null,
>   currentPeriodEnd?: string | null | null,
>   canceledAt?: string | null | null
> }[]
> ```

***

## Swarms

### cancel

`swarms.cancel`

Cancel swarm

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

```ts theme={null}
await corsair.maritime.api.swarms.cancel({ swarm_id: 'swm_8d2k4p' });
```

**Input**

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

**Output:** `any`

***

### create

`swarms.create`

Start a swarm: many virtual machines running one command on a rented swarm server (\$1 a minute while rented; Scale plan and up)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.swarms.create({
	command: 'example',
	size: { vcpus: 1 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idempotency_key` | `string` | No | Idempotency-Key header: a retry with the same key returns what this key already did instead of doing it again. Leave it out and the plugin sends a new random key. |
| `name` | `string \| null` | No | — |
| `template` | `string \| null` | No | — |
| `image` | `string \| null` | No | — |
| `size` | `object` | No | — |
| `count` | `number \| null` | No | — |
| `command` | `string \| string[]` | Yes | — |
| `inputs` | `object[] \| null` | No | — |
| `timeoutSeconds` | `number` | No | — |
| `concurrency` | `number \| null` | No | — |
| `resultPath` | `string \| null` | No | — |
| `idempotencyKey` | `string \| null` | No | — |

> [accordion] size full type
>
> ```ts theme={null}
> {
>   vcpus?: number,
>   memoryGb?: number
> }
> ```

> [accordion] inputs full type
>
> ```ts theme={null}
> {
>   args?: string[],
>   env?: Record<string, string>,
>   files?: Record<string, string>
> }[] | null
> ```

**Output:** `any`

***

### get

`swarms.get`

One run with every sandbox's status, exit code and output tail

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.swarms.get({ swarm_id: 'swm_8d2k4p' });
```

**Input**

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

**Output:** `any`

***

### getAccess

`swarms.getAccess`

Whether the account may start swarms, and when it asked for access

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.swarms.getAccess({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### list

`swarms.list`

The account's runs, newest first, with progress and cost

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.swarms.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |

**Output:** *empty object*

***

### requestAccess

`swarms.requestAccess`

Asks for Swarms

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.swarms.requestAccess({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### results

`swarms.results`

Every sandbox's outcome as JSON Lines, one sandbox per line, in input order

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.swarms.results({ swarm_id: 'swm_8d2k4p' });
```

**Input**

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

**Output:** `any`

***

## Templates

### create

`templates.create`

Registers a customer template and starts its build (201, usually `building`)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.templates.create({ name: 'build-42' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The template name; pass it as from to sandboxes.create. |
| `image` | `string` | No | A public image reference. Give image or dockerfile, not both. |
| `dockerfile` | `string` | No | Dockerfile text, at most 64 KiB. Give image or dockerfile, not both. |
| `startCmd` | `string` | No | The command that starts in every new sandbox. |
| `readyCmd` | `string` | No | The command whose success means a new sandbox is ready. |
| `size` | `small \| medium \| large \| xlarge` | No | A size preset: small (default), medium, large or xlarge. vcpu, memoryMib and diskGib override its values. |
| `vcpu` | `number` | No | vCPUs, 1 to 16. |
| `memoryMib` | `number` | No | Memory in MiB: 1,024 to 65,536, whole GiB. |
| `diskGib` | `number` | No | Disk in GiB, 5 to 500. |

**Output:** `any`

***

### delete

`templates.delete`

Deletes a customer template and frees its name

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

```ts theme={null}
await corsair.maritime.api.templates.delete({ name: 'build-42' });
```

**Input**

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

**Output:** `any`

***

### get

`templates.get`

Get one customer or stock template

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.templates.get({ name: 'build-42' });
```

**Input**

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

**Output:** `any`

***

### list

`templates.list`

Lists the account's templates, newest first, then the stock templates, as `{ data, nextCursor }`

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.templates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

## Usage

### daily

`usage.daily`

The account's cost by day: hosting (the usage ledger on a usage plan, allocated under a seat plan, else debits), LLM, minutes

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.usage.daily({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | No | ISO start (default: to - 30d) |
| `to` | `string` | No | ISO end (default: now) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `periodStart` | `string \| null` | No | — |
| `periodEnd` | `string \| null` | No | — |
| `hostingBasis` | `string \| null` | No | — |
| `plan` | `string \| null \| null` | No | — |
| `days` | `object[] \| null` | No | — |

> [accordion] days full type
>
> ```ts theme={null}
> {
>   day?: string | null,
>   computeMinutes?: number | null,
>   hostingCostCents?: number | null,
>   llmCostCents?: number | null,
>   totalCostCents?: number | null
> }[] | null
> ```

***

### report

`usage.report`

Get the usage report for the last 30 days: compute minutes and hosting, LLM and total cost, per agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.usage.report({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | No | ISO start (default: to - 30d) |
| `to` | `string` | No | ISO end (default: now) |
| `projectId` | `string` | No | — |
| `externalUserId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `periodStart` | `string \| null` | No | — |
| `periodEnd` | `string \| null` | No | — |
| `hostingBasis` | `string \| null` | No | — |
| `plan` | `string \| null \| null` | No | — |
| `computeMinutes` | `number \| null` | No | — |
| `hostingCostCents` | `number \| null` | No | — |
| `llmCostCents` | `number \| null` | No | — |
| `totalCostCents` | `number \| null` | No | — |
| `agents` | `object[] \| null` | No | — |

> [accordion] agents full type
>
> ```ts theme={null}
> {
>   agentId?: string | null,
>   source?: string | null,
>   agentName?: string | null | null,
>   externalUserId?: string | null | null,
>   projectId?: string | null | null,
>   computeMinutes?: number | null,
>   hostingCostCents?: number | null,
>   slotCostCents?: number | null,
>   addOnCostCents?: number | null,
>   llmCostCents?: number | null,
>   totalCostCents?: number | null
> }[] | null
> ```

***

### sandboxes

`usage.sandboxes`

Lists usage records that overlap `from` to `to`, oldest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.usage.sandboxes({ from: '2026-11-01T00:00:00Z', to: '2026-11-27T00:00:00Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | Yes | RFC 3339 start of the window. |
| `to` | `string` | Yes | RFC 3339 end of the window. |
| `sandbox` | `string` | No | Only this sandbox. |
| `endUser` | `string` | No | Only this end user. |
| `limit` | `number` | No | Page size, 1 to 100 (Maritime default 50). |
| `cursor` | `string` | No | The previous page's nextCursor. |

**Output:** `any`

***

## Wallet

### apiUsage

`wallet.apiUsage`

The AI credits of the account: budget, lifetime spend, what is left, and the unexpired welcome credit (`welcomeCredit`, None once spent or lapsed)

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.apiUsage({});
```

**Input:** *empty object*

**Output:** `any`

***

### autoRecharge.get

`wallet.autoRecharge.get`

Get the wallet's auto-recharge setting

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.autoRecharge.get({});
```

**Input:** *empty object*

**Output:** `any`

***

### autoRecharge.set

`wallet.autoRecharge.set`

Configure auto-recharge: below thresholdCents, charge the saved card for amountCents (max 3x/24h, 6h backoff after a failed charge)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.wallet.autoRecharge.set({ enabled: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean` | Yes | — |
| `thresholdCents` | `number \| null` | No | — |
| `amountCents` | `number \| null` | No | — |

**Output:** `any`

***

### balance

`wallet.balance`

Get current wallet balance

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.balance({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `balanceCents` | `number \| null` | No | — |
| `balanceDollars` | `number \| null` | No | — |

***

### browserUsage

`wallet.browserUsage`

Browser session usage + rate for the authenticated user

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.browserUsage({});
```

**Input:** *empty object*

**Output:** `any`

***

### checkDeployBalance

`wallet.checkDeployBalance`

Check if user has sufficient balance to deploy an agent

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.checkDeployBalance({});
```

**Input:** *empty object*

**Output:** `any`

***

### claimSignupBonus

`wallet.claimSignupBonus`

One-time \$10 OpenClaw signup bonus

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

```ts theme={null}
await corsair.maritime.api.wallet.claimSignupBonus({});
```

**Input:** *empty object*

**Output:** `any`

***

### paymentMethod

`wallet.paymentMethod`

Saved-card status for the billing page

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.paymentMethod({});
```

**Input:** *empty object*

**Output:** `any`

***

### planUsage

`wallet.planUsage`

Current plan + this user's aggregate usage against its limits

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.planUsage({});
```

**Input:** *empty object*

**Output:** `any`

***

### purchaseApiCredits

`wallet.purchaseApiCredits`

Creates a Stripe Checkout session that buys AI credits

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.wallet.purchaseApiCredits({ amount_cents: 500 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `amount_cents` | `number` | Yes | AI credits to buy, in cents, minimum \$5 (500) |

**Output:** `any`

***

### redeemPromo

`wallet.redeemPromo`

Redeem promo

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

```ts theme={null}
await corsair.maritime.api.wallet.redeemPromo({ code: 'ABC123' });
```

**Input**

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

**Output:** `any`

***

### topup

`wallet.topup`

Create a Stripe Checkout session for wallet top-up (one-time payment)

**Risk:** `destructive`

```ts theme={null}
await corsair.maritime.api.wallet.topup({ amount_cents: 500 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `amount_cents` | `number` | Yes | Amount in cents, minimum \$5 (500) |
| `return_path` | `string \| null` | No | Path to redirect to after checkout (e.g. /enterprise) |

**Output:** `any`

***

### transactions

`wallet.transactions`

Get wallet transaction history

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.transactions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `wallet` | `string` | No | — |

**Output:** `any`

***

### validatePromoCode

`wallet.validatePromoCode`

Validate promo code

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.wallet.validatePromoCode({ code: 'ABC123' });
```

**Input**

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

**Output:** `any`

***

## Webhooks

### create

`webhooks.create`

Subscribe an https URL to agent, message, exec and end-user events (the signing secret is returned once)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.webhooks.create({
	url: 'https://example.com/maritime/webhook',
	events: ['agent.error', 'agent.deployed'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | HTTPS endpoint that will receive POSTed events (public hosts only) |
| `events` | `string[]` | No | Events to receive (subset of \['agent.deployed', 'agent.error', 'agent.restarted', 'agent.sleeping', 'agent.stopped', 'agent.woken', 'exec.finished', 'message.failed', 'message.reply']). Empty = all. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `events` | `string[] \| null` | No | — |
| `isActive` | `boolean \| null` | No | — |
| `lastDeliveredAt` | `string \| null \| null` | No | — |
| `lastStatusCode` | `number \| null \| null` | No | — |
| `consecutiveFailures` | `number \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `secret` | `string \| null` | No | Signing secret, shown once. Verify X-Maritime-Signature with it. |

***

### delete

`webhooks.delete`

Delete a webhook subscription

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

```ts theme={null}
await corsair.maritime.api.webhooks.delete({ sub_id: 'whk_1c5v7n' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Maritime accepted the call; it answered with no body. |

***

### deliveries.list

`webhooks.deliveries.list`

The delivery log of one subscription, newest first

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.webhooks.deliveries.list({ sub_id: 'whk_1c5v7n' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sub_id` | `string` | Yes | — |
| `status` | `string` | No | — |
| `limit` | `number` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   subscriptionId?: string | null,
>   event?: string | null,
>   status?: string | null,
>   attempts?: number | null,
>   nextAttemptAt?: string | null | null,
>   lastStatusCode?: number | null | null,
>   lastError?: string | null | null,
>   createdAt?: string | null,
>   deliveredAt?: string | null | null,
>   payload?: {
>   } | null
> }[]
> ```

***

### deliveries.replay

`webhooks.deliveries.replay`

Sends one delivery again now, whatever its state, and returns the result

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

```ts theme={null}
await corsair.maritime.api.webhooks.deliveries.replay({ delivery_id: 'dlv_6m3q8z' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `subscriptionId` | `string \| null` | No | — |
| `event` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `attempts` | `number \| null` | No | — |
| `nextAttemptAt` | `string \| null \| null` | No | — |
| `lastStatusCode` | `number \| null \| null` | No | — |
| `lastError` | `string \| null \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `deliveredAt` | `string \| null \| null` | No | — |
| `payload` | `object \| null` | No | — |

> [accordion] payload full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### list

`webhooks.list`

List the account's webhook subscriptions

**Risk:** `read`

```ts theme={null}
await corsair.maritime.api.webhooks.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   url?: string | null,
>   events?: string[] | null,
>   isActive?: boolean | null,
>   lastDeliveredAt?: string | null | null,
>   lastStatusCode?: number | null | null,
>   consecutiveFailures?: number | null,
>   createdAt?: string | null
> }[]
> ```

***

### test

`webhooks.test`

Deliver a synthetic `ping` event to the subscription and return the result

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

```ts theme={null}
await corsair.maritime.api.webhooks.test({ sub_id: 'whk_1c5v7n' });
```

**Input**

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

**Output:** `any`

***

### update

`webhooks.update`

Update a webhook subscription: URL, events, or isActive (true re-enables it and resets the failure count)

**Risk:** `write`

```ts theme={null}
await corsair.maritime.api.webhooks.update({ sub_id: 'whk_1c5v7n' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sub_id` | `string` | Yes | — |
| `events` | `string[] \| null` | No | — |
| `isActive` | `boolean \| null` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `events` | `string[] \| null` | No | — |
| `isActive` | `boolean \| null` | No | — |
| `lastDeliveredAt` | `string \| null \| null` | No | — |
| `lastStatusCode` | `number \| null \| null` | No | — |
| `consecutiveFailures` | `number \| null` | No | — |
| `createdAt` | `string \| null` | No | — |

***


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