Forgejo API
PATCH/admin/hooks/{id}

Update a global system webhook

Updates selected properties of a global system webhook. Supply only the fields you want to change in the optional body, including activation, authorization, branch filtering, configuration, or subscribed events. Omitted fields retain their existing values.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 5 body fields
idintegerrequired
The 64-bit integer identifier of the hook to update.

Optional partial update containing the webhook properties to change.

activebooleanoptional
Whether the webhook is active.
authorization_headerstringoptional
The authorization header value to include when delivering webhook requests.
branch_filterstringoptional
The branch pattern that limits which branch changes trigger the webhook.
configobjectoptional
Webhook configuration represented as an object of string values.
eventsarray<string>optional
The list of events that trigger webhook deliveries.

1 status code
200Returns the updated hook object with its current identifier, type, activation status, event list, configuration, URL, and timestamps.
activebooleanoptional
authorization_headerstringoptional
branch_filterstringoptional
configobjectoptional
Deprecated: use Metadata instead
content_typestringoptional
created_atstringoptional
eventsarray<string>optional
idintegeroptional
metadataunknownoptional
typestringoptional
updated_atstringoptional
urlstringoptional

Error handling

id must be an integer identifying the global webhook to update. Any supplied body fields must use their declared types, with active as a boolean, events as an array of strings, and config as an object of string values.