orgs
Create an organization webhook
Here's how you can create a hook that posts payloads in JSON format:
post/orgs/{org}/hooks
Path parameters
orgstring required
The organization name. The name is not case sensitive.
Request body
Example request
{
"config": {
"url": "https://example.com/webhook",
"content_type": "\"json\"",
"secret": "\"********\"",
"insecure_ssl": "\"0\"",
"username": "\"kdaigle\"",
"password": "\"password\""
}
}Response
Response
Example response
{
"id": 1,
"url": "https://api.github.com/orgs/octocat/hooks/1",
"ping_url": "https://api.github.com/orgs/octocat/hooks/1/pings",
"deliveries_url": "https://api.github.com/orgs/octocat/hooks/1/deliveries",
"name": "web",
"events": [
"push",
"pull_request"
],
"active": true,
"config": {
"url": "\"http://example.com/2\"",
"insecure_ssl": "\"0\"",
"content_type": "\"form\"",
"secret": "\"********\""
},
"updated_at": "2011-09-06T20:39:23Z",
"created_at": "2011-09-06T17:26:27Z"
}