Update a webhook (name/url/events)
Changes a webhook's name, URL or subscribed events and returns it. A field left out keeps its value; the signing secret and enabled state are not changed. Whatever it changes, an update needs the access the webhook's events need on create, since a new URL would redirect them.
Required permission
Requires the webhook.write permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl webhooks update <id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
orgId*stringid*stringapplication/json- body
name?stringurl?stringevents?array<>Replaces the event list, with the names and rules of create. Absent keeps the list as it is. A name outside this list is stored but never delivered (see create); * is not a wildcard.
Updated
application/json- response
id*stringname*stringurl*stringevents*array<string>The event types this webhook receives. Empty means the four vm events.
curl -X PATCH 'https://api.openrelay.inc/v1/orgs/string/webhooks/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "name": "string", "url": "string", "events": [ "string" ]}Create a webhook (secret returned once) POST
Registers an HTTPS URL for the events you list and returns the webhook with its whsec_ signing secret, the only time that secret is returned. Each delivery is a signed POST of {id, type, created_at, data}. Listing a batch event needs batch read access and a balance event billing read access, beside webhook write access (403 otherwise). A name the platform sends no event for is stored and never delivered.
Delete a webhook DELETE
Deletes the webhook and returns 204. It gets no further deliveries, and any retries still pending for it are dropped instead of sent.