# List pre-receive hooks for an organization

From **GitHub v3 REST API**.

`GET /orgs/{org}/pre-receive-hooks`

List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed.

## Parameters

### `org`

- Location: path
- Required: true
- Type: `string`

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

### `direction`

- Location: query
- Required: false
- Type: `string`
- Default: `desc`
- Allowed values: `"asc"`, `"desc"`

One of `asc` (ascending) or `desc` (descending).

### `sort`

- Location: query
- Required: false
- Type: `string`
- Default: `created`
- Allowed values: `"created"`, `"updated"`, `"name"`

The sort order for the response collection.

## Responses

### `200`

Response

### `application/json`

- Type: `array`

```json
[
  {
    "allow_downstream_configuration": true,
    "configuration_url": "https://github.example.com/api/v3/admin/pre-receive-hooks/42",
    "enforcement": "disabled",
    "id": 42,
    "name": "Check Commits"
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/org-pre-receive-hook"},"type":"array"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/orgs/{org}/pre-receive-hooks
```
