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

# Get task detail

> Returns everything about one task, always including its attachments and labels, and optionally its activity timeline, its links to other tasks, and any pending approvals.

**Example:** Fetch one task's full detail, including its activity timeline and linked tasks.

**Usage:** Pass the task id. Add any extra sections to `include`: `timeline` for the activity feed, `relations` for links to other tasks, and `approvals` for pending sign-offs. When you include the timeline it comes back a page at a time; pass the cursor from the previous response to get the next page, and use `timeline_kind` to narrow it to just comments, activity, approvals, or workflow events.

**Response:** the task with its status, priority, assignee, dates, counts, attachments, and labels, plus whichever of timeline, relations, and approvals you asked for.



## OpenAPI

````yaml https://mcp.agents.writesonic.com/openapi.json get /api/v1/business/tasks/{task_id}
openapi: 3.1.0
info:
  title: 'hq-backend: Business API'
  description: Public Business API endpoints, authenticated with an API key.
  version: 0.1.0
servers:
  - url: https://api.agents.writesonic.com
security: []
paths:
  /api/v1/business/tasks/{task_id}:
    get:
      tags:
        - business
      summary: Get task detail
      description: >-
        Returns everything about one task, always including its attachments and
        labels, and optionally its activity timeline, its links to other tasks,
        and any pending approvals.


        **Example:** Fetch one task's full detail, including its activity
        timeline and linked tasks.


        **Usage:** Pass the task id. Add any extra sections to `include`:
        `timeline` for the activity feed, `relations` for links to other tasks,
        and `approvals` for pending sign-offs. When you include the timeline it
        comes back a page at a time; pass the cursor from the previous response
        to get the next page, and use `timeline_kind` to narrow it to just
        comments, activity, approvals, or workflow events.


        **Response:** the task with its status, priority, assignee, dates,
        counts, attachments, and labels, plus whichever of timeline, relations,
        and approvals you asked for.
      operationId: get_task_api_v1_business_tasks__task_id__get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Task to fetch.
            title: Task Id
          description: Task to fetch.
        - name: include
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                uniqueItems: true
                items:
                  $ref: '#/components/schemas/TaskInclude'
              - type: 'null'
            description: 'Extra sections to fetch: timeline, relations, and/or approvals.'
            title: Include
          description: 'Extra sections to fetch: timeline, relations, and/or approvals.'
        - name: timeline_cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Pagination cursor for the task timeline (from a prior response's
              next_cursor).
            title: Timeline Cursor
          description: >-
            Pagination cursor for the task timeline (from a prior response's
            next_cursor).
        - name: timeline_kind
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/TimelineKind'
            description: >-
              Filter the task timeline to one kind:
              all/comment/activity/approval/workflow.
            default: all
          description: >-
            Filter the task timeline to one kind:
            all/comment/activity/approval/workflow.
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskWithIncludes'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TaskInclude:
      type: string
      enum:
        - timeline
        - relations
        - attachments
        - approvals
      title: TaskInclude
    TimelineKind:
      type: string
      enum:
        - all
        - comment
        - activity
        - approval
        - workflow
        - ask_question
      title: TimelineKind
    TaskWithIncludes:
      properties:
        task:
          $ref: '#/components/schemas/TaskDetail'
        timeline:
          anyOf:
            - $ref: '#/components/schemas/TimelineResponse'
            - type: 'null'
        relations:
          anyOf:
            - items:
                $ref: '#/components/schemas/RelationResponse'
              type: array
            - type: 'null'
          title: Relations
        approvals:
          anyOf:
            - items:
                $ref: '#/components/schemas/ApprovalRead'
              type: array
            - type: 'null'
          title: Approvals
      type: object
      required:
        - task
      title: TaskWithIncludes
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskDetail:
      properties:
        credits:
          anyOf:
            - $ref: '#/components/schemas/CreditUsage'
            - type: 'null'
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        identifier:
          type: string
          title: Identifier
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        creator_type:
          $ref: '#/components/schemas/ActorType'
        creator_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Id
        assignee_type:
          $ref: '#/components/schemas/ActorType'
        assignee_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee Id
        parent_task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Task Id
        page_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Page Id
        market_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Market Id
        schedule_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Schedule Id
        source:
          $ref: '#/components/schemas/TaskSource'
        due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Due Date
        sort_order:
          type: number
          title: Sort Order
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        comment_count:
          type: integer
          title: Comment Count
        last_comment_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Comment At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        credit_estimate:
          anyOf:
            - $ref: '#/components/schemas/CreditEstimate'
            - type: 'null'
        labels:
          items:
            $ref: '#/components/schemas/LabelResponse'
          type: array
          title: Labels
        thread:
          anyOf:
            - $ref: '#/components/schemas/ThreadRef'
            - type: 'null'
        subtask_count:
          $ref: '#/components/schemas/SubtaskCount'
        relation_count:
          type: integer
          title: Relation Count
          default: 0
        attachment_count:
          type: integer
          title: Attachment Count
          default: 0
        attachments:
          items:
            $ref: '#/components/schemas/AttachmentResponse'
          type: array
          title: Attachments
        hierarchy:
          items:
            $ref: '#/components/schemas/TaskHierarchyItem'
          type: array
          title: Hierarchy
        last_comment:
          anyOf:
            - $ref: '#/components/schemas/CommentPreview'
            - type: 'null'
        template:
          anyOf:
            - $ref: '#/components/schemas/TaskTemplateRef'
            - type: 'null'
          description: The template this task ran from. Null for an ordinary task.
        last_template_build_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Template Build Id
          description: >-
            Same as template_build.last_build_id; kept until the frontend reads
            that.
        template_build:
          $ref: '#/components/schemas/TaskTemplateSaveState'
          description: Saving this task as a template.
      type: object
      required:
        - id
        - project_id
        - identifier
        - title
        - description
        - status
        - priority
        - creator_type
        - creator_id
        - assignee_type
        - assignee_id
        - parent_task_id
        - page_id
        - market_id
        - schedule_id
        - source
        - due_date
        - sort_order
        - started_at
        - completed_at
        - comment_count
        - last_comment_at
        - created_at
        - updated_at
        - template_build
      title: TaskDetail
    TimelineResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TimelineItem'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
        participants:
          items:
            $ref: '#/components/schemas/Participant'
          type: array
          title: Participants
      type: object
      required:
        - items
        - next_cursor
        - has_more
        - participants
      title: TimelineResponse
    RelationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        source_task_id:
          type: string
          format: uuid
          title: Source Task Id
        target_task_id:
          type: string
          format: uuid
          title: Target Task Id
        relation_type:
          $ref: '#/components/schemas/TaskRelationType'
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - source_task_id
        - target_task_id
        - relation_type
        - created_at
      title: RelationResponse
    ApprovalRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        task_id:
          type: string
          format: uuid
          title: Task Id
        agent_id:
          type: string
          format: uuid
          title: Agent Id
        run_id:
          type: string
          format: uuid
          title: Run Id
        tool_name:
          type: string
          title: Tool Name
        body:
          additionalProperties: true
          type: object
          title: Body
        status:
          $ref: '#/components/schemas/ApprovalStatus'
        reviewer_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewer User Id
        reviewed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Reviewed At
        feedback_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback Text
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - task_id
        - agent_id
        - run_id
        - tool_name
        - body
        - status
        - reviewer_user_id
        - reviewed_at
        - feedback_text
        - created_at
      title: ApprovalRead
      description: Single approval row response. agent_id hydrated via agent_runs JOIN.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CreditUsage:
      properties:
        consumed:
          anyOf:
            - type: number
            - type: 'null'
          title: Consumed
          description: Credits this run/task has spent
        cap:
          anyOf:
            - type: number
            - type: 'null'
          title: Cap
          description: Per-run ceiling that applies; null = uncapped
        cap_reached:
          type: boolean
          title: Cap Reached
          description: Whether `consumed` has crossed `cap`
          default: false
        blocked_by:
          anyOf:
            - $ref: '#/components/schemas/CreditBlockCode'
            - type: 'null'
          description: >-
            The error triggering would return right now; null means it can run.
            Wallet limits take precedence over the per-run cap, matching the
            gate's own order.
      type: object
      title: CreditUsage
      description: >-
        Everything one run or task can say about credits: what it spent, the
        ceiling on it, and

        whether anything would stop it starting right now.
    TaskStatus:
      type: string
      enum:
        - backlog
        - todo
        - in_progress
        - pending_human_approval
        - pending_credits
        - in_review
        - done
        - cancelled
      title: TaskStatus
    TaskPriority:
      type: string
      enum:
        - urgent
        - high
        - medium
        - low
        - none
      title: TaskPriority
    ActorType:
      type: string
      enum:
        - human
        - ai_agent
        - system
      title: ActorType
    TaskSource:
      type: string
      enum:
        - user
        - agent
        - content_intelligence
      title: TaskSource
    CreditEstimate:
      properties:
        credits:
          type: number
          title: Credits
        global_task_count:
          type: integer
          title: Global Task Count
        project_task_count:
          type: integer
          title: Project Task Count
      type: object
      required:
        - credits
        - global_task_count
        - project_task_count
      title: CreditEstimate
    LabelResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        color:
          type: string
          title: Color
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - project_id
        - name
        - color
        - created_at
      title: LabelResponse
    ThreadRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        contact:
          $ref: '#/components/schemas/ThreadContact'
        cc_emails:
          items:
            type: string
          type: array
          title: Cc Emails
          default: []
      type: object
      required:
        - id
        - contact
      title: ThreadRef
      description: 'A conversation in one line: where to open it, and who is on it.'
    SubtaskCount:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        completed:
          type: integer
          title: Completed
          default: 0
      type: object
      title: SubtaskCount
    AttachmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        task_id:
          type: string
          format: uuid
          title: Task Id
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          title: Content Type
        size_bytes:
          type: integer
          title: Size Bytes
        uploader_type:
          $ref: '#/components/schemas/ActorType'
        uploader_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploader Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - task_id
        - filename
        - content_type
        - size_bytes
        - uploader_type
        - uploader_id
        - created_at
      title: AttachmentResponse
    TaskHierarchyItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        identifier:
          type: string
          title: Identifier
        title:
          type: string
          title: Title
      type: object
      required:
        - id
        - identifier
        - title
      title: TaskHierarchyItem
    CommentPreview:
      properties:
        author_type:
          $ref: '#/components/schemas/ActorType'
        author_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Id
        body:
          type: string
          title: Body
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - author_type
        - author_id
        - body
        - created_at
      title: CommentPreview
    TaskTemplateRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Open the template at this id.
        name:
          type: string
          title: Name
          description: What to show on the link.
        icon:
          anyOf:
            - $ref: '#/components/schemas/TaskTemplateIconData'
            - type: 'null'
          description: The link's icon; null means the category icon.
        category:
          $ref: '#/components/schemas/TaskTemplateCategory'
          description: Picks the fallback icon.
      type: object
      required:
        - id
        - name
        - icon
        - category
      title: TaskTemplateRef
      description: The template a task ran from, for the link on its detail.
    TaskTemplateSaveState:
      properties:
        last_build_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Build Id
          description: >-
            The newest build requested from this task, whatever its status. Null
            when none.
        blocked_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Blocked Reason
          description: >-
            Why it can't be saved as a template, for the person to read. Null
            when it can.
        saved:
          anyOf:
            - $ref: '#/components/schemas/TaskTemplateRef'
            - type: 'null'
          description: The template made from this task. Null when none, or it was retired.
        can_save:
          type: boolean
          title: Can Save
          description: Whether to offer saving this task as a template.
          readOnly: true
      type: object
      required:
        - can_save
      title: TaskTemplateSaveState
      description: Saving this task as a template, as its page shows it.
    TimelineItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        actor_type:
          $ref: '#/components/schemas/ActorType'
        actor_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Id
        payload:
          oneOf:
            - $ref: '#/components/schemas/ActivityPayload'
            - $ref: '#/components/schemas/CommentPayload'
            - $ref: '#/components/schemas/ApprovalPayload'
            - $ref: '#/components/schemas/WorkflowPayload'
            - $ref: '#/components/schemas/QuestionPayload'
          title: Payload
          discriminator:
            propertyName: kind
            mapping:
              activity: '#/components/schemas/ActivityPayload'
              approval: '#/components/schemas/ApprovalPayload'
              ask_question: '#/components/schemas/QuestionPayload'
              comment: '#/components/schemas/CommentPayload'
              workflow: '#/components/schemas/WorkflowPayload'
      type: object
      required:
        - id
        - created_at
        - actor_type
        - actor_id
        - payload
      title: TimelineItem
    Participant:
      properties:
        actor_type:
          $ref: '#/components/schemas/ActorType'
        actor_id:
          type: string
          title: Actor Id
      type: object
      required:
        - actor_type
        - actor_id
      title: Participant
    TaskRelationType:
      type: string
      enum:
        - depends_on
        - relates_to
        - duplicates
      title: TaskRelationType
    ApprovalStatus:
      type: string
      enum:
        - pending_approval
        - approve
        - reject
        - edit
        - expired
      title: ApprovalStatus
    CreditBlockCode:
      type: string
      enum:
        - AGENT_CREDITS_EXHAUSTED
        - WORKSPACE_CREDIT_LIMIT_REACHED
        - PROJECT_CREDIT_LIMIT_REACHED
        - MEMBER_CREDIT_LIMIT_REACHED
        - RESOURCE_CREDIT_LIMIT_REACHED
      title: CreditBlockCode
      description: >-
        Why a run cannot start — the same code its 402 carries, so a surface can
        say up front what

        triggering would return.
    ThreadContact:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
      type: object
      required:
        - name
        - email
      title: ThreadContact
    TaskTemplateIconData:
      properties:
        kind:
          $ref: '#/components/schemas/TaskTemplateIconKind'
        value:
          type: string
          maxLength: 16384
          title: Value
      type: object
      required:
        - kind
        - value
      title: TaskTemplateIconData
      description: >-
        `value` is an emoji, an https link to an image file, or SVG markup, as
        `kind` says.
    TaskTemplateCategory:
      type: string
      enum:
        - content_creation
        - content_optimization
        - research
        - report
        - outreach
        - other
      title: TaskTemplateCategory
    ActivityPayload:
      properties:
        kind:
          type: string
          const: activity
          title: Kind
          default: activity
        action:
          $ref: '#/components/schemas/ActivityAction'
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        old_values:
          items:
            anyOf:
              - type: string
              - type: 'null'
          type: array
          title: Old Values
        new_values:
          items:
            anyOf:
              - type: string
              - type: 'null'
          type: array
          title: New Values
        old_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Old Value
        new_value:
          anyOf:
            - type: string
            - type: 'null'
          title: New Value
      type: object
      required:
        - action
        - field
        - old_values
        - new_values
        - old_value
        - new_value
      title: ActivityPayload
    CommentPayload:
      properties:
        kind:
          type: string
          const: comment
          title: Kind
          default: comment
        body:
          type: string
          title: Body
        edited_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Edited At
        rollup_source:
          anyOf:
            - $ref: '#/components/schemas/RollupSource'
            - type: 'null'
        attachments:
          items:
            $ref: '#/components/schemas/CommentAttachment'
          type: array
          title: Attachments
      type: object
      required:
        - body
        - edited_at
        - attachments
      title: CommentPayload
    ApprovalPayload:
      properties:
        kind:
          type: string
          const: approval
          title: Kind
          default: approval
        tool_name:
          type: string
          title: Tool Name
        body:
          additionalProperties: true
          type: object
          title: Body
        status:
          $ref: '#/components/schemas/ApprovalStatus'
        feedback_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback Text
        reviewed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Reviewed At
        reviewer_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewer User Id
        run_id:
          type: string
          format: uuid
          title: Run Id
        task_id:
          type: string
          format: uuid
          title: Task Id
      type: object
      required:
        - tool_name
        - body
        - status
        - feedback_text
        - reviewed_at
        - reviewer_user_id
        - run_id
        - task_id
      title: ApprovalPayload
    WorkflowPayload:
      properties:
        kind:
          type: string
          const: workflow
          title: Kind
          default: workflow
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
        workflow_run_id:
          type: string
          format: uuid
          title: Workflow Run Id
        status:
          $ref: '#/components/schemas/WorkflowTimelineStatus'
        attempt:
          type: integer
          title: Attempt
          description: >-
            Which run of this workflow on this task this row is, counting from 1
            in start order. A workflow that failed and was run again shows
            attempt 2, not a second identical entry.
        total_attempts:
          type: integer
          title: Total Attempts
          description: How many times this workflow has run on this task in total.
      type: object
      required:
        - workflow_id
        - workflow_run_id
        - status
        - attempt
        - total_attempts
      title: WorkflowPayload
    QuestionPayload:
      properties:
        kind:
          type: string
          const: ask_question
          title: Kind
          default: ask_question
        body:
          $ref: '#/components/schemas/QuestionBody'
        answer:
          anyOf:
            - items:
                $ref: '#/components/schemas/AnswerItem'
              type: array
            - type: 'null'
          title: Answer
        status:
          $ref: '#/components/schemas/QuestionStatus'
        answered_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Answered At
        answered_by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Answered By User Id
        run_id:
          type: string
          format: uuid
          title: Run Id
        task_id:
          type: string
          format: uuid
          title: Task Id
      type: object
      required:
        - body
        - answer
        - status
        - answered_at
        - answered_by_user_id
        - run_id
        - task_id
      title: QuestionPayload
    TaskTemplateIconKind:
      type: string
      enum:
        - emoji
        - url
        - svg
      title: TaskTemplateIconKind
    ActivityAction:
      type: string
      enum:
        - created
        - deleted
        - status_changed
        - assigned
        - unassigned
        - label_added
        - label_removed
        - relation_added
        - relation_removed
        - title_changed
        - attachment_added
        - attachment_removed
        - subtask_added
        - subtask_removed
      title: ActivityAction
    RollupSource:
      properties:
        task_id:
          type: string
          format: uuid
          title: Task Id
      type: object
      required:
        - task_id
      title: RollupSource
    CommentAttachment:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          title: Content Type
        size_bytes:
          type: integer
          title: Size Bytes
        uploader_type:
          $ref: '#/components/schemas/ActorType'
        uploader_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploader Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - filename
        - content_type
        - size_bytes
        - uploader_type
        - uploader_id
        - created_at
      title: CommentAttachment
    WorkflowTimelineStatus:
      type: string
      enum:
        - pending
        - running
        - requires_human_input
        - requires_credits
        - completed
        - failed
        - cancelled
        - timed_out
      title: WorkflowTimelineStatus
      description: >-
        Derived from workflow_runs.status + the agent interrupt; see
        timeline_service._workflow_timeline_status.
    QuestionBody:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/QuestionItem'
          type: array
          title: Questions
          description: The questions asked in this call, in display order.
      type: object
      required:
        - questions
      title: QuestionBody
      description: >-
        The `body` of an ask_question item: the batch of questions the agent
        asked in one call.
    AnswerItem:
      properties:
        answer_text:
          type: string
          maxLength: 4000
          minLength: 1
          title: Answer Text
          description: >-
            The submitted answer. For a picked option this equals that option's
            `label`; for a free-typed answer it is the user's own text.
        is_custom:
          type: boolean
          title: Is Custom
          description: >-
            `true` when the user typed their own answer; `false` when
            `answer_text` matches one of the question's option labels.
      type: object
      required:
        - answer_text
        - is_custom
      title: AnswerItem
      description: >-
        One answer, positionally aligned to the question at the same index in
        `body.questions`.
    QuestionStatus:
      type: string
      enum:
        - pending_answer
        - answered
        - auto_answered
        - expired
        - declined
      title: QuestionStatus
    QuestionItem:
      properties:
        question:
          type: string
          title: Question
          description: The question text to show the user.
        options:
          items:
            $ref: '#/components/schemas/QuestionOption'
          type: array
          title: Options
          description: >-
            Suggested answers to render as pickable choices; may be empty. The
            user can always type a custom answer regardless of what is listed
            here.
      type: object
      required:
        - question
      title: QuestionItem
      description: >-
        One question in the batch, positionally aligned to the answer at the
        same index in `answer`.
    QuestionOption:
      properties:
        label:
          type: string
          title: Label
          description: >-
            The pickable answer, shown as the option's heading. When the user
            picks this option, this exact string comes back as the matching
            answer's `answer_text` with `is_custom=false`.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Optional display-only sub-text under the label explaining the option
            or its trade-off; `null` when the label already speaks for itself.
      type: object
      required:
        - label
      title: QuestionOption
      description: >-
        One suggested answer shown under a question. The user may pick it or
        type their own instead.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Writesonic API key
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.