Skip to content

bug: Documentation error: API endpoint uses data field, not output for completing waitpoint tokens #2872

@bhdrk

Description

@bhdrk

Provide environment information

System:
OS: macOS 26.2
CPU: (16) arm64 Apple M4 Max
Memory: 2.35 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.0.1 - /Users/dd/.nvm/versions/node/v24.0.1/bin/node
npm: 11.3.0 - /Users/dd/.nvm/versions/node/v24.0.1/bin/npm

Describe the bug

The documentation for the POST /api/v1/waitpoints/tokens/{tokenId}/complete endpoint incorrectly shows output as the request body field, but the actual API expects data.

Documentation page: https://trigger.dev/docs/wait-for-token#from-another-language

Reproduction repo

data: z.any().nullish(),

To reproduce

Current (incorrect) documentation:

curl -X POST "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete"
-d '{"output": { "status": "approved"}}'

Correct format (per source code):

curl -X POST "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete"
-d '{"data": { "status": "approved"}}'

Impact: When using output in the request body, wait.forToken() returns {ok: true} but with an empty/undefined output property, making it difficult to debug.

Reference: packages/core/src/v3/schemas/api.ts#L1358

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions