Skip to content

Create namespace

POST
/v1/ns
curl --request POST \
--url 'https://example.com/v1/ns?authority=document' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/yaml' \
--data example

Creates a new namespace with an initial config version. Body is YAML or JSON config.

Authorization depends on parent: a child (parent supplied) requires namespace:create-child on the parent and inherits its partition; a root (parent omitted) requires namespace:create on the target partition. A caller holding partition grants on more than one partition must name the target with ?partition= when creating a root — otherwise the request is 400 (ambiguous).

parent
string format: uuid

Parent namespace UUID (omit for root)

partition
string format: uuid

Target partition for a root namespace. Required only when the caller holds grants on multiple partitions; the caller must hold create rights on it. Cannot be combined with parent (a child inherits its parent’s partition).

authority
string
Allowed values: document managed

Resource authority mode (default document)

string

Namespace created

Media typeapplication/json
object
success
required
boolean
nsid
required

UUID of the new namespace

string
new_version
required

ULID of the initial config version

string
Examplegenerated
{
"success": true,
"nsid": "example",
"new_version": "example"
}

Error response

Media typeapplication/problem+json

RFC 7807 Problem Details

object
type

Problem type slug URI

string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}