Update a webhook endpoint
PATCH/v1/webhooks/{id}Key ·
Update a webhook endpoint. Re-enabling clears the auto-disable state.
Authentication
API key: Authorization: Bearer sl_live_… with any scope. The dashboard session works too.
An API key always acts in its own workspace. With a dashboard session, pass ?workspaceId= to choose the workspace (default: your first).
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path | string |
Request body
application/json, required.
| Field | Description |
|---|---|
url | string |
events | array of "message.received" | "message.sent" | "message.delivered" | "message.failed" | "device.online" | "device.offline" · at least 1 |
deviceIds | array of string | null |
description | string | null |
enabled | boolean |
{ "enabled": true}Response
200 — Updated
| Field | Description |
|---|---|
idrequired | string · pattern ^whe_ |
workspaceIdrequired | string |
urlrequired | string · uri |
description | string | null |
eventsrequired | array of "message.received" | "message.sent" | "message.delivered" | "message.failed" | "device.online" | "device.offline" |
deviceIds | array of string | null null = every device |
enabledrequired | boolean |
disabledReason | string | nullfailing: auto-disabled after 3 days of failed deliveries |
failingSince | string | null · date-time |
secretPrefixrequired | string |
createdAtrequired | string · date-time |
updatedAtrequired | string · date-time |
{ "id": "whe_Vb3nq0x5cE1h2kF8sYp4Tg", "workspaceId": "ws_9yLm2Qx7Rk3sTb6Vh1Nc0A", "url": "https://example.com/simline/hook", "description": "Order system", "events": [ "message.received" ], "deviceIds": [ "deviceIds" ], "enabled": true, "disabledReason": "disabledReason", "failingSince": "2026-11-28T09:13:57.390Z", "secretPrefix": "whsec_Xy7", "createdAt": "2026-11-28T09:13:57.390Z", "updatedAt": "2026-11-28T09:13:57.390Z"}Errors
Errors are JSON: {"error": "<code>", "message": "<a sentence>"}. Branch on error, show message. Every code is explained in Errors.
| Status | error | When |
|---|---|---|
| 400 | bad_request | Invalid body or URL |
| 401 | unauthorized | Missing or invalid API key / session |
| 403 | forbidden | API key lacks the read + send scopes |
| 404 | not_found | Webhook or delivery not found |
| 500 | internal | Internal error |
Examples
Set SIMLINE_API_KEY to your key first. Node examples use the built-in fetch (Node 18+, run as an ES module); Python uses requests.
curl -X PATCH "https://api.simline.dev/v1/webhooks/whe_Vb3nq0x5cE1h2kF8sYp4Tg" \ -H "Authorization: Bearer $SIMLINE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"enabled":true}'const res = await fetch("https://api.simline.dev/v1/webhooks/whe_Vb3nq0x5cE1h2kF8sYp4Tg", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.SIMLINE_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "enabled": true })})if (!res.ok) { const err = await res.json() throw new Error(`${res.status} ${err.error}: ${err.message}`)}console.log(await res.json())import os
import requests
r = requests.patch( "https://api.simline.dev/v1/webhooks/whe_Vb3nq0x5cE1h2kF8sYp4Tg", headers={"Authorization": f"Bearer {os.environ['SIMLINE_API_KEY']}"}, json={ "enabled": True, }, timeout=15,)if not r.ok: err = r.json() raise RuntimeError(f"{r.status_code} {err['error']}: {err['message']}")print(r.json())