Skip to content

Commit 4d36d20

Browse files
docs: fix waitpoint token completion request body field
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
1 parent a5339a1 commit 4d36d20

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)