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

# Create an entity

> Creates an entity in your organization for the mode (`live` or `test`) of the API key used. An entity is a legal holder of accounts. Returns the created entity.

**`v2`** · Base URL `https://api.fintoc.com/v2`


## OpenAPI

````yaml reference/pacioli-api.json POST /entities
openapi: 3.1.0
info:
  title: Fintoc API
  version: v2026-02-01
servers:
  - url: https://api.fintoc.com/v2
security: []
paths:
  /entities:
    post:
      tags:
        - Entities
      summary: Create entity
      description: >-
        Creates an entity in your organization for the mode (`live` or `test`)
        of the API key used. An entity is a legal holder of accounts. Returns
        the created entity.
      operationId: entities-create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                country_code:
                  type: string
                  description: >-
                    ISO 3166-1 alpha-2 country code of the entity. Use `MX` for
                    a Mexican entity, or another code such as `US` for a foreign
                    entity.
                  example: MX
                holder_name:
                  type: string
                  description: Legal name of the entity owner.
                  example: Test Entity 1
                holder_id:
                  type: string
                  description: >-
                    Mexican tax ID (RFC) of the entity owner, without dots or
                    hyphens. Required for a Mexican entity (`country_code` is
                    `MX`). For a foreign entity, omit this field or send the
                    generic foreign RFC `XEXX010101000`; Fintoc rejects any
                    other value. Must be unique within your organization, except
                    the generic foreign RFC `XEXX010101000`, which can repeat
                    across foreign entities.
                  example: AAA010101AAA
              required:
                - country_code
                - holder_name
        required: true
      responses:
        '201':
          description: The created entity.
          content:
            application/json:
              examples:
                entity_created:
                  value:
                    id: ent_2daFu0zqqDtZGJaSi2TGI2Mm1nN
                    object: entity
                    holder_id: AAA010101AAA
                    holder_name: Test Entity 1
                    is_root: false
                    mode: test
                    status: waiting_initialization
                    country_code: mx
              schema:
                $ref: '#/components/schemas/entity'
        '400':
          description: 'Invalid request: a body parameter is missing or invalid.'
          content:
            application/json:
              examples:
                invalid_country_code:
                  value:
                    error:
                      type: invalid_request_error
                      code: invalid_country_code
                      param: country_code
                      message: >-
                        Country code 'xx' is not a valid ISO 3166 alpha-2
                        country code
              schema:
                $ref: '#/components/schemas/error_object'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              examples:
                invalid_api_key:
                  value:
                    error:
                      type: authentication_error
                      code: invalid_api_key
                      message: 'Invalid API Key: invalid-*oken'
              schema:
                $ref: '#/components/schemas/error_object'
        '409':
          description: >-
            An entity with the same `holder_id` already exists in your
            organization. The generic foreign RFC `XEXX010101000` is exempt and
            can repeat.
          content:
            application/json:
              examples:
                duplicate_holder_id:
                  value:
                    error:
                      type: invalid_request_error
                      code: entity_holder_id_already_exists_for_organization
                      message: >-
                        An entity with the same holder_id already exists for
                        this organization
              schema:
                $ref: '#/components/schemas/error_object'
      security:
        - api_key: []
components:
  schemas:
    entity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the entity.
          example: ent_2daFu0zqqDtZGJaSi2TGI2Mm1nN
        object:
          const: entity
          description: Type of the object. Always `entity`.
        country_code:
          type:
            - string
            - 'null'
          description: >-
            ISO 3166-1 alpha-2 country code of the entity, in lowercase, or
            `null` when not set. For example, `cl` or `mx`.
          example: mx
        holder_id:
          type: string
          description: >-
            Mexican tax ID (RFC) of the entity owner, without dots or hyphens.
            For a foreign entity, the value is the generic foreign RFC
            `XEXX010101000`.
          example: AAA010101AAA
        holder_name:
          type: string
          description: Legal name of the entity owner.
          example: Test Entity 1
        is_root:
          type: boolean
          description: Whether this entity is your organization's root entity.
          example: true
        mode:
          type: string
          enum:
            - live
            - test
          description: >-
            Whether the entity belongs to `live` or `test` data. One of `live`
            or `test`.
          example: test
        status:
          type: string
          enum:
            - draft
            - under_review
            - pending_signature
            - canceled
            - waiting_initialization
            - operational
            - rejected
            - paused
          description: >-
            Current status of the entity. One of `draft`, `under_review`,
            `pending_signature`, `canceled`, `waiting_initialization`,
            `operational`, `rejected`, or `paused`.
          example: operational
      required:
        - id
        - object
        - country_code
        - holder_id
        - holder_name
        - is_root
        - mode
        - status
    error_object:
      type: object
      properties:
        error:
          type: object
          description: Details of the error that caused the request to fail.
          properties:
            code:
              type: string
              description: >-
                Machine-readable code identifying the specific error, for
                example `invalid_request`.
              example: invalid_request
            doc_url:
              type: string
              description: >-
                URL of a documentation page with more details about the error.
                Not returned by every error.
              example: https://docs.fintoc.com/reference/errors
            message:
              type: string
              description: Human-readable message describing the error.
              example: 'Missing required param: account_id'
            param:
              type:
                - string
                - 'null'
              description: >-
                Name of the request parameter that caused the error. Not
                returned by every error.
              example: account_id
            type:
              type: string
              description: >-
                Category of the error, for example `invalid_request_error` or
                `authentication_error`. Not returned by every error.
              example: invalid_request_error
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      in: header

````