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

# Create Xero Account API

> Create a new Xero account from Breezing to add a destination for crypto journal entries without leaving the API workflow.



## OpenAPI

````yaml POST /xero/accounts
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/accounts:
    post:
      tags:
        - Xero
      summary: Create a Xero account
      description: >-
        Create a new GL account directly in the linked Xero organization. After
        creation, call POST /xero/accounts/refresh to refresh the local view.
        Returns 400 if Xero is not linked.
      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/CreateXeroAccountBody'
      responses:
        '200':
          description: Xero account created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/AccountingAccount'
                required:
                  - success
                  - data
        '400':
          description: Xero not linked or invalid input
          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
        '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:
    CreateXeroAccountBody:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          maxLength: 10
          description: >-
            Account code (max 10 chars). Used as the identifier when setting
            account on transactions/assets.
        name:
          type: string
          minLength: 1
          maxLength: 150
          description: Account display name (max 150 chars).
        type:
          type: string
          enum:
            - BANK
            - CURRENT
            - CURRLIAB
            - DEPRECIATN
            - DIRECTCOSTS
            - EQUITY
            - EXPENSE
            - FIXED
            - INVENTORY
            - LIABILITY
            - NONCURRENT
            - OTHERINCOME
            - OVERHEADS
            - PREPAYMENT
            - REVENUE
            - SALES
            - TERMLIAB
            - PAYG
          description: >-
            Xero account type. Common values: BANK, CURRENT (current asset),
            CURRLIAB (current liability), EXPENSE, REVENUE, EQUITY, FIXED (fixed
            asset), DIRECTCOSTS, OVERHEADS.
        description:
          type: string
          maxLength: 4000
          description: Optional description (not valid for BANK accounts).
        taxType:
          type: string
          description: Optional Xero tax type code.
      required:
        - code
        - name
        - type
    AccountingAccount:
      type: object
      properties:
        code:
          type: string
          nullable: true
          description: >-
            Account code/identifier. Use this exact value when setting
            `account`, `assetAccount`, or `feeAssetAccount` on a transaction or
            asset.
        name:
          type: string
          nullable: true
          description: Display name of the account.
        type:
          type: string
          description: >-
            Account type as reported by the accounting platform (e.g. "Bank",
            "Other Current Asset", "EXPENSE").
      required:
        - code
        - name
        - type

````