API REFERENCE
Task Callback
On this page
/api/content-agent/callbackInternal callback endpoint for the poll-content-run Trigger.dev task. Receives content generation results and posts them back to the originating Slack thread. Authenticated via the x-callback-secret header.
This endpoint is not intended for external use — it is called automatically by the polling task when content runs complete, fail, or time out.
Authentication
callbackSecret
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/content-agent/callback' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"threadId": "string",
"status": "completed"
}'Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request POST \
--url 'https://recoup-api.vercel.app/api/content-agent/callback' \
--header 'Content-Type: application/json' \
--data '{
"threadId": "string",
"status": "completed"
}'Request body required
Content generation results from the polling task
application/json
threadIdstringrequiredChat SDK thread identifier for the originating Slack thread
statusstring · enumrequiredOverall status of the content generation batch
Values: "completed", "failed", "timeout"
resultsarray<object>Per-run results
Item properties for results
runIdstringrequiredTrigger.dev run ID
statusstring · enumrequiredValues: "completed", "failed", "timeout"
videoUrlstringURL of the generated video (when completed)
captionTextstringGenerated caption text (when completed)
errorstringError message (when failed)
messagestringOptional human-readable message
Responses
200Callback processed and results posted to Slack+
application/json
statusstring400Invalid request body+
No response body schema is specified.
401Missing or invalid callback secret+
No response body schema is specified.
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download content.jsonView operation source
{
"description": "Internal callback endpoint for the `poll-content-run` Trigger.dev task. Receives content generation results and posts them back to the originating Slack thread. Authenticated via the `x-callback-secret` header.\n\nThis endpoint is not intended for external use — it is called automatically by the polling task when content runs complete, fail, or time out.",
"requestBody": {
"description": "Content generation results from the polling task",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"threadId",
"status"
],
"properties": {
"threadId": {
"type": "string",
"description": "Chat SDK thread identifier for the originating Slack thread"
},
"status": {
"type": "string",
"enum": [
"completed",
"failed",
"timeout"
],
"description": "Overall status of the content generation batch"
},
"results": {
"type": "array",
"description": "Per-run results",
"items": {
"type": "object",
"required": [
"runId",
"status"
],
"properties": {
"runId": {
"type": "string",
"description": "Trigger.dev run ID"
},
"status": {
"type": "string",
"enum": [
"completed",
"failed",
"timeout"
]
},
"videoUrl": {
"type": "string",
"description": "URL of the generated video (when completed)"
},
"captionText": {
"type": "string",
"description": "Generated caption text (when completed)"
},
"error": {
"type": "string",
"description": "Error message (when failed)"
}
}
}
},
"message": {
"type": "string",
"description": "Optional human-readable message"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Callback processed and results posted to Slack",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "ok"
}
}
}
}
}
},
"400": {
"description": "Invalid request body"
},
"401": {
"description": "Missing or invalid callback secret"
}
},
"security": [
{
"callbackSecret": []
}
]
}