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

# Update a line item

> Updates an existing line item on a draft invoice.



## OpenAPI

````yaml patch /v1/invoices/{id}/lines/{lineId}
openapi: 3.0.0
info:
  title: Revstack API
  version: 1.0.0
  description: >-
    Open Source Billing OS for Developers. The scalable, developer-first billing
    engine with subscriptions, invoicing, usage metering, and entitlements.
servers:
  - url: http://localhost:6900
    description: Revstack API (Local Development)
security: []
paths:
  /v1/invoices/{id}/lines/{lineId}:
    patch:
      tags:
        - Invoices
      summary: Update a line item
      description: Updates an existing line item on a draft invoice.
      parameters:
        - schema:
            type: string
            example: inv_abc123
          required: true
          name: id
          in: path
        - schema:
            type: string
            example: li_abc123
          required: true
          name: lineId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                periodStart:
                  type: string
                  format: date-time
                periodEnd:
                  type: string
                  format: date-time
                amount:
                  type: integer
                quantity:
                  type: integer
                  minimum: 1
      responses:
        '200':
          description: Line item updated
          content:
            application/json:
              schema:
                nullable: true

````