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

# Update a webhook endpoint

`PATCH /webhooks/{id}`

## Request

- Base URL: `https://api.groundmail.dev`
- URL: `https://api.groundmail.dev/webhooks/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- UpdateWebhookRequest
  - `url` string, uri
  - `events` WebhookEventType[]
  - `enabled` boolean
  - `tenants` string[], nullable: Only email events of these tenants (`external_id` or `id`). Such an endpoint gets no `email.received`, `contact.*` or `automation.*` events. `[]` or `null` removes the filter (every event).

## Response `200`

Webhook updated

- WebhookResponse
  - `webhook` WebhookEndpoint, required
    - `id` string, required
    - `url` string, uri, required
    - `events` WebhookEventType[], required
    - `enabled` boolean, required
    - `tenants` string[]: The tenants (`external_id`) whose email events this endpoint receives. Present only on endpoints with a tenant filter.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `404`: Webhook not found

---

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