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

# List tasks

> List all tasks with pagination



## OpenAPI

````yaml api-reference/openapi.json get /api/task/v1
openapi: 3.1.0
info:
  title: soma
  version: v1
servers: []
security: []
tags:
  - name: task
    description: >-
      Task management endpoints for creating, listing, and managing tasks and
      their messages
  - name: secret
    description: Secret management endpoints for storing and retrieving encrypted secrets
  - name: encryption
    description: >-
      Encryption key management endpoints for envelope keys, data encryption
      keys, and aliases
  - name: bridge
    description: >-
      Bridge endpoints for managing providers, credentials, functions, and MCP
      protocol communication
  - name: _internal
    description: >-
      Internal endpoints for health checks, runtime configuration, and SDK code
      generation
  - name: a2a
    description: >-
      Agent-to-agent communication endpoints for agent cards, definitions, and
      JSON-RPC requests
  - name: v1
    description: API version v1 endpoints
paths:
  /api/task/v1:
    get:
      tags:
        - task
        - v1
      summary: List tasks
      description: List all tasks with pagination
      operationId: list-tasks
      parameters:
        - name: page_size
          in: query
          required: true
          schema:
            type: integer
            format: int64
          style: form
        - name: next_page_token
          in: query
          required: false
          schema:
            type: string
          style: form
      responses:
        '200':
          description: List tasks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskPaginatedResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TaskPaginatedResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        next_page_token:
          type: string
    Error:
      type: object
      required:
        - message
      properties:
        data: {}
        message:
          type: string
    Task:
      type: object
      required:
        - id
        - context_id
        - status
        - status_timestamp
        - metadata
        - created_at
        - updated_at
      properties:
        context_id:
          $ref: '#/components/schemas/WrappedUuidV4'
        created_at:
          $ref: '#/components/schemas/WrappedChronoDateTime'
        id:
          $ref: '#/components/schemas/WrappedUuidV4'
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/TaskStatus'
        status_message_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WrappedUuidV4'
        status_timestamp:
          $ref: '#/components/schemas/WrappedChronoDateTime'
        updated_at:
          $ref: '#/components/schemas/WrappedChronoDateTime'
    WrappedUuidV4:
      type: string
      format: uuid
    WrappedChronoDateTime:
      type: string
      format: date-time
    Metadata:
      type: object
      additionalProperties: {}
      propertyNames:
        type: string
    TaskStatus:
      type: string
      enum:
        - submitted
        - working
        - input-required
        - completed
        - canceled
        - failed
        - rejected
        - auth-required
        - unknown

````