Create an organization webhook
POST {{baseUrl}}/orgs/:org/hooks
Here's how you can create a hook that posts payloads in JSON format:
Request Body
{"name"=>"<string>", "config"=>{"url"=>"<string>", "content_type"=>"<string>", "secret"=>"<string>", "insecure_ssl"=>"<string>", "username"=>"<string>", "password"=>"<string>"}, "events"=>["push"], "active"=>true}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"id":1,"url":"https://api.github.com/orgs/octocat/hooks/1","ping_url":"https://api.github.com/orgs/octocat/hooks/1/pings","name":"web","events":["push","pull_request"],"active":true,"config":{"url":"http://example.com","content_type":"json"},"updated_at":"2011-09-06T20:39:23Z","created_at":"2011-09-06T17:26:27Z","type":"Organization"}