# Update a webhook endpoint

`PATCH /v1/orgs/{orgId}/webhooks/{webhookId}`

Change the URL, events, or disabled state (webhooks:manage, AAL2). Enabling in production requires the production-API grant.

Requires: permission webhooks:manage; second factor for browser sessions

## Request body

- `url` (string (uri)): 
- `description` (string): 
- `events` (string[]): 
- `disabled` (boolean): 

```json
{
  "url": "https://hooks.acme-robotics.example/payezy",
  "description": "Production webhook receiver",
  "events": [
    "events"
  ],
  "disabled": false
}
```

Errors: invalid_url, invalid_event

```bash
curl -X PATCH "https://sandbox-api.payezy.io/v1/orgs/$ORG_ID/webhooks/$WEBHOOK_ID" \
  -H "Authorization: Bearer $PAYEZY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://hooks.acme-robotics.example/payezy",
  "description": "Production webhook receiver",
  "events": [
    "events"
  ],
  "disabled": false
}'
```
