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

# List work items

> Lists work items newest-completion-first with cursor pagination and filters.



## OpenAPI

````yaml rulebase_api2_public_openapi.json GET /v1/work_items
openapi: 3.1.0
info:
  title: Rulebase API v2
  version: 2.0.0
  description: Read data from Rulebase using an organization API key.
servers:
  - url: https://api2.rulebase.co
    description: US
  - url: https://eu.api2.rulebase.co
    description: EU
security: []
paths:
  /v1/work_items:
    get:
      tags:
        - Work items
      summary: List work items
      description: >-
        List work items newest-completion-first. Pass the returned
        `meta.page.next` cursor to fetch the following page. Deleted work items
        are excluded.
      operationId: listWorkItems
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          required: false
          name: limit
          in: query
        - schema:
            type: string
          required: false
          name: cursor
          in: query
        - schema:
            type: string
            minLength: 1
          required: false
          name: external_id
          in: query
        - schema:
            type: string
            minLength: 1
          required: false
          name: status
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: completed_after
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: completed_before
          in: query
        - schema:
            type: string
            minLength: 1
          required: false
          name: query
          in: query
      responses:
        '200':
          description: Work items
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        external_id:
                          type: string
                        agent:
                          type: object
                          properties:
                            id:
                              type: string
                              nullable: true
                            name:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            external_id:
                              type: string
                              nullable: true
                            avatar_url:
                              type: string
                              nullable: true
                          required:
                            - id
                            - name
                            - email
                            - external_id
                            - avatar_url
                        agents:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                nullable: true
                              name:
                                type: string
                                nullable: true
                              email:
                                type: string
                                nullable: true
                              external_id:
                                type: string
                                nullable: true
                              avatar_url:
                                type: string
                                nullable: true
                            required:
                              - id
                              - name
                              - email
                              - external_id
                              - avatar_url
                        type:
                          type: string
                        status:
                          type: string
                          enum:
                            - pending
                            - in_progress
                            - completed
                            - cancelled
                        short_description:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        completed_at:
                          type: string
                          nullable: true
                          format: date-time
                        custom_attributes:
                          type: object
                          additionalProperties:
                            nullable: true
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        qa_score:
                          type: number
                          nullable: true
                          minimum: 0
                          maximum: 1
                      required:
                        - id
                        - external_id
                        - agent
                        - agents
                        - type
                        - status
                        - short_description
                        - description
                        - completed_at
                        - custom_attributes
                        - created_at
                        - updated_at
                        - qa_score
                  meta:
                    type: object
                    properties:
                      page:
                        type: object
                        properties:
                          next:
                            type: string
                            nullable: true
                          limit:
                            type: integer
                        required:
                          - next
                          - limit
                    required:
                      - page
                required:
                  - data
                  - meta
        '400':
          description: Invalid query
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '429':
          description: >-
            Rate limit exceeded. Retry after the number of seconds in the
            Retry-After header.
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait before retrying
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Rulebase organization API key

````