---
title: "Update a webhook"
method: PATCH
path: "/events/webhooks/{webhook_id}"
tags: ["Webhooks"]
---

# Update a webhook

`PATCH /events/webhooks/{webhook_id}`

## Request

- Base URL: `https://api.sandbase.ai`
- URL: `https://api.sandbase.ai/events/webhooks/{webhook_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Updates the fields sent; omitted fields remain unchanged. The resulting resourceType and events subscription must be valid. signatureSecret cannot be changed.

## Request body

- WebhookUpdateRequest
  - `name` string
  - `url` string, uri
  - `resourceType` 'model'
  - `events` string[]
  - `enabled` boolean

## Response `200`

Updated webhook

- Webhook
  - `id` string, required
  - `name` string, required
  - `url` string, uri, required
  - `resourceType` string, required: model for new registrations. Retired types (session, sandbox, template) can still appear on old registrations.
  - `events` string[], required: Empty means all events in the resource type.
  - `enabled` boolean, required
  - `createdAt` string, date-time, required

## Other responses

- `400`: Invalid body or subscription, or the request includes signatureSecret
- `401`: Missing, invalid, or revoked API key
- `404`: webhook not found
- `500`: Webhook update failed

---

[API](https://skmtc.dev/sandbase/apis/sandbase-api.md) · [All operations](https://skmtc.dev/sandbase/apis/sandbase-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sandbase/apis/sandbase-api/revisions/d40df2467ba2?raw)
