---
title: "Delete Namespace"
method: DELETE
path: "/v1/namespace/{namespace_id}"
tags: ["v1", "Namespace"]
---

# Delete Namespace

`DELETE /v1/namespace/{namespace_id}`

Delete a namespace and optionally cascade-delete all memories, Neo4j nodes, and ACL references associated with it.

## Path parameters

- `namespace_id` string, required

## Query parameters

- `delete_memories` boolean — Delete all memories in this namespace
- `delete_neo4j_nodes` boolean — Delete all Neo4j nodes in this namespace
- `remove_acl_references` boolean — Remove namespace from ACL arrays on remaining nodes

## Headers

- `X-API-Key` string, required

## Response `200`

Namespace deleted

- DeleteNamespaceResponse — Response for DELETE /v1/namespace/{namespace_id} with cascade results.
  - `code` integer — HTTP status code
  - `status` string — 'success' or 'error'
  - `namespace_id` string, nullable — ID of deleted namespace
  - `message` string, nullable — Human-readable message
  - `cascade` CascadeDeletionResult — Details of the cascade deletion performed when a namespace is removed.
    - `memories_deleted` integer — Number of memories deleted
    - `memories_failed` integer — Number of memories that failed to delete
    - `neo4j_nodes_deleted` integer — Number of Neo4j nodes deleted
    - `acl_read_cleaned` integer — Nodes with namespace_read_access cleaned
    - `acl_write_cleaned` integer — Nodes with namespace_write_access cleaned
  - `error` string, nullable — Error message if failed
  - `details` unknown

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `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)
