Use the REST API to interact with webhooks in an organization.
Organization webhooks allow your server to receive HTTP POST payloads whenever certain events happen in an organization. For more information, see Webhooks documentation.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /orgs/{org}/hooks
List webhooks for an organization.
The authenticated user 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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/hooks
Response schema (Status: 200):
Array of Org Hook:
id: required, integerurl: required, string, format: uriping_url: required, string, format: urideliveries_url: string, format: uriname: required, stringevents: required, array of stringactive: required, booleanconfig: required, object:
url: stringinsecure_ssl: stringcontent_type: stringsecret: stringupdated_at: required, string, format: date-timecreated_at: required, string, format: date-timetype: required, stringPOST /orgs/{org}/hooks
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)name (string) (required)
Must be passed as "web".
config (object) (required)
Key/value pairs to provide settings for this webhook.
url (string) (required)content_type (string)secret (string)insecure_ssl (string or number)username (string)password (string)events (array of strings)
Determines what events the hook is triggered for. Set to ["*"] to receive all possible events.
Default: push
active (boolean)
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Default: true
201 - Created
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/orgs/ORG/hooks \
-d '{
"name": "web",
"active": true,
"events": [
"push",
"pull_request"
],
"config": {
"url": "http://example.com/webhook",
"content_type": "json"
}
}'
Response schema (Status: 201):
id: required, integerurl: required, string, format: uriping_url: required, string, format: urideliveries_url: string, format: uriname: required, stringevents: required, array of stringactive: required, booleanconfig: required, object:
url: stringinsecure_ssl: stringcontent_type: stringsecret: stringupdated_at: required, string, format: date-timecreated_at: required, string, format: date-timetype: required, stringGET /orgs/{org}/hooks/{hook_id}
Returns a webhook configured in an organization. To get only the webhook
config properties, see "Get a webhook configuration for an organization.
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/hooks/HOOK_ID
Response schema (Status: 200):
Same response schema as Create an organization webhook.
PATCH /orgs/{org}/hooks/{hook_id}
Updates a webhook configured in an organization. When you update a webhook,
the secret will be overwritten. If you previously had a secret set, you must
provide the same secret or set a new secret or the secret will be removed. If
you are only updating individual webhook config properties, use "Update a webhook
configuration for an organization".
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
config (object)
Key/value pairs to provide settings for this webhook.
url (string) (required)content_type (string)secret (string)insecure_ssl (string or number)events (array of strings)
Determines what events the hook is triggered for.
Default: push
active (boolean)
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Default: true
name (string)
200 - OK
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X PATCH \
https://api.github.com/orgs/ORG/hooks/HOOK_ID \
-d '{
"active": true,
"events": [
"pull_request"
]
}'
Response schema (Status: 200):
Same response schema as Create an organization webhook.
DELETE /orgs/{org}/hooks/{hook_id}
Delete a webhook for an organization.
The authenticated user 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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
204 - No Content
404 - Resource not found
Request:
curl -L \
-X DELETE \
https://api.github.com/orgs/ORG/hooks/HOOK_ID
Response schema (Status: 204):
GET /orgs/{org}/hooks/{hook_id}/config
Returns the webhook configuration for an organization. To get more information about the webhook, including the active state and events, use "Get an organization webhook ."
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/hooks/HOOK_ID/config
Response schema (Status: 200):
url: string, format: uricontent_type: stringsecret: stringinsecure_ssl: one of:
PATCH /orgs/{org}/hooks/{hook_id}/config
Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use "Update an organization webhook ."
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
url (string)
The URL to which the payloads will be delivered.
content_type (string)
The media type used to serialize the payloads. Supported values include json and form. The default is form.
secret (string)
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
insecure_ssl (string or number)
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.
Request:
curl -L \
-X PATCH \
https://api.github.com/orgs/ORG/hooks/HOOK_ID/config \
-d '{
"url": "http://example.com/webhook",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
}'
Response schema (Status: 200):
Same response schema as Get a webhook configuration for an organization.
GET /orgs/{org}/hooks/{hook_id}/deliveries
Returns a list of webhook deliveries for a webhook configured in an organization.
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
cursor (string)
Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.
status (string)
Returns webhook deliveries filtered by delivery outcome classification based on status_code range. A status of success returns deliveries with a status_code in the 200-399 range (inclusive). A status of failure returns deliveries with a status_code in the 400-599 range (inclusive).
Can be one of: success, failure
200 - OK
400 - Bad Request
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/hooks/HOOK_ID/deliveries
Response schema (Status: 200):
Array of Simple webhook delivery:
id: required, integer, format: int64guid: required, stringdelivered_at: required, string, format: date-timeredelivery: required, booleanduration: required, numberstatus: required, stringstatus_code: required, integerevent: required, stringaction: required, string or nullinstallation_id: required, integer or null, format: int64repository_id: required, integer or null, format: int64throttled_at: string or null, format: date-timeGET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}
Returns a delivery for a webhook configured in an organization.
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
delivery_id (integer) (required)
200 - OK
400 - Bad Request
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/hooks/HOOK_ID/deliveries/DELIVERY_ID
Response schema (Status: 200):
id: required, integerguid: required, stringdelivered_at: required, string, format: date-timeredelivery: required, booleanduration: required, numberstatus: required, stringstatus_code: required, integerevent: required, stringaction: required, string or nullinstallation_id: required, integer or nullrepository_id: required, integer or nullthrottled_at: string or null, format: date-timeurl: stringrequest: required, object:
headers: required, object or null, additional properties allowedpayload: required, object or null, additional properties allowedresponse: required, object:
headers: required, object or null, additional properties allowedpayload: required, string or null, additional properties allowedPOST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts
Redeliver a delivery for a webhook configured in an organization.
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
delivery_id (integer) (required)
202 - Accepted
400 - Bad Request
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/orgs/ORG/hooks/HOOK_ID/deliveries/DELIVERY_ID/attempts
Response schema (Status: 202):
object
POST /orgs/{org}/hooks/{hook_id}/pings
This will trigger a ping event
to be sent to the hook.
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.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
hook_id (integer) (required)
The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.
204 - No Content
404 - Resource not found
Request:
curl -L \
-X POST \
https://api.github.com/orgs/ORG/hooks/HOOK_ID/pings
Response schema (Status: 204):