---
title: "Regenerate webhook token"
method: POST
path: "/dags/{fileName}/webhook/regenerate"
tags: ["webhooks"]
---

# Regenerate webhook token

`POST /dags/{fileName}/webhook/regenerate`

Generates a new token for the existing webhook. The old token becomes
invalid immediately. Returns the new token, which is only shown once.
Developer, manager, or admin only.

## Path parameters

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

## Query parameters

- `remoteNode` string

## Response `200`

Token regenerated successfully

- WebhookCreateResponse — Response when creating or regenerating a webhook (includes full token)
  - `webhook` WebhookDetails, required — Webhook configuration details (token not included)
    - `id` string, uuid, required — Unique identifier for the webhook
    - `dagName` string, required — Name of the DAG this webhook triggers
    - `tokenPrefix` string, required — First 8 characters of the token for identification
    - `enabled` boolean, required — Whether the webhook is active
    - `authMode` 'token_only' | 'token_and_hmac' | 'hmac_only', required — Authentication mode for a webhook trigger endpoint
    - `hmac` WebhookHMACDetails, required — Public webhook HMAC configuration details
      - `enabled` boolean, required — Whether HMAC authentication is currently enabled
      - `enforcementMode` 'strict' | 'observe' — How HMAC validation is enforced when HMAC is enabled
      - `algorithm` string — Fixed HMAC algorithm for v1
      - `headerName` string — Header containing the HMAC signature
      - `format` string — Expected signature header value format
      - `secretConfigured` boolean, required — Whether an HMAC secret is configured for the webhook
      - `updatedAt` string, date-time — When the HMAC secret was last generated
    - `profileSelection` WebhookProfileSelectionDetails, required — Runtime profiles that webhook callers may select
      - `allowedProfiles` RuntimeProfileName[], required — Runtime profile names accepted through X-Dagu-Profile. An empty list disables caller selection.
    - `createdAt` string, date-time, required — When the webhook was created
    - `updatedAt` string, date-time, required — When the webhook was last modified
    - `createdBy` string — User ID who created the webhook
    - `lastUsedAt` string, date-time — When the webhook was last triggered
  - `token` string, required — Full webhook token (only shown once, store securely!)

## Other responses

- `404` — No webhook configured for this DAG
- `default` — Unexpected error

## Changes

- **2026-08-07** (v1) `8d56f368c05a` — 1 info
  - added the required property `webhook/profileSelection` to the response with the `200` status
- **2026-07-23** (v1) `75b8e91aaf57` — 6 warning
  - 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`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `404`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `default`
  - …2 more
- **2026-05-24** (v1) `8a2d5d3e9608` — 2 warning
  - 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-04-30** (v1) `50e1d517afc1` — 2 info
  - removed the `rate_limited` enum value from the `code` response property for the response status `404`
  - removed the `rate_limited` enum value from the `code` response property for the response status `default`

[Change history](https://skmtc.dev/dagucloud/apis/dagu/changes/dags/:fileName/webhook/regenerate/post.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)
