---
title: "POST /v1/{+parent}/namespaces"
method: POST
path: "/v1/{+parent}/namespaces"
tags: ["projects"]
---

# POST /v1/{+parent}/namespaces

`POST /v1/{+parent}/namespaces`

Creates a namespace, and returns the new namespace.

## Path parameters

- `parent` string, required

## Query parameters

- `namespaceId` string

## Request body

- Namespace — A container for services. Namespaces allow administrators to group services together and define permissions for a collection of services.
  - `uid` string — Output only. The globally unique identifier of the namespace in the UUID4 format.
  - `name` string — Immutable. The resource name for the namespace in the format `projects/*/locations/*/namespaces/*`.
  - `labels` object — Optional. Resource labels associated with this namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/servicedirectory.md) · [All operations](https://skmtc.net/google/apis/servicedirectory/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/servicedirectory/versions/8e866f14601a/schema)
