---
title: "Update a namespace."
method: PATCH
path: "/v1/namespace/{namespaceId}"
tags: ["Namespaces"]
---

# Update a namespace.

`PATCH /v1/namespace/{namespaceId}`

Update a namespace for the authenticated organization. If there is no change, return it as it is.

## Path parameters

- `namespaceId` string, required — The id of the namespace (prefixed with ns_)

## Request body

- object
  - `name` string
  - `slug` string

## Response `200`

The updated namespace

- object
  - `success` true, required
  - `data` Namespace, required
    - `id` string, required — The unique ID of the namespace.
    - `name` string, required — The name of the namespace.
    - `slug` string, required — The slug of the namespace.
    - `organizationId` string, required — The ID of the organization that owns the namespace.
    - `createdAt` string, required — The date and time the namespace was created.
    - `embeddingConfig` union, required — The embedding model config. If not provided, our managed embedding model will be used. Note: You can't change the embedding model config after the namespace is created.
      - object
        - `provider` 'OPENAI', required
        - `model` 'text-embedding-3-small' | 'text-embedding-3-large', required — The OpenAI embedding model enum.
        - `apiKey` string, required
      - object
        - `provider` 'AZURE_OPENAI', required
        - `model` 'text-embedding-3-small' | 'text-embedding-3-large', required — The OpenAI embedding model enum.
        - `resourceName` string, uri, required — The resource name of the Azure OpenAI API. https://{resourceName}.openai.azure.com/v1
        - `deployment` string, required — The deployment name of the Azure OpenAI API.
        - `apiKey` string, required — The API key for the Azure OpenAI API.
        - `apiVersion` string — The API version for the Azure OpenAI API. Defaults to `preview`.
      - object
        - `provider` 'VOYAGE', required
        - `model` 'voyage-3-large' | 'voyage-3' | 'voyage-3-lite' | 'voyage-code-3' | 'voyage-finance-2' | 'voyage-law-2', required — The Voyage embedding model enum.
        - `apiKey` string, required
      - object
        - `provider` 'GOOGLE', required
        - `model` 'text-embedding-004', required
        - `apiKey` string, required
      - object
        - `provider` 'MANAGED_OPENAI', required
        - `model` 'text-embedding-3-large', required
    - `vectorStoreConfig` union, required — The vector store config.
      - object
        - `provider` 'MANAGED_PINECONE_OLD', required
      - object
        - `provider` 'MANAGED_PINECONE', required
      - object
        - `provider` 'MANAGED_TURBOPUFFER', required
      - object
        - `provider` 'PINECONE', required
        - `apiKey` string, required — The API key for the Pinecone index.
        - `indexHost` string, uri, required — The host of the Pinecone index.
      - object
        - `provider` 'TURBOPUFFER', required
        - `apiKey` string, required — The API key for the Turbopuffer index.
        - `region` 'gcp-us-central1' | 'gcp-us-west1' | 'gcp-us-east4' | 'gcp-northamerica-northeast2' | 'gcp-europe-west3' | 'gcp-asia-southeast1' | 'gcp-gcp-asia-northeast3' | 'aws-eu-central-1' | 'aws-eu-west-1' | 'aws-us-east-1' | 'aws-us-west-2' | 'aws-ap-southeast-2' | 'aws-us-east-2' | 'aws-ap-south-1', required — The region for the Turbopuffer index. Check https://turbopuffer.com/docs/regions

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
- `403` — The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
- `404` — The server cannot find the requested resource.
- `409` — This response is sent when a request conflicts with the current state of the server.
- `410` — This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
- `422` — The request was well-formed but was unable to be followed due to semantic errors.
- `429` — The user has sent too many requests in a given amount of time ("rate limiting")
- `500` — The server has encountered a situation it does not know how to handle.

---

[API](https://skmtc.dev/agentset/apis/agentsetapi.md) · [All operations](https://skmtc.dev/agentset/apis/agentsetapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentset/agentsetapi/revisions/cc6ac802092e/schema)
