waitpoints
Create a waitpoint token
Creates a new waitpoint token that can be used to pause a run until an external event completes it. The token includes a url which can be called via HTTP POST to complete the waitpoint. Use the token ID with wait.forToken() inside a task to pause execution until the token is completed.
post/api/v1/waitpoints/tokens
Request body
Example request
{
"idempotencyKey": "approval-user-1234567",
"idempotencyKeyTTL": "1h",
"timeout": "1h"
}Response
Waitpoint token created successfully
Example response
{
"id": "waitpoint_abc123",
"url": "https://api.trigger.dev/api/v1/waitpoints/tokens/waitpoint_abc123/callback/abc123hash"
}