---
title: "Creates a namespace"
method: POST
path: "/apps/{app_id}/namespaces"
tags: ["namespaces"]
---

# Creates a namespace

`POST /apps/{app_id}/namespaces`

## Path parameters

- `app_id` string, required

## Request body

- NamespacePost
  - `id` string, required
  - `identified` boolean
  - `authenticated` boolean
  - `persisted` boolean
  - `persistLast` boolean
  - `pushEnabled` boolean
  - `tlsOnly` boolean
  - `exposeTimeserial` boolean
  - `mutableMessages` boolean
  - `populateChannelRegistry` boolean
  - `batchingEnabled` boolean, nullable
  - `batchingInterval` integer, nullable
  - `conflationEnabled` boolean, nullable
  - `conflationInterval` integer, nullable
  - `conflationKey` string, nullable

## Response `201`

Namespace created

- NamespaceResponse
  - `appId` string
  - `identified` boolean
  - `authenticated` boolean
  - `created` integer
  - `modified` integer
  - `id` string
  - `persisted` boolean
  - `persistLast` boolean
  - `pushEnabled` boolean
  - `tlsOnly` boolean
  - `exposeTimeserial` boolean
  - `mutableMessages` boolean
  - `populateChannelRegistry` boolean
  - `batchingEnabled` boolean, nullable
  - `batchingInterval` integer, nullable
  - `conflationEnabled` boolean, nullable
  - `conflationInterval` integer, nullable
  - `conflationKey` string, nullable

## Other responses

- `400` — Bad request
- `401` — Authentication failed
- `404` — App not found
- `422` — Invalid request
- `500` — Internal server error

---

[API](https://skmtc.net/ably/apis/api-v1.md) · [All operations](https://skmtc.net/ably/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ably/api-v1/revisions/2b049ae2733f/schema)
