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

# Get a task



## OpenAPI

````yaml /0.20/openapi.json get /api/v1/tasks/{id}
openapi: 3.0.3
info:
  title: 2501 Public API
  version: v1
  description: >-
    The stable, versioned HTTP API for driving 2501 as code. See the API
    Overview for authentication, the org_id rule, cursor pagination, and the
    error envelope.
servers:
  - url: https://{command_center_host}
    variables:
      command_center_host:
        default: your-command-center-host
        description: Your Command Center host
security:
  - bearerAuth: []
paths:
  /api/v1/tasks/{id}:
    get:
      tags:
        - Tasks
      summary: Get a task
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: The task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          description: >-
            Bad request - a field is missing, malformed, or not allowed
            (VALIDATION_FAILED, BAD_REQUEST, INVALID_CURSOR)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No credentials, or a key that is invalid, revoked, or expired
            (UNAUTHORIZED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Authenticated but not allowed (FORBIDDEN, ORG_ACCESS_DENIED,
            STEP_UP_REFUSED, TWO_FACTOR_ENROLLMENT_REQUIRED,
            LICENSE_CAP_REACHED, LICENSE_EXPIRED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such row that this caller can see (NOT_FOUND)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Task:
      type: object
      properties:
        id:
          type: string
          example: tsk_2b7c1d4e-...
        org_id:
          type: string
        job_id:
          type: string
          nullable: true
        agent_id:
          type: string
        host_id:
          type: string
          nullable: true
          description: >-
            The host the task ran on, kept after the host is removed; null until
            the task is placed
        description:
          type: string
        status:
          type: string
          enum:
            - assigned
            - in_progress
            - failed
            - completed
            - planning
            - initial_action_generation
            - action_verification
            - verification_retry
            - verification_success
            - verification_failed
            - await_cli_input
            - action_generation
            - action_executor
            - process_engine_action
            - pending
            - canceled
          example: completed
          description: >-
            completed, failed and canceled end a run. Every other value is a
            step of a run in progress. A standalone task can be resumed and a
            job reopened, which starts a new run.
        read_only:
          type: boolean
          description: true for a task that only reads and makes no change
        execution_mode:
          type: string
          nullable: true
          enum:
            - investigate
            - null
          description: >-
            Kept for compatibility: investigate when read_only is true, else
            null
          deprecated: true
        summary:
          type: string
          nullable: true
          description: The agent's account of what it did, once it has stopped
        stop_reason:
          type: string
          nullable: true
        failure_kind:
          type: string
          nullable: true
          enum:
            - host_unreachable
            - null
          description: Why a failed task failed; null unless it failed
        rerouted_task_id:
          type: string
          nullable: true
          description: >-
            On a task whose host was unreachable: the task that took over its
            work
        owner_id:
          type: string
          nullable: true
          description: The user who started the task
        canceled_by_id:
          type: string
          nullable: true
          description: The user who stopped the task; null unless stopped
        archived:
          type: boolean
        scheduled_at:
          type: string
          nullable: true
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        started_at:
          type: string
          nullable: true
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        completed_at:
          type: string
          nullable: true
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        created_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
      required:
        - id
        - org_id
        - job_id
        - agent_id
        - host_id
        - description
        - status
        - read_only
        - execution_mode
        - summary
        - stop_reason
        - failure_kind
        - rerouted_task_id
        - owner_id
        - canceled_by_id
        - archived
        - scheduled_at
        - started_at
        - completed_at
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed
        request_id:
          type: string
          example: req_3702b7e7-...
        field:
          type: string
          description: Set when one input is at fault
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: Set when several inputs are at fault
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - message
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in Command Center (Settings -> API Keys), sent as
        `Authorization: Bearer 2501_ak_...`. A Command Center session cookie is
        also accepted.

````

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