curl --location --request POST 'https://api.github.com/orgs//hooks' \
--header 'Content-Type: application/json' \
--data-raw '{
"active": true,
"config": {
"content_type": "json",
"url": "http://example.com/webhook"
},
"events": [
"push",
"pull_request"
],
"name": "web"
}'
{
"active": true,
"config": {
"content_type": "\"form\"",
"insecure_ssl": "\"0\"",
"secret": "\"********\"",
"url": "\"http://example.com/2\""
},
"created_at": "2011-09-06T17:26:27Z",
"events": [
"push",
"pull_request"
],
"id": 1,
"name": "web",
"ping_url": "https://api.github.com/orgs/octocat/hooks/1/pings",
"type": "string",
"updated_at": "2011-09-06T20:39:23Z",
"url": "https://api.github.com/orgs/octocat/hooks/1"
}
Authorization: Bearer ********************
true
to send notifications.json
and form
. The default is form
.secret
will be used as the key
to generate the HMAC hex digest value for delivery signature headers.