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

# Get task status (single or batch)

> Returns the current status and lifecycle timestamps for one or more tasks. Pass `task_id` as a single string for the single-task shape (`{success, task}`, 404 if not found), or as an array for the batch shape (`{success, tasks, found_task_count, not_found_task_ids}`, always 200). Batches are capped at 50 `task_id`s per request.



## OpenAPI

````yaml /openapi.json post /api/v1/task_status
openapi: 3.1.0
info:
  title: Dashboard Backend API
  version: 0.1.0
servers:
  - url: https://api.optexity.com
security: []
paths:
  /api/v1/task_status:
    post:
      tags:
        - task_details
      summary: Get task status (single or batch)
      description: >-
        Returns the current status and lifecycle timestamps for one or more
        tasks. Pass `task_id` as a single string for the single-task shape
        (`{success, task}`, 404 if not found), or as an array for the batch
        shape (`{success, tasks, found_task_count, not_found_task_ids}`, always
        200). Batches are capped at 50 `task_id`s per request.
      operationId: task_status_multi_api_v1_task_status_post
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskStatusRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/TaskStatusResponse'
                  - $ref: '#/components/schemas/TaskStatusBatchResponse'
                description: >-
                  TaskStatusResponse when `task_id` was a string;
                  TaskStatusBatchResponse when it was an array.
                title: Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskStatusRequest:
      properties:
        task_id:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Task Id
      type: object
      required:
        - task_id
      title: TaskStatusRequest
      description: |-
        `task_id` accepts either a single task id or a list of them —
        the response shape mirrors whichever was sent. A list is capped at
        `MAX_BATCH_TASK_IDS` (50) items per request.
    TaskStatusResponse:
      properties:
        success:
          type: boolean
          title: Success
        task:
          $ref: '#/components/schemas/TaskStatusData'
      type: object
      required:
        - success
        - task
      title: TaskStatusResponse
    TaskStatusBatchResponse:
      properties:
        success:
          type: boolean
          title: Success
        tasks:
          items:
            $ref: '#/components/schemas/TaskStatusData'
          type: array
          title: Tasks
        found_task_count:
          type: integer
          title: Found Task Count
        not_found_task_ids:
          items:
            type: string
          type: array
          title: Not Found Task Ids
      type: object
      required:
        - success
        - tasks
        - found_task_count
        - not_found_task_ids
      title: TaskStatusBatchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskStatusData:
      properties:
        task_id:
          type: string
          title: Task Id
        status:
          type: string
          title: Status
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        allocated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Allocated At
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Completed At
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - task_id
        - status
      title: TaskStatusData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````