name | example | route | scope | type |
---|---|---|---|---|
Create an organization webhook |
octokit.rest.orgs.createWebhook({ org, name, config, config.url }) |
POST /orgs/{org}/hooks |
orgs |
API method |
Here's how you can create a hook that posts payloads in JSON format:
octokit.rest.orgs.createWebhook({
org,
name,
config,
config.url
})
name | required | description |
---|---|---|
org | yes |
The organization name. The name is not case sensitive. |
name | yes |
Must be passed as "web". |
config | yes |
Key/value pairs to provide settings for this webhook. |
config.url | yes |
The URL to which the payloads will be delivered. |
config.content_type | no |
The media type used to serialize the payloads. Supported values include |
config.secret | no |
If provided, the |
config.insecure_ssl | no | |
config.username | no | |
config.password | no | |
events | no |
Determines what events the hook is triggered for. Set to |
active | no |
Determines if notifications are sent when the webhook is triggered. Set to |
See also: GitHub Developer Guide documentation.