---
title: "Create Namespace"
method: POST
path: "/api/agent-data/namespaces"
tags: ["agent-data"]
---

# Create Namespace

`POST /api/agent-data/namespaces`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agent-data/namespaces`
- Auth: none declared

Create a namespace (a schema + three limited non-superuser roles) in an environment. This
always creates a new subfolder under the parent_library_id you supply, named with the given
name, and provisions the namespace into that new subfolder; it never provisions into an
existing folder, and parent_library_id is required. Requires the edit or admin rung on
parent_library_id, AND being the environment's owner or a platform admin.

## Request body

- CreateNamespaceIn
  - `environment_id` string, required
  - `name` string, required
  - `parent_library_id` string, required

## Response `200`

Successful Response

- NamespaceOut
  - `id` string, required
  - `name` string, required
  - `environment_id` string, required
  - `environment_name` string, required
  - `library_id` string, nullable, required

## Other responses

- `422`: Validation Error

---

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