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

# Get Chart of Accounts History API

> Retrieve every version of a Breezing company's chart of accounts, with the chart before and after each change, to audit edits or restore one.



## OpenAPI

````yaml GET /company/accounts/history
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:
  /company/accounts/history:
    get:
      tags:
        - Company
      summary: Chart of accounts version history
      description: >-
        Every change of the chart of accounts, newest first (`limit` versions,
        default 20, max 100): CSV uploads, platform syncs and refreshes,
        accounts created through the API, and PATCH /company accounts writes.
        Each entry carries the full chart before (`previous`) and after
        (`payload`) the change, so restoring a version is PATCH /company with
        `accounts` set to that entry's `previous`, which is itself captured as a
        new version.
      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
        - schema:
            type: string
            default: '20'
            description: Versions to return, newest first (1 to 100, default 20).
            example: '20'
          required: false
          description: Versions to return, newest first (1 to 100, default 20).
          name: limit
          in: query
      responses:
        '200':
          description: Chart versions
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChartOfAccountsVersion'
                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:
    ChartOfAccountsVersion:
      type: object
      properties:
        id:
          type: number
        source:
          type: string
          nullable: true
          description: >-
            Which channel wrote the change: "csv", "xeroSync", "qboSync",
            "bexioSync", "accountCreated", "apiXeroRefresh", "apiQboRefresh",
            "apiBexioRefresh" or "publicApi"
        email:
          type: string
          nullable: true
        userId:
          type: number
          nullable: true
        createdAt:
          type: number
          description: unix ms
        previous:
          type: array
          items:
            $ref: '#/components/schemas/ChartAccount'
          description: >-
            The chart BEFORE this change: a complete, restorable version. Empty
            on the bootstrap change.
        payload:
          type: array
          items:
            $ref: '#/components/schemas/ChartAccount'
          description: The chart AFTER this change.
      required:
        - id
        - source
        - email
        - userId
        - createdAt
        - previous
        - payload
    ChartAccount:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        type:
          type: string
          nullable: true
      required:
        - code
        - name

````

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