Skip to main content
Namespaces

Create Namespace

Create a namespace with a unique name and a display name.

POST https://rivet.example.com/namespaces

Examples

Authentication

Send your namespace token as a bearer token in the Authorization header. Every control plane request also requires the namespace query parameter. See Authentication.

Request Body

Content type: application/json.

FieldTypeRequiredDescription
namestringYesUnique name used to identify the namespace.

Responses

200

The newly created namespace.

FieldTypeDescription
namespaceobjectName of the namespace to operate in.
namespace.namestringNamespace name.
namespace.create_tsintegerWhen the namespace was created, in Unix milliseconds.
{
  "namespace": {
    "name": "my-namespace",
    "create_ts": 1700000000000
  }
}

400

envoy.invalid_namespace_name: name is not a DNS label of 1 to 63 lowercase letters, digits and hyphens.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "envoy",
  "code": "invalid_namespace_name",
  "message": "Namespace name must be a DNS label of 1 to 63 lowercase letters, digits and hyphens."
}

401

auth.invalid_token: the request carries no token, or the token is not valid. auth.token_expired: the token has expired.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "auth",
  "code": "invalid_token",
  "message": "Authentication token is invalid."
}

403

auth.insufficient_permissions: the token’s grants do not cover this request. Namespace management is only available to the admin token.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "auth",
  "code": "insufficient_permissions",
  "message": "Insufficient permissions to access this resource."
}

409

namespace.name_not_unique: a namespace with this name already exists.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "namespace",
  "code": "name_not_unique",
  "message": "A namespace with this name already exists."
}

415

The request is missing the Content-Type: application/json header. Returned as plain text.

Content type: text/plain.

422

The JSON body does not match the request schema, for example a missing required field, a wrong type or an unknown field where unknown fields are rejected. Returned as plain text.

Content type: text/plain.

500

core.internal_error: an unexpected failure. Details are only logged on the server.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "core",
  "code": "internal_error",
  "message": "An internal error occurred"
}

503

auth.verification_unavailable: token verification keys are temporarily unavailable. Retry the request.

FieldTypeDescription
groupstringError group, for example actor.
codestringError code within the group, for example not_found.
messagestringHuman-readable error message.
metadataanyExtra details. Only present on some errors raised while authenticating or authorizing the request.
{
  "group": "auth",
  "code": "verification_unavailable",
  "message": "The server could not verify the authentication token because verification keys are temporarily unavailable. Retry the request."
}
Edit this page Last updated November 10, 2026