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

# List tasks

> List tasks for the workspace associated with your API key.

List tasks with optional pagination (`cursor`) and filtering (`status`).


## OpenAPI

````yaml /openapi.json GET /tasks
openapi: 3.0.3
info:
  title: Twill API
  version: 1.0.0
  description: Programmatically create and manage Twill tasks via REST API.
servers:
  - url: https://twill.ai/api/v1
security:
  - bearerAuth: []
tags:
  - name: Tasks
    description: Create and manage tasks.
paths:
  /tasks:
    get:
      tags:
        - Tasks
      summary: List tasks
      description: List tasks for the authenticated API key's workspace.
      operationId: listTasks
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: 'Number of tasks to return (max: 100).'
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Pagination cursor returned by a previous list call.
      responses:
        '200':
          description: Tasks list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTasksResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ListTasksResponse:
      type: object
      required:
        - tasks
        - nextCursor
      properties:
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/ListTaskItem'
        nextCursor:
          type: string
          nullable: true
    ListTaskItem:
      type: object
      required:
        - id
        - slug
        - title
        - url
        - repositoryUrl
        - createdAt
        - latestJobStatus
        - pr
      properties:
        id:
          type: string
        slug:
          type: string
        title:
          type: string
        url:
          type: string
        repositoryUrl:
          type: string
        createdAt:
          type: string
          format: date-time
        latestJobStatus:
          allOf:
            - $ref: '#/components/schemas/JobStatus'
          nullable: true
        pr:
          type: object
          nullable: true
          required:
            - url
            - number
          properties:
            url:
              type: string
            number:
              type: integer
    ApiErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
    JobStatus:
      type: string
      enum:
        - PENDING
        - IN_PROGRESS
        - COMPLETED
        - FAILED
        - CANCELLED
  responses:
    ValidationError:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          examples:
            invalidBody:
              value:
                error:
                  code: validation_error
                  message: Invalid request body
                  details:
                    issues:
                      - field: command
                        message: command is required
    UnauthorizedError:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            error:
              code: unauthorized
              message: Invalid or missing API key
    RateLimitedError:
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded. Max 100 requests per minute.
    InternalError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            error:
              code: internal_error
              message: Server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````