> ## 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 Tax Rate API

> Create a tax rate in Breezing as a single percentage or a stack of components, such as state, county, and city sales tax.



## OpenAPI

````yaml POST /taxes
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:
  /taxes:
    post:
      tags:
        - Tax Rates
      summary: Create a tax rate
      description: >-
        Create a tax rate as EITHER a single percentage (`rate`) OR a component
        stack (`components`, US state + county + city, GST + PST, ...) whose
        effective total is derived server-side; sending both, or neither, 400s.
        Names are unique per company case-insensitively (409). Provider mappings
        are stored as given and validated by the provider at publish time.
      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/CreateTaxRateBody'
      responses:
        '200':
          description: Tax rate created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/TaxRate'
                required:
                  - success
                  - data
        '400':
          description: Invalid rate or components
          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: A tax rate with this name already exists
          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:
    CreateTaxRateBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Unique per company, case-insensitively. This is the value
            transactions and invoices reference in their vat field.
          example: VAT 8.1%
        rate:
          type: string
          minLength: 1
          maxLength: 20
          description: >-
            Single-rate tax: percentage 0..100 with up to 4 decimals, as a
            string. Mutually exclusive with components.
          example: '8.1'
        components:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                minLength: 1
                maxLength: 100
                example: State tax
              rate:
                type: string
                minLength: 1
                maxLength: 20
                description: Percentage 0..100 with up to 4 decimals, as a string.
                example: '6.25'
              isCompound:
                type: boolean
                description: >-
                  Compound components apply on the base plus the non-compound
                  tax (the Xero/Quebec model), so component order never matters.
            required:
              - name
              - rate
          minItems: 1
          maxItems: 10
          description: >-
            Component stack (1-10); the stored rate becomes the derived total.
            Mutually exclusive with rate.
        description:
          type: string
          maxLength: 500
        xeroTaxType:
          type: string
          nullable: true
          maxLength: 100
          description: >-
            Xero TaxType code (from the Xero organisation's tax rates). Null
            clears.
        qboTaxCode:
          type: string
          nullable: true
          maxLength: 100
          description: QuickBooks TaxCode id. Null clears.
        vatGlAccount:
          type: string
          nullable: true
          maxLength: 100
          description: >-
            Chart account CODE for the input VAT line: the native invoice
            accrual journal and OUT transaction rows (purchases) naming the
            rate. Null clears. Once the company has a chart of accounts, a rate
            above 0 needs at least one of vatGlAccount / outputVatGlAccount and
            every code must exist in the chart (400 otherwise).
        outputVatGlAccount:
          type: string
          nullable: true
          maxLength: 100
          description: >-
            Chart account CODE for the output VAT line on IN transaction rows
            (sales) naming the rate. Null clears.
      required:
        - name
    TaxRate:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        rate:
          type: string
          description: >-
            The EFFECTIVE total percentage as a decimal string. For component
            rates it is derived server-side from the stack.
        components:
          type: array
          nullable: true
          items:
            type: object
            properties:
              name:
                type: string
                minLength: 1
                maxLength: 100
                example: State tax
              rate:
                type: string
                minLength: 1
                maxLength: 20
                description: Percentage 0..100 with up to 4 decimals, as a string.
                example: '6.25'
              isCompound:
                type: boolean
                description: >-
                  Compound components apply on the base plus the non-compound
                  tax (the Xero/Quebec model), so component order never matters.
            required:
              - name
              - rate
          description: Null for a single-rate tax, else the component stack.
        description:
          type: string
        xeroTaxType:
          type: string
          nullable: true
          description: >-
            Xero TaxType code this rate publishes as on bills (null = the Xero
            account default).
        qboTaxCode:
          type: string
          nullable: true
          description: QuickBooks TaxCode id this rate publishes as on bills.
        vatGlAccount:
          type: string
          nullable: true
          description: >-
            Chart account code the rate's INPUT VAT posts to: the native invoice
            accrual journal and every OUT transaction row (a purchase) naming
            the rate book the account line net with the VAT on this account.
            Null = one gross line.
        outputVatGlAccount:
          type: string
          nullable: true
          description: >-
            Chart account code the rate's OUTPUT VAT posts to on IN transaction
            rows (a sale). Null = one gross line; the input account is never
            used as a fallback.
        isArchived:
          type: boolean
        createdAt:
          type: number
          description: unix ms
        updatedAt:
          type: number
          description: unix ms
      required:
        - id
        - name
        - rate
        - components
        - description
        - xeroTaxType
        - qboTaxCode
        - vatGlAccount
        - outputVatGlAccount
        - isArchived
        - createdAt
        - updatedAt

````

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