---
title: "Update namespace"
method: PATCH
path: "/v1/namespaces/{id}"
tags: ["Namespace"]
---

# Update namespace

`PATCH /v1/namespaces/{id}`

Update the namespace by its ID.

## Request body

- object
  - `name` string — Name of the namespace.
  - `description` string, nullable — Description of the namespace.

## Response `200`

OK

- Namespace — A namespace in an organization.
  - `id` string, required — Unique identifier of the namespace.
  - `name` string, required — Name of the namespace.
  - `description` string, nullable — Description of the namespace.
  - `projects` PartialProject[], required — Projects in the namespace.
    - `id` string, required — Unique identifier of the project.
    - `key` string, required — Key of the project.
    - `name` string, required — Name of the project.
    - `description` string, nullable — Description of the project.
    - `logo` string, uri, nullable — Logo of the project.
    - `status` 'active' | 'pending', required — Status of the project.
  - `documents` PartialDocument[], required — Documents in the namespace.
    - `id` string, required — Unique identifier of the document.
    - `name` string, required — Name of the document.
    - `excerpt` string, nullable — Excerpt of the document.
    - `created_by` string, required — ID of the user who created the document.
    - `created_at` string, date-time, nullable — Date when the document was created.
  - `created_at` string, date-time, required — Date when the namespace was created.
  - `updated_at` string, date-time, nullable, required — Date when the namespace was updated.

## Other responses

- `400` — Bad request
- `401` — Unauthorized request
- `403` — Forbidden
- `404` — The requested resource not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/opcotech/apis/elemo-api.md) · [All operations](https://skmtc.net/opcotech/apis/elemo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opcotech/elemo-api/revisions/6ff580b1e226/schema)
