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

# Unsync Xero API

> Void the Xero manual journals that Breezing created for selected transactions so they can be corrected and synced again.



## OpenAPI

````yaml POST /xero/unsync
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:
  /xero/unsync:
    post:
      tags:
        - Xero
      summary: Void the Xero journals of transactions (background task)
      description: >-
        Reverse a sync: void the journal each of the given transactions created
        in the accounting platform and clear the row's sync id and status in
        Breezing, so it can be corrected and synced again (or left out). Runs as
        a background task because every void is a throttled platform call;
        returns `{ taskId }`, poll GET /tasks?id=<taskId>. Locked rows are
        skipped. Both legs of an exchange trade share one journal and are
        cleared together whichever leg id you pass. Returns 409 while an unsync
        is already running for the company. Only unsync when the user asks for
        it: the journal disappears from the books on the platform. Xero voids
        the manual journal (it stays visible as voided in Xero).
      parameters:
        - 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/AccountingSyncBody'
      responses:
        '200':
          description: Task created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      taskId:
                        type: number
                        description: >-
                          The background task. Poll GET /tasks?id=<taskId>;
                          "completedWithWarning" means some rows were skipped,
                          with the reason in error.
                    required:
                      - taskId
                required:
                  - success
                  - data
        '400':
          description: Integration not linked (INTEGRATION_NOT_LINKED) or invalid body
          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
        '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
        '409':
          description: >-
            The same task is already running for this company, or (find
            duplicates) a sync to the same platform is running
            (TASK_IN_PROGRESS)
          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:
    AccountingSyncBody:
      type: object
      properties:
        ids:
          type: array
          items:
            type: integer
            minimum: 0
            exclusiveMinimum: true
          minItems: 1
          maxItems: 1000
          description: >-
            Transaction IDs to sync (1-1000). Each must belong to this company
            and be unlocked.
      required:
        - ids

````

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