---
title: "Create Namespace"
method: POST
path: "/v1/namespace"
tags: ["v1", "Namespace"]
---

# Create Namespace

`POST /v1/namespace`

Create a new namespace within the developer's organization.

## Headers

- `X-API-Key` string, required

## Request body

- CreateNamespaceRequest — Request body for POST /v1/namespace
  - `name` string, required — Namespace name (e.g., 'acme-production')
  - `environment_type` 'development' | 'staging' | 'production' — Environment types for namespaces
  - `is_active` boolean — Whether this namespace is active
  - `rate_limits` object, nullable — Rate limits for this namespace (None values inherit from organization)
  - `default_policy` object, nullable — Default memory policy for add/search when request omits policy.

## Response `200`

Namespace created

- NamespaceResponse — Response for single-namespace operations (create, get, update).
  - `code` integer — HTTP status code
  - `status` string — 'success' or 'error'
  - `data` NamespaceItem — Public-facing namespace data returned in API responses.
    - `objectId` string, nullable — Parse objectId
    - `name` string, nullable — Namespace name
    - `environment_type` string, nullable — Environment type
    - `is_active` boolean, nullable — Whether namespace is active
    - `rate_limits` object, nullable — Rate limits
    - `organization_id` string, nullable — Owning organization ID
    - `instance_config` InstanceConfigItem — Instance configuration — response model for GET endpoints.
      - `neo4j` Neo4jInstanceConfigItem — Neo4j instance configuration — response (password masked).
        - `bolt_url` string, required — Neo4j bolt connection URL
        - `username` string, required — Neo4j username
        - `password_masked` string, required — Masked password (e.g. '****ab12')
        - `graphql_endpoint` string, nullable — Neo4j GraphQL endpoint URL
      - `provider` string, required — Cloud provider
      - `region` string, required — Cloud region
      - `scope` string, required — Where this config was resolved from: 'namespace' or 'organization'
    - `default_policy` object, nullable — Default memory policy when requests omit policy.
    - `storageCount` integer, nullable — Total storage items
    - `memoriesCount` integer, nullable — Total memories
    - `createdAt` string, nullable — Creation timestamp
    - `updatedAt` string, nullable — Last update timestamp
  - `error` string, nullable — Error message if failed
  - `details` unknown

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal server error

## Changes

- **2026-06-10** `02daa1da4e82` — 8 breaking
  - response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `400`
  - response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `401`
  - response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` list-of-types was widened by adding types `null` to media type `application/json` of response `500`
  - …4 more
- **2026-06-10** `871a12102bbe` — 8 breaking, 8 info
  - the response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` became nullable for the status `200`
  - the response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` became nullable for the status `400`
  - the response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` became nullable for the status `401`
  - the response property `data/anyOf[subschema #1: NamespaceItem]/createdAt` became nullable for the status `500`
  - …12 more
- …earlier changes not shown

[Full history](https://skmtc.dev/papr-ai/apis/papr-memory-api/changes/v1/namespace/post.md)

---

[API](https://skmtc.dev/papr-ai/apis/papr-memory-api.md) · [All operations](https://skmtc.dev/papr-ai/apis/papr-memory-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/papr-ai/papr-memory-api/revisions/b553be9aad37/schema)
