---
title: "Update a global webhook"
method: PATCH
path: "/admin/hooks/{hook_id}"
tags: ["enterprise-admin"]
---

# Update a global webhook

`PATCH /admin/hooks/{hook_id}`

Parameters that are not provided will be overwritten with the default value or removed if no default exists.

## Path parameters

- `hook_id` integer, required

## Request body

- object
  - `config` object — Key/value pairs to provide settings for this webhook.
    - `url` string, required — The URL to which the payloads will be delivered.
    - `content_type` string — The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
    - `secret` string — If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.5/webhooks/event-payloads/#delivery-headers) header.
    - `insecure_ssl` string — Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
  - `events` string[] — The [events](https://docs.github.com/enterprise-server@3.5/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.
  - `active` boolean — Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.

## Response `200`

Response

- GlobalHook2
  - `type` string
  - `id` integer
  - `name` string
  - `active` boolean
  - `events` string[]
  - `config` object
    - `url` string
    - `content_type` string
    - `insecure_ssl` string
  - `updated_at` string
  - `created_at` string
  - `url` string
  - `ping_url` string

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-4.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-4/versions/ee6c7a46328e/schema)
