---
title: "Update a hook"
method: PATCH
path: "/admin/hooks/{id}"
tags: ["admin"]
---

# Update a hook

`PATCH /admin/hooks/{id}`

## Path parameters

- `id` integer, required

## Request body

- EditHookOption — EditHookOption options when modify one hook
  - `active` boolean — Whether the webhook is active and will be triggered
  - `authorization_header` string — Authorization header to include in webhook requests
  - `branch_filter` string — Branch filter pattern to determine which branches trigger the webhook
  - `config` object — Configuration settings for the webhook
  - `events` string[] — List of events that trigger this webhook
  - `name` string — Optional human-readable name

## Response `200`

Hook

- Hook — Hook a hook is a web hook when one repository changed
  - `active` boolean — Whether the webhook is active and will be triggered
  - `authorization_header` string — Authorization header to include in webhook requests
  - `branch_filter` string — Branch filter pattern to determine which branches trigger the webhook
  - `config` object — Configuration settings for the webhook
  - `created_at` string, date-time — The date and time when the webhook was created
  - `events` string[] — List of events that trigger this webhook
  - `id` integer — The unique identifier of the webhook
  - `name` string — Optional human-readable name for the webhook
  - `type` string — The type of the webhook (e.g., gitea, slack, discord)
  - `updated_at` string, date-time — The date and time when the webhook was last updated

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/versions/350de506cefa/schema)
