POST
/repos/{owner}/{repo}/hooksCreate a repository webhook
Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can
share the same config as long as those webhooks do not have any events that overlap.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
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.
namestringoptional
Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`.
configobjectoptional
Key/value pairs to provide settings for this webhook.
eventsarray<string>optional
Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.
activebooleanoptional
Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
201Response
typestringrequired
idintegerrequired
Unique identifier of the webhook.
namestringrequired
The name of a valid service, use 'web' for a webhook.
activebooleanrequired
Determines whether the hook is actually triggered on pushes.
eventsarray<string>required
Determines what events the hook is triggered for. Default: ['push'].
configobjectrequired
Configuration object of the webhook
updated_atstringrequired
created_atstringrequired
urlstringrequired
test_urlstringrequired
ping_urlstringrequired
deliveries_urlstringoptional
last_responseobjectrequired
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.