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

# Create customer tax profile

> Creates a fiscal profile for a customer.



## OpenAPI

````yaml /openapi.yaml post /v1/customers/{customerId}/tax-profiles
openapi: 3.0.3
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
  - url: https://api.demo.quentli.com
    description: Demo API hostname served by staging
security:
  - organizationApiKey: []
tags:
  - name: Auth
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
paths:
  /v1/customers/{customerId}/tax-profiles:
    post:
      tags:
        - Customers
      summary: Create customer tax profile
      description: Creates a fiscal profile for a customer.
      operationId: customers_create_tax_profile
      parameters:
        - schema:
            type: string
            description: Identifier of the customer.
          required: true
          description: Identifier of the customer.
          name: customerId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerTaxInfoArgs'
      responses:
        '200':
          description: Customer tax profile created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetCustomerTaxInfoPayload'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    CreateCustomerTaxInfoArgs:
      type: object
      properties:
        input:
          type: object
          properties:
            taxInfo:
              type: object
              properties:
                legalName:
                  type: string
                  description: Legal name from the Constancia de Situacion Fiscal.
                taxId:
                  type: string
                  minLength: 1
                  description: RFC.
                  example: XAXX010101000
                taxSystem:
                  type: string
                  minLength: 1
                  description: SAT tax regime code.
                  example: '601'
                zip:
                  type: string
                  minLength: 1
                  maxLength: 5
                  description: Fiscal address ZIP code.
                  example: '06100'
                default:
                  type: boolean
                  description: Whether this should become the default tax profile.
                defaultUsage:
                  type: string
                  minLength: 3
                  maxLength: 4
                  description: Default CFDI usage code.
                  example: G03
                neighborhood:
                  type: string
                  description: Fiscal address neighborhood.
                street:
                  type: string
                  description: Fiscal address street.
                outerNumber:
                  type: string
                  description: Fiscal address exterior number.
                innerNumber:
                  type: string
                  description: Fiscal address interior number.
                city:
                  type: string
                  description: Fiscal address city.
                state:
                  type: string
                  description: Fiscal address state.
              required:
                - legalName
                - taxId
                - taxSystem
                - zip
                - defaultUsage
              additionalProperties: false
          required:
            - taxInfo
          additionalProperties: false
      required:
        - input
      additionalProperties: false
      description: >-
        Request body for creating a customer tax profile (customer id is
        provided in the URL path).
    SetCustomerTaxInfoPayload:
      type: object
      properties:
        customerTaxInfo:
          $ref: '#/components/schemas/CustomerTaxInfo'
      required:
        - customerTaxInfo
      description: Created or updated customer tax profile.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
    CustomerTaxInfo:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the tax profile.
          example: cti_1234567890abcdefghij
        createdAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When the tax profile was created.
        updatedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When the tax profile was last updated.
        customerId:
          type: string
          description: Customer that owns this tax profile.
          example: cus_1234567890abcdefghij
        legalName:
          type: string
          description: Legal name from the Constancia de Situacion Fiscal.
        default:
          type: boolean
          description: Whether this is the default tax profile.
          example: true
        defaultUsage:
          type: string
          description: Default CFDI usage code.
          example: G03
        taxId:
          type: string
          description: RFC.
          example: XAXX010101000
        taxSystem:
          type: string
          description: SAT tax regime code.
          example: '601'
        zip:
          type: string
          description: Fiscal address ZIP code.
          example: '06100'
        city:
          type: string
          nullable: true
          description: Fiscal address city.
          example: Ciudad de Mexico
        state:
          type: string
          nullable: true
          description: Fiscal address state.
          example: Ciudad de Mexico
        country:
          type: string
          nullable: true
          description: Fiscal address country.
          example: MEX
        neighborhood:
          type: string
          nullable: true
          description: Fiscal address neighborhood.
          example: null
        street:
          type: string
          nullable: true
          description: Fiscal address street.
          example: null
        outerNumber:
          type: string
          nullable: true
          description: Fiscal address exterior number.
          example: null
        innerNumber:
          type: string
          nullable: true
          description: Fiscal address interior number.
          example: null
      required:
        - id
        - createdAt
        - updatedAt
        - customerId
        - legalName
        - default
        - defaultUsage
        - taxId
        - taxSystem
        - zip
        - city
        - state
        - country
        - neighborhood
        - street
        - outerNumber
        - innerNumber
      description: Fiscal profile used to issue tax invoices for a customer.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'

````