Skip to Content

List waitpoint tokens

Required accessWaitpoints: readread:waitpointsAny key with this access, from API keys
GET
/api/v1/waitpoints/tokens

Returns a paginated list of waitpoint tokens for the current environment. Results are ordered by creation date, newest first. Use cursor-based pagination with page[after] and page[before] to navigate pages.

Authorization

secretKey
headerAuthorizationBearer <token>

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.

import { configure } from "@trigger.dev/sdk";configure({ accessToken: "tr_dev_sk_1234" });

Query Parameters

page[size]?integer

Number of tokens to return per page (1–100).

Range1 <= value <= 100
page[after]?string

Return tokens after this cursor (from pagination.next in a previous response).

page[before]?string

Return tokens before this cursor (from pagination.previous in a previous response).

filter[status]?string

Comma-separated list of statuses to filter by. Allowed values: WAITING, COMPLETED, TIMED_OUT.

filter[idempotencyKey]?string

Filter by idempotency key.

filter[tags]?string

Comma-separated list of tags to filter by.

filter[createdAt][period]?string

Shorthand time period to filter by creation date (e.g. 1h, 24h, 7d). Cannot be combined with filter[createdAt][from] or filter[createdAt][to].

filter[createdAt][from]?string

Filter tokens created at or after this ISO 8601 timestamp.

Formatdate-time
filter[createdAt][to]?string

Filter tokens created at or before this ISO 8601 timestamp.

Formatdate-time

Response Body

Successful request

application/json
  1. response
data*array<>

An array of waitpoint token objects.

pagination*
Example Request
import { wait } from "@trigger.dev/sdk";// Iterate over all tokens (auto-paginated)for await (const token of wait.listTokens()) {  console.log(token.id, token.status);}// Filter by status and tagsfor await (const token of wait.listTokens({  status: ["WAITING"],  tags: ["user:1234567"],})) {  console.log(token.id);}
Example Response
{  "data": [    {      "id": "waitpoint_abc123",      "url": "https://api.trigger.dev/api/v1/waitpoints/tokens/waitpoint_abc123/callback/abc123hash",      "status": "WAITING",      "idempotencyKey": "string",      "idempotencyKeyExpiresAt": "2019-08-24T14:15:22Z",      "timeoutAt": "2019-08-24T14:15:22Z",      "completedAt": "2019-08-24T14:15:22Z",      "output": "string",      "outputType": "string",      "outputIsError": true,      "tags": [        "string"      ],      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "next": "waitpoint_abc123",    "previous": "waitpoint_xyz789"  }}

Was this page helpful?

Last updated

Edit on GitHub