---
title: "Update webhook subscription"
method: PATCH
path: "/api/webhook-subscriptions/{id}"
tags: ["Webhooks"]
---

# Update webhook subscription

`PATCH /api/webhook-subscriptions/{id}`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/webhook-subscriptions/{id}`
- Auth: one of:
  - API key in cookie `luca.session_token`
  - API key in header `x-api-key`
  - HTTP bearer

Changes the target URL, the event types, or the active flag. We re-check the URL on every change.

**API key scopes:** `webhooks:write`. You also need an `Idempotency-Key` header.

## Path parameters

- `id` string, uuid, required

## Headers

- `Luca-API-Version` '1'

## Request body

- WebhookSubscriptionUpdate
  - `targetUrl` string, uri
  - `eventTypes` string[]
  - `status` 'active' | 'paused' | 'disabled'
  - `consumerMetadata` object

## Response `200`

ok

- WebhookSubscriptionPublic
  - `id` string, uuid, required
  - `organizationId` string, required
  - `coachId` string, uuid, nullable, required
  - `targetUrl` string, required
  - `eventTypes` string[], required
  - `status` 'active' | 'paused' | 'disabled' | 'deleted', required
  - `consumerMetadata` object, required: Opaque JSON object
  - `expiresAt` string, nullable, required
  - `health` 'healthy' | 'degraded' | 'down'
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

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