# `bird realtime apps create`

## Usage

```bash
bird realtime apps create [flags]
```

## Description

Create a Realtime app

Provision a Realtime app and its first key. `region` is immutable once set and must be one of `listRealtimeRegions`. The response is the only place the key's secret ever appears, and no operation can read it back: recovering from a lost secret means creating another key. An app is what the publish and channel-inspection operations address.

Build the request from flags, a JSON RealtimeAppCreate body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Procedure

Step 2 of 3 of "Provision a Realtime app for a client to connect to". Previous: bird realtime regions list. Next: bird realtime apps get.

## Examples

```bash
# print the body shape (no credentials needed)
bird realtime apps create --example

# the body it prints:
```

```json
{
  "connection_counting": true,
  "name": "chat-production",
  "region": "eu1"
}
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                        | Description                                                                                                                                                                                    |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--client-events`           | Allow clients to trigger events directly (client events).                                                                                                                                      |
| `--connection-counting`     | Count the connections subscribed to each channel and expose the count on channel queries.                                                                                                      |
| `--connection-count-events` | Broadcast a connection-count event to a channel's subscribers whenever its connection count changes. Requires connection_counting.                                                             |
| `--authorized-connections`  | Require every connection to be authorized.                                                                                                                                                     |
| `--name`                    | A label for the app, shown wherever it is listed.                                                                                                                                              |
| `--region`                  | The region this app runs in. Unlike other Bird products, a Realtime app can be placed in a region other than the workspace's home region. Immutable after creation. Possible values: us1, eu1. |
| `--response-schema`         | Print the fields this command returns, then exit                                                                                                                                               |

## Related

| Name                                                                    | Description           |
| ----------------------------------------------------------------------- | --------------------- |
| [`bird realtime apps delete`](/docs/cli/reference/realtime-apps-delete) | Delete a Realtime app |
| [`bird realtime apps get`](/docs/cli/reference/realtime-apps-get)       | Get a Realtime app    |
| [`bird realtime apps list`](/docs/cli/reference/realtime-apps-list)     | List Realtime apps    |
| [`bird realtime apps update`](/docs/cli/reference/realtime-apps-update) | Update a Realtime app |