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

# Upload bill

> Upload a PDF or image file to create a new bill. OCR processing is queued asynchronously.



## OpenAPI

````yaml /api-reference/openapi.json post /bills
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Authenticate using the `x-dolfin-api-key` header
    with the API key distributed to your organisation.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security:
  - {}
tags:
  - name: Webhooks
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: SpendCategories
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Members
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Clients
  - name: ClientInvites
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: ApiKeys
  - name: Agent
paths:
  /bills:
    post:
      tags:
        - Bills
      summary: Upload bill
      description: >-
        Upload a PDF or image file to create a new bill. OCR processing is
        queued asynchronously.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  $ref: '#/components/schemas/IFormFile'
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillCreatedResponse'
        '400':
          description: >-
            Bill.FileTooLarge — uploaded file exceeds the 20 MB maximum


            Bill.UnsupportedFileType — file type is not supported; accepted:
            PDF, PNG, JPEG, TIFF, GIF, BMP, WEBP
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    IFormFile:
      type: string
      format: binary
    BillCreatedResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        state:
          $ref: '#/components/schemas/BillState'
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    BillState:
      enum:
        - Created
        - OcrProcessing
        - PendingReview
        - NeedsApproval
        - Approved
        - Rejected
        - Scheduled
        - Paid
        - OcrFailed
        - PaymentInProgress
        - PaymentFailed
        - Voided

````