Create a webhook waiter
Private beta: request access to use webhooks.
Create a waiter on an endpoint. A waiter is a waitpoint that completes when a matching delivery arrives on the endpoint, so a run waiting on its id resumes with the verified event. It only matches deliveries that arrive after it was created. Omit match to get a waiter with its own url, for providers that take a webhook URL per request.
Authorizations
Use a named environment API key. It starts with tr_dev_sk_, tr_prod_sk_, tr_stg_sk_, etc.
Create a named API key in the API Keys section of your Trigger.dev project dashboard. Choose the narrowest access preset that supports your integration.
Our TypeScript SDK will default to using the value of the TRIGGER_SECRET_KEY environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the configure function.
Path Parameters
The endpoint's declared id (the id passed to webhooks.endpoint.define) or its wh_ id. A value starting with wh_ is always a generated id, since declared ids can't start with wh_. A declared id names the endpoint's declared instance in the key's environment.
Body
Up to five paths, each mapped to the value it must equal. event.* reads the event body, header.* a request header (case-insensitive) and webhook.* the endpoint (id, source, externalRef, tenantId or deliveryId). Omit it to create a waiter with its own url.
A duration such as 30m or 1h, or an ISO 8601 date. Defaults to 24 hours, up to 90 days.
"1h"
Up to 10 tags, added to the webhook:<endpoint id> tag every waiter gets.
A create with a key already used in the environment returns the original waiter with isCached: true, even if it has completed.
How long the idempotency key lasts, such as 1h or 30d.
Response
Waiter created, or the existing waiter for this idempotency key
The waiter's id, which is also its waitpoint id. Wait on it with webhooks.waiter.wait() or wait.forToken().
"waitpoint_abc123"
When the waiter times out.
true if an existing waiter was returned for the same idempotencyKey.
Only for a waiter created without match: the URL to give the provider as its per-request webhook. A delivery to it is verified with the endpoint's source and resumes only this waiter.

