repos
Update a repository webhook
Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use "Update a webhook configuration for a repository."
patch/repos/{owner}/{repo}/hooks/{hook_id}
Path parameters
ownerstring required
The account owner of the repository. The name is not case sensitive.
repostring required
The name of the repository without the .git extension. The name is not case sensitive.
hook_idinteger required
The unique identifier of the hook.
Request body
Example request
{
"config": {
"url": "https://example.com/webhook",
"content_type": "\"json\"",
"secret": "\"********\"",
"insecure_ssl": "\"0\"",
"address": "\"bar@example.com\"",
"room": "\"The Serious Room\""
}
}Response
Response
Example response
{
"id": 42,
"name": "web",
"active": true,
"events": [
"push",
"pull_request"
],
"config": {
"email": "\"foo@bar.com\"",
"password": "\"foo\"",
"room": "\"roomer\"",
"subdomain": "\"foo\"",
"url": "https://example.com/webhook",
"insecure_ssl": "\"0\"",
"content_type": "\"json\"",
"digest": "\"sha256\"",
"secret": "\"********\"",
"token": "\"abc\""
},
"updated_at": "2011-09-06T20:39:23Z",
"created_at": "2011-09-06T17:26:27Z",
"url": "https://api.github.com/repos/octocat/Hello-World/hooks/1",
"test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/1/test",
"ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/1/pings",
"deliveries_url": "https://api.github.com/repos/octocat/Hello-World/hooks/1/deliveries"
}