def get(
id: str,
*,
timeout: float | None = None,
) -> WebhookResourceasync def get(
id: str,
*,
timeout: float | None = None,
) -> WebhookResourceReturns 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, rotate_secret is the only route back to a working one.
lastSuccessAt and lastFailureAt are the fastest health signal. When one of them looks wrong, list_deliveries 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
from envless import envless
hook = envless.webhooks.get(
'0194f2b1-9c3a-7c21-8f0e-2b6d4a1c5e90'
)
print(hook['enabled'], hook['secretLastFour'])
print(hook['lastSuccessAt'], hook['lastFailureAt'])import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
hook = await envless.webhooks.get(
'0194f2b1-9c3a-7c21-8f0e-2b6d4a1c5e90'
)
print(hook['enabled'], hook['secretLastFour'])
print(hook['lastSuccessAt'], hook['lastFailureAt'])
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | str | Yes | Endpoint id taken from a list call, ids only. |
timeout | float | No | Seconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off. |
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
list_event_typescan 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 TypeScript
envless.webhooks.get()
The same method in @goenvless/sdk, with the same request, retries and errors.