---
title: "Create Namespace"
method: POST
path: "/v1/mcp/projects/{project_id}/namespaces"
tags: ["mcp"]
---

# Create Namespace

`POST /v1/mcp/projects/{project_id}/namespaces`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/mcp/projects/{project_id}/namespaces`
- Auth: none declared

Create a namespace from the MCP surface — the tools-only unblocker
(previously a namespace could only be made via the user dashboard).

Validates the slug against the canonical pattern and returns a
machine-readable `slug_invalid` 422 on bad input (NOT the misleading
`namespace not found` — same rule the lookup path now enforces).
Idempotent on (project, slug): an existing namespace returns created=false.

## Path parameters

- `project_id` string, required

## Request body

- AppRoutesMcpNamespaceCreateIn
  - `slug` string, required
  - `name` string, required
  - `description` string, nullable

## Response `200`

Successful Response

- NamespaceCreateOut
  - `namespace_uuid` string, required
  - `slug` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `created` boolean, required

## Other responses

- `422`: Validation Error

---

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