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

# Unmatch Invoice Payment API

> Remove the link between a Breezing transaction and a received invoice, restoring the coding the transaction had before settlement.



## OpenAPI

````yaml POST /invoices/{id}/unmatch
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /invoices/{id}/unmatch:
    post:
      tags:
        - Invoices
      summary: Unlink a payment transaction
      description: >-
        Remove a Payment Match. When the transaction had been settled by this
        invoice, its previous coding is restored from the settlement snapshot
        (only while the row still carries the untouched settlement coding and
        pays no other approved invoice; otherwise a warning is returned and the
        row is left alone). Its allocation goes with the link; the other links
        of the invoice are left alone. A Xero payment recorded for this link is
        deleted first, and when Xero refuses the call answers 400 and the link
        stays. Removing a link that does not exist is a no-op.
      parameters:
        - schema:
            type: string
            description: Invoice ID
            example: '42'
          required: true
          description: Invoice ID
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceTransactionBody'
      responses:
        '200':
          description: Transaction unlinked
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      removed:
                        type: integer
                      warnings:
                        type: array
                        items:
                          type: string
                        description: >-
                          Non-fatal notes (a locked transaction that kept its
                          coding, an unset AP Clearing account, ...).
                    required:
                      - removed
                      - warnings
                required:
                  - success
                  - data
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components:
  schemas:
    InvoiceTransactionBody:
      type: object
      properties:
        trxId:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Breezing transaction ID (the internal id, not the hash).
      required:
        - trxId

````

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