v126

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-04957391.2 MB
Workspaces

Update a workspace

Update an existing workspace by ID or slug. Management key required.

patch/workspaces/{id}

Path parameters

idstring required

The workspace ID (UUID) or slug

Example:production

The workspace ID (UUID) or slug

Request body

default_image_modelstring nullable

Default image model for this workspace

default_provider_sortstring nullable

Default provider sort preference (price, throughput, latency, exacto)

default_text_modelstring nullable

Default text model for this workspace

descriptionstring nullable

New description for the workspace

io_logging_api_key_idsinteger[] nullable

Optional array of API key IDs to filter I/O logging

io_logging_sampling_ratenumber double

Sampling rate for I/O logging (0.0001-1)

is_data_discount_logging_enabledboolean

Whether data discount logging is enabled

is_observability_broadcast_enabledboolean

Whether broadcast is enabled

is_observability_io_logging_enabledboolean

Whether private logging is enabled

namestring

New name for the workspace

slugstring

New URL-friendly slug (lowercase alphanumeric segments separated by single hyphens, no leading/trailing hyphens)

Example request

{
  "name": "Updated Workspace",
  "slug": "updated-workspace"
}

Response

Workspace updated successfully

Example response

{
  "data": {
    "created_at": "2025-08-24T10:30:00Z",
    "created_by": "user_abc123",
    "default_guardrail_id": "595d5849-7e86-51fd-a7c0-705c34e4afff",
    "default_image_model": "openai/dall-e-3",
    "default_provider_sort": "price",
    "default_text_model": "openai/gpt-4o",
    "description": "Production environment workspace",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "include_byok_in_budgets": false,
    "io_logging_api_key_ids": null,
    "io_logging_sampling_rate": 1,
    "is_data_discount_logging_enabled": true,
    "is_observability_broadcast_enabled": false,
    "is_observability_io_logging_enabled": false,
    "name": "Updated Workspace",
    "slug": "updated-workspace",
    "updated_at": "2025-08-25T10:00:00Z"
  }
}