---
title: "edit error handler"
method: POST
path: "/w/{workspace}/workspaces/edit_error_handler"
tags: ["workspace"]
---

# edit error handler

`POST /w/{workspace}/workspaces/edit_error_handler`

## Path parameters

- `workspace` string, required

## Request body

- union — Request body for editing the workspace error handler. Accepts both new grouped format and legacy flat format for backward compatibility.
  - EditErrorHandlerNew — New grouped format for editing error handler
    - `path` string — Path to the error handler script or flow
    - `extra_args` ScriptArgs — The arguments to pass to the script or flow
    - `muted_on_cancel` boolean
    - `muted_on_user_path` boolean
    - `fallback_to_instance_alerts` boolean — Report failed jobs to the instance critical alert channels when no workspace error handler is set. Omit to leave the stored value untouched.
  - EditErrorHandlerLegacy — Legacy flat format for editing error handler (deprecated, use new format)
    - `error_handler` string — Path to the error handler script or flow
    - `error_handler_extra_args` ScriptArgs — The arguments to pass to the script or flow
    - `error_handler_muted_on_cancel` boolean

## Response `200`

status

## Changes

> 176 revisions in range; 14 could not be searched.

- **2026-07-24** `39f6b42d1670` — 1 info
  - added the new optional request property `oneOf[#/components/schemas/EditErrorHandlerNew]/fallback_to_instance_alerts`

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/w/:workspace/workspaces/edit_error_handler/post.md)

---

[API](https://skmtc.dev/windmill/apis/windmill-api.md) · [All operations](https://skmtc.dev/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/7b281701c340/schema)
