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

# Save chart of accounts templates

> Save a new (or update an existing) set of chart of accounts templates for the specified business type



## OpenAPI

````yaml https://dev.tight.com/v3/api-docs post /v6/templates/chartOfAccounts
openapi: 3.0.1
info:
  title: Tight API
  contact:
    name: Hurdlr, Inc. (dba Tight)
    url: https://www.tight.com
    email: api@tight.com
  version: 6.0.0
servers:
  - url: https://sandbox.tight.com
    description: Staging Environment
  - url: https://prod.tight.com
    description: Production Environment
security:
  - EmbedToken: []
paths:
  /v6/templates/chartOfAccounts:
    post:
      tags:
        - Templates
      summary: Save chart of accounts templates
      description: >-
        Save a new (or update an existing) set of chart of accounts templates
        for the specified business type
      operationId: postTemplateChartOfAccounts
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ChartOfAccounts'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponseListChartOfAccounts'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: REQUIRED
                    message: Amount is required
                    param: amount
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: INVALID_TOKEN
                    message: Invalid access token
        '403':
          description: Not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: FORBIDDEN
                    message: Expired access token
        '404':
          description: Endpoint not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: BAD_REQUEST
                    message: Resource not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: UNKNOWN_ERROR
                    message: Something went wrong. Please try again later.
      security:
        - PartnerAuth: []
components:
  schemas:
    ChartOfAccounts:
      required:
        - accounts
        - businessTypeId
        - id
        - name
      type: object
      properties:
        id:
          type: string
          description: Id of the chart of accounts
          example: coa_123456
        name:
          type: string
          description: Name of the chart of accounts
          example: Standard Business Accounts
        businessTypeId:
          type: string
          description: Business type id this chart applies to
          example: bt_789012
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/TemplateGlAccount'
    SuccessResponseListChartOfAccounts:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        data:
          type: array
          description: The data generated by the action performed.
          items:
            $ref: '#/components/schemas/ChartOfAccounts'
    ErrorResponse:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        data:
          type: object
          description: The data generated by the action performed.
          nullable: true
        error:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
    TemplateGlAccount:
      required:
        - accountNo
        - assetType
        - children
        - equityType
        - expenseType
        - id
        - incomeType
        - level
        - liabilityType
        - name
        - type
      type: object
      properties:
        id:
          type: string
          description: Id of the template General Ledger account
          example: tgla_324231
        accountNo:
          type: string
          description: Account number in the chart of accounts
          example: '11500'
        name:
          type: string
          description: Name of the template General Ledger account
          example: Accounts Receivable
        level:
          type: integer
          description: Hierarchical level of the account in the chart of accounts
          format: int32
          example: 3
        type:
          type: string
          description: Type of the General Ledger account
          example: ASSET
          enum:
            - ASSET
            - LIABILITY
            - EQUITY
            - INCOME
            - COGS
            - EXPENSE
            - OTHER_INCOME
            - OTHER_EXPENSE
            - SUSPENSE
        assetType:
          type: string
          description: Asset type of the General Ledger account
          nullable: true
          example: AR
          enum:
            - CASH
            - AR
            - OTHER_CURRENT
            - FIXED
            - OTHER_NON_CURRENT
            - FIXED_DEPRECIATION
            - SALES_TAX_CREDIT
            - DEFAULT_CASH
            - CLEARING_ACCOUNT
            - OTHER_RECEIVABLE
            - SECURITY_DEPOSIT
            - INVENTORY
            - UNMATCHED_TRANSFERS
        liabilityType:
          type: string
          description: Liability type of the General Ledger account
          nullable: true
          enum:
            - AP
            - CREDIT_CARD
            - SALES_TAX
            - OTHER_CURRENT
            - LONG_TERM
            - DEFERRED_REVENUE
            - PAYROLL
            - ADMIN_STAFF_BENEFITS_PAYABLE
            - ADMIN_STAFF_BENEFITS_INSURANCE_PAYABLE
            - PAYROLL_TAXES_PAYABLE
            - ADMIN_STAFF_BENEFITS_RETIREMENT_PAYABLE
        equityType:
          type: string
          description: Equity type of the General Ledger account
          nullable: true
          enum:
            - CAPITAL
            - DRAW_OR_DISTRIBUTIONS
            - OPENING_BALANCE
            - RETAINED_EARNINGS
            - PAID_IN_CAPITAL
            - PERSONAL_INCOME_AND_EXPENSES
            - CONTRIBUTION
            - FEDERAL_INCOME_TAX
            - STATE_INCOME_TAX
            - PERSONAL_INCOME
            - OTHER_PERSONAL_EXPENSES
        incomeType:
          type: string
          description: Income type of the General Ledger account
          nullable: true
          enum:
            - SERVICE_INCOME
            - EXPENSE_MARKUP
            - DISCOUNT
        expenseType:
          type: string
          description: Expense type of the General Ledger account
          nullable: true
          enum:
            - MERCHANT_FEE
            - OTHER
            - CONTRACTORS
            - ADMIN_STAFF_BENEFITS
            - ADMIN_STAFF_PAYROLL
            - ADMIN_STAFF_SALARIES
            - NON_DEDUCTIBLE_SALES_TAX_PAID
            - INCOME_TAX
            - REIMBURSABLE_EXPENSES
            - UNCATEGORIZED_EXPENSES
            - ADMIN_STAFF_BENEFITS_RETIREMENT
            - ADMIN_STAFF_BENEFITS_HEALTH_INSURANCE
            - FEDERAL_INCOME_TAX
            - STATE_INCOME_TAX
        customData:
          type: object
          description: >-
            Custom JSON in which you can store any data with max length of 2000
            characters
          nullable: true
          example:
            internal_key: some_internal_key
            some_other_field: 23434
        children:
          type: array
          items:
            $ref: '#/components/schemas/TemplateGlAccount'
      description: Template GL account assigned to matched transactions
      nullable: true
    ErrorItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the error. Safe for programmatic use.
          enum:
            - UNKNOWN_ERROR
            - INVALID_TOKEN
            - EXPIRED_TOKEN
            - FORBIDDEN
            - BAD_REQUEST
            - JSON_ERROR
            - DUPLICATE
            - REQUIRED
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - INVALID_FORMAT
            - NOT_FOUND
        message:
          type: string
          description: >-
            A human-readable message providing more details about the error.
            Safe for displaying to a user.
        param:
          type: string
          description: >-
            If the error is parameter-specific, the parameter related to the
            error. This can be used to display a message near the correct form
            field.
      description: Errors associated with the action performed, if applicable.
  securitySchemes:
    EmbedToken:
      type: http
      description: >-
        Bearer authentication header of the form `Bearer <token>`, see
        [Authentication for more
        detail](/api-reference/authentication#partner-level-authentication).
      scheme: bearer
    PartnerAuth:
      type: http
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is a [partner-level
        token](/api-reference/authentication#partner-level-authentication).
      scheme: bearer

````