/** @return Page<WebhookResource> */
public function list(
?int $limit = null,
?int $offset = null,
?string $search = null,
?string $order = null,
int|float|null $timeout = null,
): PageReturns one page of the live webhook endpoints. Signing secrets are never part of a read, so every row carries only secretLastFour, which is enough to confirm which secret a receiver is verifying against and nothing more.
Ordering defaults to name, A to Z. order: set to asc or desc switches to createdAt, oldest or newest first, and any other value falls back to name order. search: matches name, url and description together.
Every method in this namespace, this read included, is refused with 403 auth.key_project_restricted when the calling key is fenced to specific projects. Endpoints are workspace wide and subscribe to workspace wide events, so authenticate with a key that has no projectIds fence.
Example
use Envless\Envless;
$envless = new Envless();
$page = $envless->webhooks->list(search: 'billing');
foreach ($page->items as $hook) {
echo $hook['url'], $hook['enabled'] ? '' : ' (disabled)', PHP_EOL;
}
echo $page->pagination['totalCount'], PHP_EOL;Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
$limit | int | No | Rows per page, a whole number from 1 to 100. |
$offset | int | No | Whole number of endpoints to skip before the page starts. |
$search | string | No | Case insensitive substring match across name, url and description. |
$order | string | No | Defaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt. |
$timeout | int|float | No | Seconds each attempt of this call may take, the response body included, before it throws Envless\Exception\NetworkException with isTimeout() true. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
Page<WebhookResource> with items and a pagination envelope counting every live endpoint.
Reads the webhooks collection. list returns one page as an Envless\Result\Page with items and pagination, listAll collects every page into an array, and iterate returns a Generator that yields one item at a time, fetching the next page only when the loop gets there.
Worth knowing
- Deleted endpoints are excluded permanently and their ids are never reused.
- A workspace is capped at 20 endpoints, so one page of 100 always holds the whole set.
Required scopes
webhooks:read
Underlying endpoint
GET /webhooks
Request and response schema, every error code, and a live playground.
In TypeScript
envless.webhooks.list()
The same method in @goenvless/sdk, with the same request, retries and errors.