curl --location --request POST 'https://api.github.com/admin/hooks' \
--header 'accept;' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"content_type": "json",
"secret": "secret",
"url": "https://example.com/webhook"
},
"events": [
"organization",
"user"
],
"name": "web"
}'
{
"active": true,
"config": {
"content_type": "string",
"insecure_ssl": "string",
"secret": "string",
"url": "string"
},
"created_at": "string",
"events": [
"string"
],
"id": 0,
"name": "string",
"ping_url": "string",
"type": "string",
"updated_at": "string",
"url": "string"
}
Authorization: Bearer ********************
true
to send notifications.json
and form
. The default is form
.url
will be verified when delivering payloads. Supported values include 0
(verification is performed) and 1
(verification is not performed). The default is 0
. We strongly recommend not setting this to 1
as you are subject to man-in-the-middle and other attacks.secret
will be used as the key
to generate the HMAC hex digest value in the X-Hub-Signature
header.user
and organization
events. Default: user
and organization
.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通