webhooks
Create a webhook waiter
Changed onCreate 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.
post/api/v1/webhooks/endpoints/{endpointId}/waiters
Request
- Base URLhttps://api.trigger.dev
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"match": {
"event.type": "payment_intent.succeeded",
"event.data.object.metadata.orderId": "order_123"
},
"filter": "event.data.object.amount > 1000",
"timeout": "1h"
}Response
Waiter created, or the existing waiter for this idempotency key
Example response
{
"id": "waitpoint_abc123"
}Changes
- info
endpoint added
- info