Webhooks · updateWebhookEndpoint
Change a webhook endpoint
PATCH /v1/webhooks/{id}
Change its URL, description or event types, or turn it off and on. Turning on an endpoint Logu turned off (disabledReason: "failing") clears its failure streak.
- Who may call it
- humans: Owners and up
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | The webhook endpoint's id (whk_…). · e.g. whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y |
Logu-Workspace | header | string | optional | Humans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6 |
Request body#
Content type application/json (required).
What changes on a webhook endpoint. Strict.
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | optional | uri · 0–2048 chars |
description | string | null | optional | 0–200 chars |
eventTypes | "ask.created" | "ask.settled" | "event.created" | "metric.alert"[] | optional | 1–4 items |
enabled | boolean | optional |
{
"enabled": false
}
Example#
curl -s -X PATCH "https://api.logu.dev/v1/webhooks/whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled":false}'
Responses#
200
The webhook endpoint as it is now.
{
"id": "whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y",
"url": "https://hooks.acme.example/logu",
"description": "Ops dashboard",
"eventTypes": [
"ask.settled",
"event.created"
],
"enabled": false,
"disabledReason": "manual",
"failingSince": null,
"previousSecretExpiresAt": null,
"createdAt": "2026-10-02T10:00:00.000Z",
"updatedAt": "2026-10-12T14:05:42.000Z"
}
Response fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | required | |
url | string | required | |
description | string | null | required | |
eventTypes | "ask.created" | "ask.settled" | "event.created" | "metric.alert"[] | required | |
enabled | boolean | required | |
disabledReason | "manual" | "failing" | null | required | |
failingSince | string | null | required | date-time |
previousSecretExpiresAt | string | null | required | date-time |
createdAt | string | required | date-time |
updatedAt | string | required | date-time |
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The request is malformed or a field is invalid (see issues). |
| 400 | unknown_field | The body has a field the endpoint doesn't know (often a typo or snake_case). |
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 500 | internal_error | Something went wrong on Logu's side. |