This version of GitHub Enterprise was discontinued on 2022-06-03. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.
GitHub App webhooks
About the GitHub App webhooks API
A GitHub App's webhook allows you to receive HTTP POST payloads whenever certain events happen for an app. The webhook REST APIs enable you to manage repository, organization, and app webhooks. You can also use the REST API to change the configuration of the webhook. For example, you can modify the payload URL, content type, SSL verification, and secret. For more information, see:
Get a webhook configuration for an app
Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "Creating a GitHub App."
You must use a JWT to access this endpoint.
HTTP response status codes
| Status code | Description |
|---|---|
200 | OK |
Code samples
curl \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/app/hook/configResponse
Status: 200{ "content_type": "json", "insecure_ssl": "0", "secret": "********", "url": "https://example.com/webhook" }Update a webhook configuration for an app
Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "Creating a GitHub App."
You must use a JWT to access this endpoint.
Parameters
| Headers |
|---|
| Name, Type, Description |
acceptstringSetting to |
| Body parameters |
| Name, Type, Description |
urlstringThe URL to which the payloads will be delivered. |
content_typestringThe media type used to serialize the payloads. Supported values include |
secretstringIf provided, the |
insecure_sslstring or number or Determines whether the SSL certificate of the host for |
HTTP response status codes
| Status code | Description |
|---|---|
200 | OK |
Code samples
curl \ -X PATCH \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token <TOKEN>" \ http(s)://HOSTNAME/api/v3/app/hook/config \ -d '{"content_type":"json","insecure_ssl":"0","secret":"********","url":"https://example.com/webhook"}'Response
Status: 200{ "content_type": "json", "insecure_ssl": "0", "secret": "********", "url": "https://example.com/webhook" }