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

# Void an invoice

> Void a generated invoice by writing it off. Its status becomes `written_off` and it is no longer owed. The invoice and its billed work are kept.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace's subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetoinvoice.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/invoices.yaml POST /clients/{client_id}/invoices/{invoice_id}/void
openapi: 3.0.3
info:
  title: NeetoInvoice APIs
  version: 2.0.0
servers:
  - description: NeetoInvoice APIs
    url: https://{your-subdomain}.neetoinvoice.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /clients/{client_id}/invoices/{invoice_id}/void:
    post:
      tags:
        - Invoices
      summary: Void an invoice
      description: >-
        Void a generated invoice by writing it off. Its status becomes
        `written_off` and it is no longer owed. The invoice and its billed work
        are kept.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/client_id_param'
        - in: path
          name: invoice_id
          description: >-
            The invoice's number as printed on the document, its identifier, or
            its ID.
          required: true
          schema:
            type: string
          example: INV-2026-042
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invoice_void_request'
      responses:
        '200':
          description: OK - Invoice voided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoice_void_response'
        '404':
          description: Not Found - The client or invoice does not exist
        '422':
          description: >-
            Unprocessable Entity - The invoice is not `generated` (for example
            already paid or written off). The body explains why in
            `field_errors`.
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    client_id_param:
      in: path
      name: client_id
      description: >-
        Unique ID of the client for which you want to retrieve or update
        details. Refer to [Getting the Client ID](/api/getting-client-id)
        section for detailed instructions.
      required: true
      schema:
        type: string
      example: a8b90a464cad12b48e45
  schemas:
    invoice_void_request:
      type: object
      required:
        - email
      properties:
        notes:
          type: string
          description: >-
            Notes saved on the invoice, such as why it was voided. Existing
            notes are kept when omitted.
          example: Issued in error
        email:
          type: string
          format: email
          description: >-
            Email of the acting user. Required when you authenticate with an API
            key.
          example: oliver@example.com
    invoice_void_response:
      type: object
      properties:
        id:
          type: string
          format: uuid
        number:
          type: string
          example: INV-2026-042
        status:
          type: string
          enum:
            - written_off
          example: written_off
        amount_paid:
          type: number
          format: float
          description: >-
            Total of any partial payments recorded before the invoice was
            voided.
          example: 0
        balance:
          type: number
          format: float
          description: Amount that was outstanding when the invoice was voided.
          example: 2500

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.