Sample - GitHub REST API
GET/repos/{owner}/{repo}/hooks/{hook_id}/config

Get a webhook configuration for a repository

Returns the webhook configuration for a repository. To get more information about the webhook, including the active state and events, use "Get a repository webhook."

OAuth app tokens and personal access tokens (classic) need the read:repo_hook or repo scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
hook_idintegerrequired
The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery.

1 status code
200Response
urlstringoptional
The URL to which the payloads will be delivered.
content_typestringoptional
The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
secretstringoptional
If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers).
insecure_sslstringoptional
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.**