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

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: Created

{&quot;id&quot;:1,&quot;url&quot;:&quot;https://api.github.com/orgs/octocat/hooks/1&quot;,&quot;ping_url&quot;:&quot;https://api.github.com/orgs/octocat/hooks/1/pings&quot;,&quot;name&quot;:&quot;web&quot;,&quot;events&quot;:[&quot;push&quot;,&quot;pull_request&quot;],&quot;active&quot;:true,&quot;config&quot;:{&quot;url&quot;:&quot;http://example.com&quot;,&quot;content_type&quot;:&quot;json&quot;},&quot;updated_at&quot;:&quot;2011-09-06T20:39:23Z&quot;,&quot;created_at&quot;:&quot;2011-09-06T17:26:27Z&quot;,&quot;type&quot;:&quot;Organization&quot;}