---
title: "Update a webhook"
method: PATCH
path: "/api/v1/restaurants/{restaurant_id}/webhooks/{id}"
tags: ["Webhook"]
---

# Update a webhook

`PATCH /api/v1/restaurants/{restaurant_id}/webhooks/{id}`

## Request

- Base URL: `https://gotable.app`
- URL: `https://gotable.app/api/v1/restaurants/{restaurant_id}/webhooks/{id}`
- Auth: HTTP bearer

## Path parameters

- `restaurant_id` integer, required
- `id` integer, required

## Request body

- object
  - `name` string
  - `url` string
  - `events` string[]
  - `enabled` boolean

## Response `200`

With a valid update

- Webhook
  - `id` integer: The unique ID of the webhook
  - `restaurant_id` integer: The unique ID of the restaurant
  - `name` string: Human-readable label for the webhook
  - `url` string, uri: The HTTP(S) endpoint the webhook will POST to
  - `events` string[]: Event types the webhook is subscribed to
  - `enabled` boolean: Whether the webhook is currently active
  - `disabled_at` string, datetime, nullable: When the webhook was auto-disabled after a delivery exhausted all retry attempts, if applicable
  - `last_delivered_at` string, datetime, nullable: The datetime of the last delivery attempt
  - `last_response_status` integer, nullable: HTTP status code of the most recent delivery attempt
  - `created_at` string, datetime: The datetime the webhook was created
  - `updated_at` string, datetime: The datetime the webhook was last updated
  - `secret` string, nullable: HMAC-SHA256 signing secret used to sign outbound deliveries per the [Standard Webhooks](https://www.standardwebhooks.com/) spec. Returned on every response. Store it server-side and use it to verify the `webhook-signature` header on incoming deliveries.
  - `links` Link[]: Hypermedia links for this webhook
    - `href` string: The URL to the related resource.
    - `method` 'GET' | 'POST' | 'PUT' | 'DELETE': The HTTP method that should be used to follow the link.
    - `rel` string: The relationship of this link to the current resource.

---

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