v51

latestOpenAPI 3.0.0GPL-3.0raw.githubusercontent.com2026-08-01199241439.9 KB
webhooks

Trigger DAG execution via webhook

Triggers a DAG execution via webhook. The DAG must have a webhook configured and enabled. Authentication depends on the webhook auth mode: bearer token only, bearer token plus HMAC, or HMAC only.

The request body is passed to the DAG as the WEBHOOK_PAYLOAD environment variable. If the DAG configures webhook.forward_headers, selected request headers are passed as the WEBHOOK_HEADERS environment variable. For safety, the Authorization header is never forwarded. The DAG run is enqueued and the endpoint returns immediately with the dag-run ID.

post/webhooks/{fileName}

Path parameters

fileNamestring regex required

Name of the DAG file

the name of the DAG file

Query parameters

remoteNodestring

name of the remote node

Headers

Authorizationstring

Bearer token for webhook authentication (e.g., 'Bearer dagu_wh_...'). Required only when the webhook auth mode includes token authentication.

X-Dagu-Signaturestring
Example:sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

HMAC webhook signature in the format 'sha256=<hex>'. Required only when the webhook auth mode includes HMAC authentication with strict enforcement.

Request body

dagRunIdstring

Optional idempotency key. If provided and a DAG run with this ID already exists, the endpoint returns 409 Conflict. If not provided, a new UUID is generated.

payloadobject

Arbitrary JSON payload to pass to the DAG as WEBHOOK_PAYLOAD

Example request

{
  "dagRunId": "latest"
}

Response

DAG run triggered successfully

dagRunIdstring required

Unique identifier for the DAG-run. The special value 'latest' can be used to reference the most recent DAG-run.

dagNamestring required

Name of the triggered DAG

Example response

{
  "dagRunId": "latest"
}