PATCH /repos/{owner}/{repo}/hooks/{hook_id}

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."

Servers

Path parameters

Name Type Required Description
repo String Yes

The name of the repository without the .git extension. The name is not case sensitive.

owner String Yes

The account owner of the repository. The name is not case sensitive.

hook_id Integer Yes

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

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
add_events[] Array No

Determines a list of events to be added to the list of events that the Hook triggers for.

active Boolean No

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

Default value: true

config Object No

Configuration object of the webhook

config.content_type String No

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

config.url String No

The URL to which the payloads will be delivered.

config.secret String No

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

config.insecure_ssl No
remove_events[] Array No

Determines a list of events to be removed from the list of events that the Hook triggers for.

events[] Array No

Determines what events the hook is triggered for. This replaces the entire array of events.

Default value: [ "push" ]

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.