Sluby
REST APIWebhooks

Edit, pause or resume a webhook endpoint.

Send any of `url`, `events` and `is_active`. A new URL is checked like at registration. `is_active: false` pauses the endpoint: nothing is sent to it, and deliveries already queued for it are dropped. `is_active: true` resumes it for new events. The signing secret does not change.

PATCH
/api/v1/webhooks/{id}

Send any of url, events and is_active. A new URL is checked like at registration. is_active: false pauses the endpoint: nothing is sent to it, and deliveries already queued for it are dropped. is_active: true resumes it for new events. The signing secret does not change.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A Sluby API key (sluby_...) sent as Authorization: Bearer <key>. Keys carry scopes: upload, read, manage.

Path Parameters

id*string

Endpoint id.

Request Body

application/json
  1. body
Properties1 <= properties
url?string

Absolute http(s) URL on a public address.

Formaturi
Lengthlength <= 2048
events?array<>

Replaces the subscribed events. An event listed twice counts once.

Items1 <= items
is_active?boolean

False pauses, true resumes.

Response Body

The endpoint as it is now.

application/json
  1. response
id*string
Formatuuid
url*string
events*array<string>
is_active*boolean

False while the endpoint is paused: no events are sent to it.

created_at*string
Formatdate-time
last_delivery_at*|

When the newest delivery attempt was made; null before the first.

Formatdate-time
last_delivery_ok*|

Whether the newest attempt got a 2xx answer; null before the first. Attempts are kept for 30 days.

Example Request
curl -X PATCH 'https://sluby.example.com/api/v1/webhooks/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "url": "string",  "events": [    "string"  ],  "is_active": true,  "created_at": "2019-08-24T14:15:22Z",  "last_delivery_at": "2019-08-24T14:15:22Z",  "last_delivery_ok": true}