Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 2.28 KB

updateWebhook.md

File metadata and controls

81 lines (57 loc) · 2.28 KB
name example route scope type
Update an organization webhook
octokit.rest.orgs.updateWebhook({ org, hook_id, config.url })
PATCH /orgs/{org}/hooks/{hook_id}
orgs
API method

Update an organization webhook

Updates a webhook configured in an organization. When you update a webhook, the secret will be overwritten. 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 an organization."

octokit.rest.orgs.updateWebhook({
        org,
hook_id,
config.url
      })

Parameters

name required description
orgyes

The organization name. The name is not case sensitive.

hook_idyes

The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.

configno

Key/value pairs to provide settings for this webhook.

config.urlyes

The URL to which the payloads will be delivered.

config.content_typeno

The media type used to serialize the payloads. Supported values include json and form. The default is form.

config.secretno

If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.

config.insecure_sslno
eventsno

Determines what events the hook is triggered for.

activeno

Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.

nameno

See also: GitHub Developer Guide documentation.