Skip to main content

Update a global webhook

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

PATCH/admin/hooks/{hook_id}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
hook_id integer
required
Header Parameters
accept string
required

This API is under preview and subject to change.

Body Params
optional
application/jsonobject
active boolean
optional

Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.

config object
optional

Key/value pairs to provide settings for this webhook.

content_type string
optional

The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.

insecure_ssl string
optional

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.**

secret string
optional

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/[email protected]/webhooks/event-payloads/#delivery-headers) header.

url string
required

The URL to which the payloads will be delivered.

events array[string]
optional

The [events](https://docs.github.com/[email protected]/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.

Responses

application/json global-hook-2 object

Response

active boolean
optional
config object
optional
content_type string
optional
insecure_ssl string
optional
url string
optional
created_at string
optional
events array[string]
optional
id integer
optional
name string
optional
ping_url string
optional
type string
optional
updated_at string
optional
url string
optional