---
title: "List pre-receive hooks"
method: GET
path: "/admin/pre-receive-hooks"
tags: ["enterprise-admin"]
---

# List pre-receive hooks

`GET /admin/pre-receive-hooks`

## Query parameters

- `per_page` integer
- `page` integer
- `direction` 'asc' | 'desc'
- `sort` 'created' | 'updated' | 'name'

## 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-5.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-5/versions/50ae54440071/schema)
