Webhooks

envless.webhooks.get()

Read one webhook endpoint by id

ts
get(id: string, options?: RequestScope): Promise<WebhookResource>

Resolves a single endpoint with its URL, subscription list, enabled flag and health timestamps. The signing secret is not here and never will be: you get secretLastFour only, so you can tell which secret a receiver holds. If the secret is lost, rotateSecret is the only route back to a working one.

lastSuccessAt and lastFailureAt are the fastest health signal. When one of them looks wrong, listDeliveries holds the detail behind it.

Endpoints are addressed by id alone, a UUIDv7, with no slug form. Passing a name resolves nothing and produces 404 webhook.not_found, the same response as a deleted endpoint.

Example

ts
const hook = await envless.webhooks.get('0194f2b1-9c3a-7c21-8f0e-2b6d4a1c5e90')

console.log(hook.enabled, hook.secretLastFour)
console.log(hook.lastSuccessAt, hook.lastFailureAt)

Parameters

ParameterTypeRequiredDescription
idstringYesEndpoint id taken from a list call, ids only.
options.signalAbortSignalNoCancels the request.

Returns

WebhookResource with eventTypes, enabled, secretLastFour and the last success and failure timestamps.

Worth knowing

  • The event type catalogue lives at its own route, so listEventTypes can never collide with an id read.
  • A 404 does not distinguish an unknown id from an endpoint in another workspace.

Required scopes

webhooks:read

Underlying endpoint

GET /webhooks/{id}

Request and response schema, every error code, and a live playground.

In Python

envless.webhooks.get()

The same method in envless-sdk, the Python SDK, with the same request, retries and errors.

In Ruby

Envless.webhooks.get

The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.

In PHP

$envless->webhooks->get()

The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.