# hook

From **GitHub v3 REST API**.

Webhooks for repositories.

- Type: `object`

## Properties

### `active`

- Required: true
- Type: `boolean`
- Example: `true`

Determines whether the hook is actually triggered on pushes.

### `config`

- Required: true
- Type: `object`

### `created_at`

- Required: true
- Type: `string`
- Format: `date-time`
- Example: `2011-09-06T17:26:27Z`

### `events`

- Required: true
- Type: `array`
- Example: `[
  "push",
  "pull_request"
]`

Determines what events the hook is triggered for. Default: ['push'].

### `id`

- Required: true
- Type: `integer`
- Example: `42`

Unique identifier of the webhook.

### `last_response`

- Required: true
- Type: `object`

### `name`

- Required: true
- Type: `string`
- Example: `web`

The name of a valid service, use 'web' for a webhook.

### `ping_url`

- Required: true
- Type: `string`
- Format: `uri`
- Example: `https://api.github.com/repos/octocat/Hello-World/hooks/1/pings`

### `test_url`

- Required: true
- Type: `string`
- Format: `uri`
- Example: `https://api.github.com/repos/octocat/Hello-World/hooks/1/test`

### `type`

- Required: true
- Type: `string`

### `updated_at`

- Required: true
- Type: `string`
- Format: `date-time`
- Example: `2011-09-06T20:39:23Z`

### `url`

- Required: true
- Type: `string`
- Format: `uri`
- Example: `https://api.github.com/repos/octocat/Hello-World/hooks/1`

## JSON Schema

```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"}
```
