---
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

## Changes

- **2026-07-23** (v1) `75b8e91aaf57` — 12 warning
  - added the new `conflict` enum value to the `code` response property for the response status `400`
  - added the new `conflict` enum value to the `code` response property for the response status `403`
  - added the new `conflict` enum value to the `code` response property for the response status `404`
  - added the new `conflict` enum value to the `code` response property for the response status `default`
  - …8 more
- **2026-05-24** (v1) `8a2d5d3e9608` — 4 warning
  - added the new `rate_limited` enum value to the `code` response property for the response status `400`
  - added the new `rate_limited` enum value to the `code` response property for the response status `403`
  - added the new `rate_limited` enum value to the `code` response property for the response status `404`
  - added the new `rate_limited` enum value to the `code` response property for the response status `default`
- **2026-05-18** (v1) `9216dd5a50bc` — 1 info
  - endpoint added
- **2026-04-30** (v1) `50e1d517afc1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/dagucloud/apis/dagu/changes/dags/:fileName/incidents/put.md)

---

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