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

# Create tax category

> Create a tax category. System generates a unique Zenskar code (e.g. ZEN_TAX_00001).



## OpenAPI

````yaml /openAPI/openapi-20240301.json post /tax/categories
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /tax/categories:
    post:
      tags:
        - Tax
      summary: Create tax category
      description: >-
        Create a tax category. System generates a unique Zenskar code (e.g.
        ZEN_TAX_00001).
      operationId: Create-tax-category
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaxCategorySchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxCategoryResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateTaxCategorySchema:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Category name (e.g. SAAS_SOFTWARE)
        external_codes:
          additionalProperties: true
          type: object
          title: External Codes
          description: 'Provider mappings e.g. {''avalara'': ''...'', ''anrok'': ''...''}'
      type: object
      required:
        - name
      title: CreateTaxCategorySchema
      description: >-
        Request body for creating a tax category. System generates Zenskar code
        from name.
    TaxCategoryResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Tax category ID
        organization_id:
          type: string
          format: uuid
          title: Organization Id
          description: Organisation ID
        code:
          type: string
          title: Code
          description: Zenskar tax code (e.g. ZEN_TAX_001)
        name:
          type: string
          title: Name
          description: Category name
        external_codes:
          additionalProperties: true
          type: object
          title: External Codes
          description: Provider external codes
      type: object
      required:
        - id
        - organization_id
        - code
        - name
      title: TaxCategoryResponseSchema
      description: Tax category in API responses.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````