---
title: "Get a pre-receive hook"
method: GET
path: "/admin/pre-receive-hooks/{pre_receive_hook_id}"
tags: ["enterprise-admin"]
---

# Get a pre-receive hook

`GET /admin/pre-receive-hooks/{pre_receive_hook_id}`

## Path parameters

- `pre_receive_hook_id` integer, required

## Response `200`

Response

- PreReceiveHook
  - `id` integer
  - `name` string
  - `enforcement` string
  - `script` string
  - `script_repository` object
    - `id` integer
    - `full_name` string
    - `url` string
    - `html_url` string
  - `environment` object
    - `id` integer
    - `name` string
    - `image_url` string
    - `url` string
    - `html_url` string
    - `default_environment` boolean
    - `created_at` string
    - `hooks_count` integer
    - `download` object
      - `url` string
      - `state` string
      - `downloaded_at` string, nullable
      - `message` string, nullable
  - `allow_downstream_configuration` boolean

---

[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)
