---
title: "Update a workspace run status and error (self-hosted)"
method: PATCH
path: "/self-hosted/{accountId}/workspaces/{workspaceId}/runs"
tags: ["self-hosted_other"]
---

# Update a workspace run status and error (self-hosted)

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

## Path parameters

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

## Request body

- UpdateWorkspaceRunRequest
  - `status` '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'
  - `AccountId` string
  - `workspaceId` string
  - `workspaceRunId` string, required
  - `error` WorkspaceRunError
    - `type` string, required
    - `description` string, required
    - `activity` string
    - `temporalWorkflowId` string, required
    - `cause` string

## Response `200`

Workspace run updated successfully

## Other responses

- `400` — Bad Request Error
- `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)
