---
title: "Create a Realtime app"
method: POST
path: "/v1/realtime/apps"
tags: ["realtime-apps"]
---

# Create a Realtime app

`POST /v1/realtime/apps`

## Request

- Base URL: `https://us1.platform.bird.com`
- URL: `https://us1.platform.bird.com/v1/realtime/apps`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bird_session`

Provisions a new Realtime app for the workspace and returns it with the initial key. Store the key secret when you receive it because later responses do not include it. If you lose the secret, create a new key and revoke this one.

## Headers

- `Idempotency-Key` string
- `X-Workspace-Id` string
- `X-Organization-Id` string

## Request body

- RealtimeAppCreate: Realtime app configuration flags. TLS is always enforced (non-TLS client connections are rejected) and is not configurable.
  - `client_events` boolean: Allow clients to trigger events directly (client events).
  - `connection_counting` boolean: Count the connections subscribed to each channel and expose the count on channel queries.
  - `connection_count_events` boolean: Broadcast connection-count events to public and private channel subscribers. Requires `connection_counting`. Presence channels do not emit these events; use a channel query to read their connection count.
  - `watchlist_events` boolean: Tell a signed-in member when the members on their watchlist come online or go offline. The watchlist is part of the identity your backend signs at signin.
  - `authorized_connections` boolean: Require every connection to be authorized.
  - `name` string, required: A label for the app, shown wherever it is listed.
  - `region` 'us1' | 'eu1', required: Deployment region identifier.

## Response `201`

Realtime app created. Includes the initial key's one-time secret.

- RealtimeAppCreated
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `client_events` boolean, required: Allow clients to trigger events directly (client events).
  - `connection_counting` boolean, required: Count the connections subscribed to each channel and expose the count on channel queries.
  - `connection_count_events` boolean, required: Broadcast connection-count events to public and private channel subscribers. Requires `connection_counting`. Presence channels do not emit these events; use a channel query to read their connection count.
  - `watchlist_events` boolean, required: Tell a signed-in member when the members on their watchlist come online or go offline. The watchlist is part of the identity your backend signs at signin.
  - `authorized_connections` boolean, required: Require every connection to be authorized.
  - `id` string, required
  - `app_id` integer, required: The numeric Realtime app id. Use it together with a key and secret to initialize a Realtime client/server SDK. Immutable.
  - `name` string, required: A label for the app, shown wherever it is listed.
  - `region` 'us1' | 'eu1', required: Deployment region identifier.
  - `status` 'active' | 'suspended', required: Lifecycle state of the app. `active` apps serve connections; `suspended` apps are provisioned but reject connections.
  - `key` RealtimeAppKey, required
    - `id` string, required
    - `key` string, required: The public app key clients use to connect.
    - `secret` string: The key secret, used for server-side request signing. Returned only when the key is created, and never shown again: store it securely. If lost, create a new key and revoke this one.
    - `revoked_at` string, date-time, nullable, required: When the key was revoked, or `null` if still active.
    - `created_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Resource not found
- `422`: The request has invalid field values, violates a business rule, or carries a query parameter the endpoint does not declare. Field validation errors use `type: validation_error` and include the affected fields in `details`. Business-rule errors identify the failed rule in `type`.
- `429`: Rate limit exceeded
- `500`: Internal server error
- `503`: The service is temporarily unavailable. If `Retry-After` is present, wait for that delay before retrying; otherwise, retry with exponential backoff. Reuse the same idempotency key and request when retrying a mutation.

---

[API](https://skmtc.dev/messagebird/apis/bird-api.md) · [All operations](https://skmtc.dev/messagebird/apis/bird-api/llms.txt) · [OpenAPI document](https://skmtc.dev/messagebird/apis/bird-api/revisions/3e2a50466454?raw)
