# Get a repository webhook

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/hooks/{hook_id}`

Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)."

## Parameters

### `owner`

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

### `repo`

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

### `hook_id`

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

## Responses

### `200`

Response

### `application/json`

- Type: `object`

Webhooks for repositories.

```json
{
  "active": true,
  "config": {
    "content_type": "json",
    "insecure_ssl": "0",
    "url": "https://example.com/webhook"
  },
  "created_at": "2019-06-03T00:57:16Z",
  "events": [
    "push",
    "pull_request"
  ],
  "id": 12345678,
  "last_response": {
    "code": null,
    "message": null,
    "status": "unused"
  },
  "name": "web",
  "ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings",
  "test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test",
  "type": "Repository",
  "updated_at": "2019-06-03T00:57:16Z",
  "url": "https://api.github.com/repos/octocat/Hello-World/hooks/12345678"
}
```

```json
{"description":"Webhooks for repositories.","properties":{"active":{"description":"Determines whether the hook is actually triggered on pushes.","example":true,"type":"boolean"},"config":{"properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"digest":{"example":"\"sha256\"","type":"string"},"email":{"example":"\"foo@bar.com\"","type":"string"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"password":{"example":"\"foo\"","type":"string"},"room":{"example":"\"roomer\"","type":"string"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"subdomain":{"example":"\"foo\"","type":"string"},"token":{"example":"\"abc\"","type":"string"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"type":"object"},"created_at":{"example":"2011-09-06T17:26:27Z","format":"date-time","type":"string"},"events":{"description":"Determines what events the hook is triggered for. Default: ['push'].","example":["push","pull_request"],"items":{"type":"string"},"type":"array"},"id":{"description":"Unique identifier of the webhook.","example":42,"type":"integer"},"last_response":{"$ref":"#/components/schemas/hook-response"},"name":{"description":"The name of a valid service, use 'web' for a webhook.","example":"web","type":"string"},"ping_url":{"example":"https://api.github.com/repos/octocat/Hello-World/hooks/1/pings","format":"uri","type":"string"},"test_url":{"example":"https://api.github.com/repos/octocat/Hello-World/hooks/1/test","format":"uri","type":"string"},"type":{"type":"string"},"updated_at":{"example":"2011-09-06T20:39:23Z","format":"date-time","type":"string"},"url":{"example":"https://api.github.com/repos/octocat/Hello-World/hooks/1","format":"uri","type":"string"}},"required":["id","url","type","name","active","events","config","ping_url","created_at","updated_at","last_response","test_url"],"title":"Webhook","type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/hooks/{hook_id}
```
