> ## 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.

# Upload work items in bulk

> Uploads work items from a CSV file.



## OpenAPI

````yaml rulebase_api2_public_openapi.json POST /v1/work_items/upload
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/upload:
    post:
      tags:
        - Work items
      summary: Upload work items in bulk
      description: Upload work items from a CSV file.
      operationId: uploadWorkItems
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                upload[file]:
                  type: string
                  format: binary
      responses:
        '201':
          description: Work item upload accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - pending
                          - processing
                          - completed
                          - completed_with_errors
                          - failed
                      total_rows:
                        type: integer
                      succeeded_rows:
                        type: integer
                      failed_rows:
                        type: integer
                      error:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                    required:
                      - id
                      - status
                      - total_rows
                      - succeeded_rows
                      - failed_rows
                      - error
                      - created_at
                      - updated_at
                required:
                  - data
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '413':
          description: File too large
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '422':
          description: Invalid upload
          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

````