> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://platform.bctrl.ai/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://platform.bctrl.ai/_mcp/server.

# drains Commands

> Manage drains

Manage drains

Output formatting flags (`--json`, `--jq`, and `--template`) are documented once in [Output Formatting](/cli/output) and are omitted from the tables below.

## `bctrl drains create`

Create a drain. Events after now are exported in batches, in commit order, retried with backoff until delivered: otlp sends them as OTLP/HTTP logs and their finished spans as traces, s3 and r2 write gzipped NDJSON under time-partitioned keys, https posts NDJSON signed like webhooks (the secret is returned once). Credentials are secret references.

```bash
bctrl drains create [flags]
```

| Flag                      | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `--headers <json>`        | API headers: inline JSON, @file, or - for stdin    |
| `--api-version <date>`    | Dated API contract (default: 2026-10-03)           |
| `--space <id-or-name>`    | Select an authorized Space (BCTRL-Space)           |
| `--subaccount-id <id>`    | Effective subaccount context (BCTRL-Subaccount-Id) |
| `--idempotency-key <key>` | Retry key for this operation                       |
| `--body <json>`           | Request body: inline JSON, @file, or - for stdin   |

## `bctrl drains delete`

Delete a drain. Events not yet sent are not exported.

```bash
bctrl drains delete <drainId> [flags]
```

| Flag                      | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `--headers <json>`        | API headers: inline JSON, @file, or - for stdin    |
| `--api-version <date>`    | Dated API contract (default: 2026-10-03)           |
| `--space <id-or-name>`    | Select an authorized Space (BCTRL-Space)           |
| `--subaccount-id <id>`    | Effective subaccount context (BCTRL-Subaccount-Id) |
| `--idempotency-key <key>` | Retry key for this operation                       |
| `--yes`                   | Confirm this destructive operation                 |

## `bctrl drains get`

Get a drain with its delivery status: last delivery, last error and the Events and bytes sent.

```bash
bctrl drains get <drainId> [flags]
```

| Flag                   | Description                                        |
| ---------------------- | -------------------------------------------------- |
| `--headers <json>`     | API headers: inline JSON, @file, or - for stdin    |
| `--api-version <date>` | Dated API contract (default: 2026-10-03)           |
| `--space <id-or-name>` | Select an authorized Space (BCTRL-Space)           |
| `--subaccount-id <id>` | Effective subaccount context (BCTRL-Subaccount-Id) |

## `bctrl drains list`

List the drains that export Events to your own observability stack or bucket.

```bash
bctrl drains list [flags]
```

| Flag                   | Description                                        |
| ---------------------- | -------------------------------------------------- |
| `--query <json>`       | Query object: inline JSON, @file, or - for stdin   |
| `--params <json>`      | Alias for --query                                  |
| `--cursor <value>`     | Query parameter cursor                             |
| `--order <value>`      | Query parameter order                              |
| `--limit <value>`      | Query parameter limit                              |
| `--headers <json>`     | API headers: inline JSON, @file, or - for stdin    |
| `--api-version <date>` | Dated API contract (default: 2026-10-03)           |
| `--space <id-or-name>` | Select an authorized Space (BCTRL-Space)           |
| `--subaccount-id <id>` | Effective subaccount context (BCTRL-Subaccount-Id) |

## `bctrl drains test`

Send one test Event to the drain destination now and report the outcome. The drain position does not move.

```bash
bctrl drains test <drainId> [flags]
```

| Flag                      | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `--headers <json>`        | API headers: inline JSON, @file, or - for stdin    |
| `--api-version <date>`    | Dated API contract (default: 2026-10-03)           |
| `--space <id-or-name>`    | Select an authorized Space (BCTRL-Space)           |
| `--subaccount-id <id>`    | Effective subaccount context (BCTRL-Subaccount-Id) |
| `--idempotency-key <key>` | Retry key for this operation                       |

## `bctrl drains update`

Update a drain destination, its category filter, label or enabled state. A disabled drain keeps its place and resumes from it.

```bash
bctrl drains update <drainId> [flags]
```

| Flag                      | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `--headers <json>`        | API headers: inline JSON, @file, or - for stdin    |
| `--api-version <date>`    | Dated API contract (default: 2026-10-03)           |
| `--space <id-or-name>`    | Select an authorized Space (BCTRL-Space)           |
| `--subaccount-id <id>`    | Effective subaccount context (BCTRL-Subaccount-Id) |
| `--idempotency-key <key>` | Retry key for this operation                       |
| `--body <json>`           | Request body: inline JSON, @file, or - for stdin   |