---
title: "Update a workspace"
method: PATCH
path: "/workspaces/{id}"
tags: ["Workspaces"]
---

# Update a workspace

`PATCH /workspaces/{id}`

Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.

## Path parameters

- `id` string, required — The workspace ID (UUID) or slug

## Request body

- UpdateWorkspaceRequest
  - `default_image_model` string, nullable — Default image model for this workspace
  - `default_provider_sort` string, nullable — Default provider sort preference (price, throughput, latency, exacto)
  - `default_text_model` string, nullable — Default text model for this workspace
  - `description` string, nullable — New description for the workspace
  - `io_logging_api_key_ids` integer[], nullable — Optional array of API key IDs to filter I/O logging
  - `io_logging_sampling_rate` number, double — Sampling rate for I/O logging (0.0001-1)
  - `is_data_discount_logging_enabled` boolean — Whether data discount logging is enabled
  - `is_observability_broadcast_enabled` boolean — Whether broadcast is enabled
  - `is_observability_io_logging_enabled` boolean — Whether private logging is enabled
  - `name` string — New name for the workspace
  - `slug` string — New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)

## Response `200`

Workspace updated successfully

- UpdateWorkspaceResponse
  - `data` object, required — The updated workspace
    - `created_at` string, required — ISO 8601 timestamp of when the workspace was created
    - `created_by` string, nullable, required — User ID of the workspace creator
    - `default_guardrail_id` string, uuid, required — Deterministic ID derived from the workspace ID. The default guardrail is materialized when its configuration is first written.
    - `default_image_model` string, nullable, required — Default image model for this workspace
    - `default_provider_sort` string, nullable, required — Default provider sort preference (price, throughput, latency, exacto)
    - `default_text_model` string, nullable, required — Default text model for this workspace
    - `description` string, nullable, required — Description of the workspace
    - `id` string, uuid, required — Unique identifier for the workspace
    - `include_byok_in_budgets` boolean — Whether BYOK (bring-your-own-key) spend counts toward this workspace's budgets. Set it via the workspace budget endpoints.
    - `io_logging_api_key_ids` integer[], nullable, required — Optional array of API key IDs to filter I/O logging. Null means all keys are logged.
    - `io_logging_sampling_rate` number, double, required — Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.
    - `is_data_discount_logging_enabled` boolean, required — Whether data discount logging is enabled for this workspace
    - `is_observability_broadcast_enabled` boolean, required — Whether broadcast is enabled for this workspace
    - `is_observability_io_logging_enabled` boolean, required — Whether private logging is enabled for this workspace
    - `name` string, required — Name of the workspace
    - `slug` string, required — URL-friendly slug for the workspace
    - `updated_at` string, nullable, required — ISO 8601 timestamp of when the workspace was last updated

## Other responses

- `400` — Bad Request - Invalid request parameters or malformed input
- `401` — Unauthorized - Authentication required or invalid credentials
- `403` — Forbidden - Authentication successful but insufficient permissions
- `404` — Not Found - Resource does not exist
- `500` — Internal Server Error - Unexpected server error

---

[API](https://skmtc.net/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.net/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrouterteam/openrouter-api/versions/f3788187f5b7/schema)
