---
title: "Update Workspace"
method: PATCH
path: "/workspaces/{workspace_id}"
tags: ["workspaces"]
---

# Update Workspace

`PATCH /workspaces/{workspace_id}`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces/{workspace_id}`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Update a workspace.

## Path parameters

- `workspace_id` string, uuid, required

## Request body

- WorkspaceUpdate
  - `name` string, nullable
  - `settings` WorkspaceSettingsUpdate
    - `git_provider` 'github' | 'gitlab' | 'bitbucket' | 'bitbucket_data_center': Version control host backing a workspace sync repository.
    - `git_repo_url` string, nullable
    - `workflow_unlimited_timeout_enabled` boolean, nullable: Allow workflows to run indefinitely without timeout constraints. When enabled, individual workflow timeout settings are ignored.
    - `workflow_default_timeout_seconds` integer, nullable: Default timeout in seconds for workflows in this workspace. Must be greater than or equal to 0.
    - `allowed_attachment_extensions` string[], nullable: Allowed file extensions for attachments (e.g., ['.pdf', '.docx']). Overrides global defaults.
    - `allowed_attachment_mime_types` string[], nullable: Allowed MIME types for attachments (e.g., ['application/pdf', 'image/jpeg']). Overrides global defaults.
    - `validate_attachment_magic_number` boolean, nullable: Whether to validate file content matches declared MIME type using magic number detection. Defaults to true for security.
  - `default_agent_preset_id` string, uuid, nullable: Default agent preset for this workspace. Set to null to clear.

## Response `200`

Successful Response

- WorkspaceRead
  - `id` string, uuid, required
  - `name` string, required
  - `default_agent_preset_id` string, uuid, nullable
  - `settings` WorkspaceSettingsRead
    - `git_provider` 'github' | 'gitlab' | 'bitbucket' | 'bitbucket_data_center': Version control host backing a workspace sync repository.
    - `git_repo_url` string, nullable
    - `workflow_unlimited_timeout_enabled` boolean, nullable
    - `workflow_default_timeout_seconds` integer, nullable
    - `allowed_attachment_extensions` string[], nullable
    - `allowed_attachment_mime_types` string[], nullable
    - `validate_attachment_magic_number` boolean, nullable
    - `effective_allowed_attachment_extensions` string[], required: Returns workspace-specific extensions if set, otherwise system defaults.
    - `effective_allowed_attachment_mime_types` string[], required: Returns workspace-specific MIME types if set, otherwise system defaults.
  - `organization_id` string, uuid, required
  - `unsafe_disable_secret_error_withholding_allowed` boolean: Whether the organization lets this workspace's actions opt into showing original error details when secrets are in scope.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tracecat/apis/tracecat-api.md) - [All operations](https://skmtc.dev/tracecat/apis/tracecat-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tracecat/apis/tracecat-api/revisions/2efdda25045f?raw)
