---
title: Update a namespace
slug: api-documentation/update-a-namespace
docTags: 
createdAt: 2026-10-09T16:36:44.630Z
---

{
  "id": "gVBND6OjxMxGo8GJ4cJO5",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "http://localhost:8080/idgen/namespaces/{name}",
    "servers": [
      {
        "url": "{baseUrl}/idgen/namespaces/{name}",
        "description": "The API gateway, or the service itself (port 8080).",
        "variables": {
          "baseUrl": {
            "default": "http://localhost:8080",
            "description": "Scheme and host, e.g. https://<gateway>. No trailing slash."
          }
        }
      }
    ],
    "name": "Update a namespace",
    "description": "<p>Replaces the namespace's description and sets its status (ACTIVE or DISABLED). Formats change through versions, not here. Needs <code>idgen.namespaces.write</code>.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "name",
          "type": "string",
          "description": "<p>The namespace name (<code>^[a-z][a-z0-9._-]{0,63}$</code>).</p>"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The new description and status.",
          "customType": "UpdateNamespaceRequest",
          "schema": [
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "<p>Free text for administrators; omit to clear it.</p>"
            },
            {
              "name": "status",
              "kind": "required",
              "type": "string",
              "description": "<p>ACTIVE or DISABLED. A disabled namespace refuses ID requests (NAMESPACE_DISABLED). Delete with DELETE, not here.</p>"
            }
          ],
          "modelRef": "#/components/schemas/UpdateNamespaceRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>A JWT from authentication-svc. The tenant comes from the token.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The updated namespace.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>A namespace (or template): a stable name with numbered, immutable format versions.</p>",
            "customType": "NamespaceDto",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "The namespace name."
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Free text for administrators."
              },
              {
                "name": "status",
                "kind": "required",
                "type": "string",
                "description": "ACTIVE or DISABLED."
              },
              {
                "name": "currentVersion",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "<p>The version IDs come from right now; absent while no version is active.</p>",
                "format": "int32"
              },
              {
                "name": "createdAt",
                "kind": "required",
                "type": "string<date-time>",
                "description": "When the namespace was created.",
                "format": "date-time"
              },
              {
                "name": "updatedAt",
                "kind": "required",
                "type": "string<date-time>",
                "description": "When the namespace was last updated.",
                "format": "date-time"
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources: <code>self</code>, <code>versions</code> and, for namespaces, <code>ids</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/NamespaceDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>INVALID_REQUEST: a malformed path or body value, or an invalid name.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>UNAUTHENTICATED: missing, expired or invalid credentials.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "<p>FORBIDDEN: the caller lacks the <code>idgen.namespaces.write</code> permission, or its tenant or site scope does not match.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "<p>NAMESPACE_NOT_FOUND: no such namespace (or it was deleted).</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the <code>x-request-id</code>.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "503",
        "description": "<p>AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "4JiZWLrealF6avW9m8muA",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url http://localhost:8080/idgen/namespaces/{name} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"status\": \"\"\n     }'"
        },
        {
          "id": "lb57rBuMRBJYaHAplr9jj",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"status\": \"\"\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:8080/idgen/namespaces/{name}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "eVH6qiibGA-XuVUAjZfIH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:8080/idgen/namespaces/{name}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"status\": \"\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "aCmyAveFTBnhGGoP1-pdQ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:8080/idgen/namespaces/{name}\"\n\npayload = json.dumps({\n   \"status\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "4JiZWLrealF6avW9m8muA"
    },
    "results": {
      "languages": [
        {
          "id": "AdCD6ev_ccUZqq3Wqdctt",
          "language": "200",
          "code": "// The updated namespace.\n{\n  \"name\": \"\",\n  \"description\": \"\",\n  \"status\": \"\",\n  \"currentVersion\": \"\",\n  \"createdAt\": \"\",\n  \"updatedAt\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "iuZlEsLr3nCJIPLp-eqEN",
          "language": "400",
          "code": "// INVALID_REQUEST: a malformed path or body value, or an invalid name.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "GN86o0WLe4UD1Gi7FvfgR",
          "language": "401",
          "code": "// UNAUTHENTICATED: missing, expired or invalid credentials.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "FaTg5agvHDmwjLggCvaFX",
          "language": "403",
          "code": "// FORBIDDEN: the caller lacks the idgen.namespaces.write permission, or its tenant or site scope does not match.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "xlfqcvZ1VLsD_MJnhU4gG",
          "language": "404",
          "code": "// NAMESPACE_NOT_FOUND: no such namespace (or it was deleted).\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "zS1w05speHkX6dCPHVh6t",
          "language": "500",
          "code": "// INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the x-request-id.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "cCangzZ2KTf1fcozVCfP2",
          "language": "503",
          "code": "// AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "AdCD6ev_ccUZqq3Wqdctt"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}