---
title: "Update DAG incident routing"
method: PUT
path: "/dags/{fileName}/incidents"
tags: ["incidents"]
---

# Update DAG incident routing

`PUT /dags/{fileName}/incidents`

Creates or replaces DAG-level incident routing override settings. Route provider IDs must reference incident providers. Developer, manager, or admin only.

## Path parameters

- `fileName` string, regex, required — Name of the DAG file

## Query parameters

- `remoteNode` string

## Request body

- IncidentPolicySetInput — Replacement incident routing for a global, workspace, or DAG scope
  - `enabled` boolean, required — Whether this scope can open new incidents
  - `inheritParent` boolean, required — For workspace and DAG routing, true means inherit the parent scope instead of using local routes. Ignored for global routing.
  - `policies` IncidentPolicyInput[], required
    - `id` string — Stable route ID. Omit when adding a route.
    - `providerId` string, required — Incident provider ID
    - `enabled` boolean, required — Whether this route is enabled. Normal incident routing sends true when the route exists.
    - `severity` 'critical' | 'error' | 'warning' | 'info', required — Incident severity
    - `resolveOnRecovery` boolean — Deprecated. Dagu resolves saved open incidents on recovery.
    - `dedupKeyTemplate` string — Deprecated and ignored. Dagu generates stable provider incident keys.
    - `messageTemplate` string — Template for the provider incident summary/message.
    - `descriptionTemplate` string — Template for the provider incident description/details.

## Response `200`

DAG incident routing updated

- IncidentPolicySet — Incident routing for a global, workspace, or DAG scope
  - `id` string — Stable routing ID, present after routing is saved
  - `scope` 'global' | 'workspace' | 'dag', required — Incident routing scope
  - `workspace` string — Workspace name for workspace-scoped routing
  - `dagName` string — DAG name for DAG-scoped routing
  - `enabled` boolean, required — Whether this scope can open new incidents
  - `inheritParent` boolean, required — For workspace and DAG routing, true means inherit the parent scope instead of using local routes
  - `policies` IncidentPolicy[], required
    - `id` string, required — Stable route ID
    - `providerId` string, required — Incident provider ID
    - `enabled` boolean, required — Whether this route is enabled
    - `severity` 'critical' | 'error' | 'warning' | 'info', required — Incident severity
    - `resolveOnRecovery` boolean, required — Deprecated. Dagu resolves saved open incidents on recovery.
    - `dedupKeyTemplate` string, required — Deprecated and ignored. Dagu generates stable provider incident keys.
    - `messageTemplate` string, required — Template for the provider incident summary/message
    - `descriptionTemplate` string, required — Template for the provider incident description/details
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `updatedBy` string — User ID that last updated routing

## Other responses

- `400` — Invalid incident routing
- `403` — Forbidden - requires an active Dagu license or trial
- `404` — DAG or referenced incident provider was not found
- `default` — Unexpected error

---

[API](https://skmtc.net/dagucloud/apis/dagu.md) · [All operations](https://skmtc.net/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/93cc41f2018a/schema)
