Create an organization webhook
Here's how you can create a hook that posts payloads in JSON format:
/orgs/{org}/hooks- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- org stringrequired
Body Params
requiredDetermines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
config objectrequiredKey/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/[email protected]/rest/reference/orgs#create-hook-config-params).
Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/[email protected]/rest/reference/orgs#create-hook-config-params).
The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
Example: "json"
Example: "password"
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/[email protected]/webhooks/event-payloads/#delivery-headers).
Example: "********"
The URL to which the payloads will be delivered.
Example: https://example.com/webhook
Example: "kdaigle"
Determines what [events](https://docs.github.com/[email protected]/webhooks/event-payloads) the hook is triggered for.
Must be passed as "web".
Responses
Response
Headers
Example: https://api.github.com/orgs/octocat/hooks/1
Example: true
config objectrequired
Example: "form"
Example: "0"
Example: "********"
Example: "http://example.com/2"
Example: 2011-09-06T17:26:27Z
[
"push",
"pull_request"
]Example: 1
Example: web
Example: https://api.github.com/orgs/octocat/hooks/1/pings
Example: 2011-09-06T20:39:23Z
Example: https://api.github.com/orgs/octocat/hooks/1
Resource not found
Validation failed