---
title: "Update a workspace (self-hosted)"
method: PATCH
path: "/self-hosted/{accountId}/workspaces/{workspaceId}"
tags: ["Self-Hosted Runners"]
---

# Update a workspace (self-hosted)

`PATCH /self-hosted/{accountId}/workspaces/{workspaceId}`

## Path parameters

- `accountId` string, required
- `workspaceId` string, required

## Request body

- UpdateWorkspaceRequest
  - `description` string
  - `labels` string[]
  - `cronExecutionPattern` string
  - `iacProvisioner` IacProvisioner — Infrastructure as Code provisioner configuration
    - `type` 'terraform' | 'opentofu', required — Type of IaC provisioner
    - `version` string, required — Version of the provisioner
  - `multiEnvProvisioner` MultiEnvProvisioner — Multi-environment provisioner configuration
    - `type` 'terragrunt', required — Type of multi-environment provisioner
    - `version` string, required — Version of the multi-environment provisioner. Should be a valid semver when provided.
    - `applyAll` boolean — Whether to apply all environments or not
    - `stopOnError` boolean — Whether to stop on error during multi-environment provisioning
  - `repositoryUrl` string
  - `runsCount` integer
  - `isWorkflowManaged` boolean
  - `lastRunStatus` 'pending' | 'running' | 'success' | 'failed' | 'canceled' | 'initializing' | 'queued' | 'planning' | 'planning_destroy' | 'applying' | 'destroying' | 'ready_for_apply' | 'ready_for_destroy' | 'destroyed' | 'destroy_plan_completed' | 'destroy_plan_failed' | 'destroy_failed' | 'discarded' | 'canceling_init' | 'canceling_plan' | 'canceling_planning_destroy' | 'canceling_apply' | 'canceling_destroy' | 'canceled_init' | 'canceled_plan' | 'canceled_planning_destroy' | 'canceled_apply' | 'canceled_destroy' | 'init_error' | 'plan_success' | 'plan_error' | 'apply_error' | 'apply_success' | 'blocked' | 'Acknowledged' | 'plan_no_changes' | 'apply_no_changes' | 'runner_failure'
  - `lastApplyTime` string, date-time
  - `lastPlanTime` string, date-time
  - `lastDestroyTime` string, date-time
  - `lastRunTime` string, date-time
  - `backendSummary` BackendSummary — Summary of backend configuration
    - `type` 's3' | 'azurerm' | 'gcs' | 'consul' — Type of backend
    - `config` object — Backend configuration
    - `resources` integer — Number of resources
  - `backends` object — Map of environment to backend summary
  - `triggerConfig` WorkspaceTriggerConfig
    - `runOnPullRequest` boolean
    - `runOnPush` boolean
    - `autoApply` boolean
  - `poolId` string — ID of the runner pool to assign to this workspace
  - `oidcAuthentication` boolean, nullable — OIDC authentication setting. If null, inherits from parent project.

## Response `200`

Workspace updated successfully

## Other responses

- `400` — Bad Request Error
- `401` — Unauthorized Error
- `403` — Insufficient permissions
- `404` — Not Found Error
- `500` — Internal Server Error

---

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