---
title: "Update an organization webhook"
method: PATCH
path: "/orgs/{org}/hooks/{hook_id}"
tags: ["orgs"]
---

# Update an organization webhook

`PATCH /orgs/{org}/hooks/{hook_id}`

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](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)".

You must be an organization owner to use this endpoint.

OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

## Path parameters

- `org` string, required
- `hook_id` integer, required

## Request body

- object
  - `config` object — Key/value pairs to provide settings for this webhook.
    - `url` string, uri, required — 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/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
  - `events` string[] — Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.
  - `active` boolean — Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.
  - `name` string

## Response `200`

Response

- OrgHook — Org Hook
  - `id` integer, required
  - `url` string, uri, required
  - `ping_url` string, uri, required
  - `deliveries_url` string, uri
  - `name` string, required
  - `events` string[], required
  - `active` boolean, required
  - `config` object, required
    - `url` string
    - `insecure_ssl` string
    - `content_type` string
    - `secret` string
  - `updated_at` string, date-time, required
  - `created_at` string, date-time, required
  - `type` string, required

## Other responses

- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

---

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