---
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

---

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