---
title: "Create Namespace"
method: POST
path: "/clusters/{clusterId}/namespaces"
tags: ["namespaces"]
---

# Create Namespace

`POST /clusters/{clusterId}/namespaces`

## Request

- Base URL: `https://privatecloud.mendixcloud.com/api/v4`
- URL: `https://privatecloud.mendixcloud.com/api/v4/clusters/{clusterId}/namespaces`
- Auth: API key in header `Authorization`

Creates a new namespace based on a manifest.

## Request body

- CreateNamespaceManifest: Model for the manifest used when creating a namespace.
  - `manifestVersion` string, required
  - `namespace` object, required
    - `namespaceId` string, uuid, required
    - `name` string, required
    - `namespaceType` 'standard' | 'main' | 'managed': *This value cannot be changed after it has been set.* The namespace type is influenced by the type of operator installation.
    - `installationType` 'Connected' | 'Standalone', required: non-editable</br> Model for installationType.
    - `secret` string, required

## Response `202`

The job response returned by a get-job request. The Location header is populated once the job has been created successfully.

- Job: Model for jobs.
  - `id` string, uuid, required: Model for jobId.
  - `status` 'created' | 'running' | 'failed' | 'finished', required: `created` - a job has been created but has not been picked up for processing <br/> `running` - the job is being processed <br/> `finished` - the job has finished processing <br/> `failed` - something went wrong and the job processing failed
  - `details` string
  - `error` ErrorBody: The body of an error object explaining what happened.
    - `code` integer: The HTTP status code.
    - `message` string: Explanation of what happened.

## Other responses

- `400`: The request likely contains invalid data or is missing data. The error response gives additional feedback.
- `401`: There were no usable authentication credentials found. The error response gives additional feedback.
- `403`: Access is denied. The provided credentials are incorrect or the credentials do not have the required level of access. The error response gives additional feedback.

---

[API](https://skmtc.dev/mendix/apis/mendix-for-private-cloud-deploy-api.md) - [All operations](https://skmtc.dev/mendix/apis/mendix-for-private-cloud-deploy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mendix/apis/mendix-for-private-cloud-deploy-api/revisions/ae247dcd18e1?raw)
