---
title: "Update a webhook configuration for a repository"
method: PATCH
path: "/repos/{owner}/{repo}/hooks/{hook_id}/config"
tags: ["repos"]
---

# Update a webhook configuration for a repository

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

Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/webhooks/repos#update-a-repository-webhook)."

Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission.

## Path parameters

- `owner` string, required
- `repo` string, required
- `hook_id` integer, required

## Request body

- object
  - `url` string, uri — The URL to which the payloads will be delivered.
  - `content_type` string — The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
  - `secret` string — If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.7/webhooks/event-payloads/#delivery-headers).
  - `insecure_ssl` union
    - string — Determines whether the SSL certificate of the host for `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.**
    - number

## Response `200`

Response

- WebhookConfig — Configuration object of the webhook
  - `url` string, uri — The URL to which the payloads will be delivered.
  - `content_type` string — The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
  - `secret` string — If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.7/webhooks/event-payloads/#delivery-headers).
  - `insecure_ssl` union
    - string — Determines whether the SSL certificate of the host for `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.**
    - number

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-6.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-6/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-6/versions/15db3fa0759b/schema)
