Skip to content

Commit 4dc504d

Browse files
docs: fix waitpoint token completion request body field (#2888)
Fixed documentation examples to use correct 'data' field instead of 'output' for the waitpoint token completion endpoint. The API schema expects 'data' in the request body, but all code examples (curl, Python, Ruby, Go) incorrectly showed 'output', causing waitpoints to complete with empty/undefined output when users followed the docs. Fixes #2872 Closes #<issue> ## ✅ Checklist - [x] I have followed every step in the [contributing guide](https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md) - [x] The PR title follows the convention. - [x] I ran and tested the code works --- ## Testing _[Describe the steps you took to test this change]_ This is simple doc fix --- ## Changelog _[Short description of what has changed]_ Documentation example for the specific api route had a wrong field, fixed that to have correct field --- ## Screenshots _[Screenshots]_ <img width="780" height="252" alt="Screenshot 2026-01-14 at 10 49 50 PM" src="https://github.com/user-attachments/assets/50a03f2c-edfb-4bd4-bb72-a0fd79e77216" /> The above image shows the correct request format, but docs previously had incorrect payload. <img width="723" height="307" alt="Screenshot 2026-01-14 at 11 24 01 PM" src="https://github.com/user-attachments/assets/b9096225-3f7c-4511-b8c2-e8144c896900" /> This is the exact wrong field in docs, that was fixed https://trigger.dev/docs/wait-for-token#from-another-language 💯 Co-authored-by: appdevelopers9a <appdeveloper@s9alabs.com>
1 parent a5339a1 commit 4dc504d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/wait-for-token.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ You can complete a token using a raw HTTP request or from another language.
177177
curl -X POST "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete" \
178178
-H "Authorization: Bearer {token}" \
179179
-H "Content-Type: application/json" \
180-
-d '{"output": { "status": "approved"}}'
180+
-d '{"data": { "status": "approved"}}'
181181
```
182182

183183
```python python
@@ -186,7 +186,7 @@ import requests
186186
response = requests.post(
187187
"https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete",
188188
headers={"Authorization": f"Bearer {token}"},
189-
json={"output": { "status": "approved"}}
189+
json={"data": { "status": "approved"}}
190190
)
191191
```
192192

@@ -199,7 +199,7 @@ http = Net::HTTP.new(uri.host, uri.port)
199199
request = Net::HTTP::Post.new(uri)
200200
request["Authorization"] = "Bearer {token}"
201201
request["Content-Type"] = "application/json"
202-
request.body = JSON.generate({ output: { status: "approved" } })
202+
request.body = JSON.generate({ data: { status: "approved" } })
203203

204204
response = http.request(request)
205205
```
@@ -218,7 +218,7 @@ func main() {
218218
url := "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete"
219219

220220
payload := map[string]interface{}{
221-
"output": map[string]interface{}{
221+
"data": map[string]interface{}{
222222
"status": "approved",
223223
},
224224
}

0 commit comments

Comments
 (0)