> ## Documentation Index
> Fetch the complete documentation index at: https://docs.recoupable.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Task Callback

> 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.

This endpoint is not intended for external use — it is called automatically by the polling task when content runs complete, fail, or time out.



## OpenAPI

````yaml api-reference/openapi/content.json POST /api/content-agent/callback
openapi: 3.1.0
info:
  title: Recoup API - Content
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/content-agent/callback:
    post:
      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.


        This 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: []
components: {}

````