---
title: "Update pre-receive hook enforcement for an organization"
method: PATCH
path: "/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}"
tags: ["enterprise-admin"]
---

# Update pre-receive hook enforcement for an organization

`PATCH /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}`

For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration`

## Path parameters

- `org` string, required
- `pre_receive_hook_id` integer, required

## Request body

- object
  - `enforcement` string — The state of enforcement for the hook on this repository.
  - `allow_downstream_configuration` boolean — Whether repositories can override enforcement.

## Response `200`

Response

- OrgPreReceiveHook
  - `id` integer
  - `name` string
  - `enforcement` string
  - `configuration_url` string
  - `allow_downstream_configuration` boolean

---

[API](https://skmtc.net/github/apis/ghes.md) · [All operations](https://skmtc.net/github/apis/ghes/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/ghes/revisions/5438365412fe/schema)
