# Update a webhook configuration for a repository

From **GitHub v3 REST API**.

`PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config`

Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)."

Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission.

## Parameters

### `owner`

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

### `repo`

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

### `hook_id`

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

## Request body

- Required: false
### `application/json`

- Type: `object`
- Example: `{
  "content_type": "json",
  "insecure_ssl": "0",
  "secret": "********",
  "url": "https://example.com/webhook"
}`

```json
{
  "content_type": "json",
  "insecure_ssl": "0",
  "secret": "********",
  "url": "https://example.com/webhook"
}
```

```json
{"additionalProperties":false,"example":{"content_type":"json","insecure_ssl":"0","secret":"********","url":"https://example.com/webhook"},"properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"type":"object"}
```

## Responses

### `200`

Response

### `application/json`

- Type: `object`

Configuration object of the webhook

```json
{
  "content_type": "json",
  "insecure_ssl": "0",
  "secret": "********",
  "url": "https://example.com/webhook"
}
```

```json
{"description":"Configuration object of the webhook","properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"title":"Webhook Configuration","type":"object"}
```

## Request examples

### cURL

```shell
curl --request PATCH \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/hooks/{hook_id}/config \
  --header 'content-type: application/json' \
  --data '{
  "content_type": "json",
  "insecure_ssl": "0",
  "secret": "********",
  "url": "https://example.com/webhook"
}'
```
