POST
/orgs/{org}/hooksCreate an organization webhook
Create a hook that posts payloads in JSON format.
You must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need admin:org_hook scope. OAuth apps cannot list, view, or
edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
Must be passed as "web".
configobjectrequired
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. Set to `["*"]` to receive all possible events.
activebooleanoptional
Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
201Response
idintegerrequired
urlstringrequired
ping_urlstringrequired
deliveries_urlstringoptional
namestringrequired
eventsarray<string>required
activebooleanrequired
configobjectrequired
updated_atstringrequired
created_atstringrequired
typestringrequired
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 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.