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

# Abrir una cuenta de titular (con instrumento opcional)



## OpenAPI

````yaml es/openapi/v3-current/ledger.yaml post /v1/organizations/{organization_id}/ledgers/{ledger_id}/holders/{holder_id}/accounts
openapi: 3.1.0
info:
  title: API de Midaz Ledger
  description: >-
    Referencia completa de la API para los servicios de Midaz Ledger, incluyendo
    gestión de organizaciones, operaciones de ledger, activos, segmentos,
    portafolios, cuentas, tipos de cuenta, transacciones, operaciones, saldos,
    rutas de operación, rutas de transacción e índices de metadatos.
  version: 3.7.8
servers:
  - url: https://ledger.sandbox.lerian.net
security: []
tags:
  - name: Organizations API
  - name: Ledgers API
  - name: Assets API
  - name: Segments API
  - name: Portfolios API
  - name: Account Types API
  - name: Accounts API
  - name: Balances API
  - name: Transactions API
  - name: Operations API
  - name: Operation Routes API
  - name: Transaction Routes API
  - name: Metadata Indexes API
  - name: Holders API
  - name: Instruments API
  - name: Billing Packages API
  - name: Packages API
  - name: Billing Calculation API
  - name: Estimation API
  - name: Encryption API
  - name: Protection API
  - name: Asset Rates API
paths:
  /v1/organizations/{organization_id}/ledgers/{ledger_id}/holders/{holder_id}/accounts:
    post:
      tags:
        - Holders API
      summary: Abrir una cuenta de titular (con instrumento opcional)
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/LedgerId'
        - name: holder_id
          in: path
          required: true
          description: ID del titular (UUID)
          schema:
            type: string
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/XRequestId'
        - $ref: '#/components/parameters/Authorization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HolderAccountResponse'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    OrganizationId:
      name: organization_id
      in: path
      description: El identificador único de la Organización asociada al Ledger.
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
        format: uuid
    LedgerId:
      name: ledger_id
      in: path
      description: El identificador único del Ledger asociado.
      required: true
      example: 019c96a0-0ac0-7de9-9f53-9cf842a2ee5a
      schema:
        type: string
        format: uuid
    ContentType:
      name: Content-Type
      in: header
      description: >-
        El tipo de medio del recurso. El valor recomendado es
        `application/json`.
      required: false
      example: application/json
      schema:
        type: string
    XRequestId:
      name: X-Request-Id
      in: header
      description: Un identificador único utilizado para rastrear y seguir cada solicitud.
      required: false
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
        format: uuid
    Authorization:
      name: Authorization
      in: header
      required: false
      schema:
        type: string
      description: >
        Token JWT bearer para autenticación.

        Requerido cuando `PLUGIN_AUTH_ENABLED=true` (obligatorio en despliegues
        multiinquilino).

        Opcional en el modo OSS de inquilino único predeterminado.

        Formato: `Bearer <token>`
  schemas:
    HolderAccountResponse:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/Account'
        instrument:
          $ref: '#/components/schemas/Instrument'
        instrumentError:
          $ref: '#/components/schemas/InstrumentFailure'
      required:
        - account
        - instrument
      type: object
    Error:
      additionalProperties: false
      properties:
        code:
          description: >-
            Código de error de dominio estable y legible por máquina, acotado al
            servicio que lo emite (formato: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            Una explicación legible por humanos específica de esta ocurrencia
            del problema.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Lista opcional de detalles de error individuales
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            Una referencia URI que identifica la ocurrencia específica del
            problema.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: Código de estado HTTP
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            Un resumen breve y legible por humanos del tipo de problema. Este
            valor no debería cambiar entre distintas ocurrencias del error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: >-
            Una referencia URI a documentación legible por humanos sobre el
            error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    Account:
      additionalProperties: false
      properties:
        alias:
          examples:
            - '@treasury_checking'
          maxLength: 100
          type:
            - string
            - 'null'
        assetCode:
          examples:
            - USD
          maxLength: 100
          type: string
        blocked:
          type:
            - boolean
            - 'null'
        createdAt:
          examples:
            - '2021-01-01T00:00:00Z'
          format: date-time
          type: string
        deletedAt:
          examples:
            - '2021-01-01T00:00:00Z'
          format: date-time
          type:
            - string
            - 'null'
        entityId:
          examples:
            - EXT-ACC-12345
          maxLength: 256
          type:
            - string
            - 'null'
        holderCheckSkipped:
          examples:
            - false
          type: boolean
        holderId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type:
            - string
            - 'null'
        id:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        ledgerId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        metadata:
          additionalProperties: {}
          type: object
        name:
          examples:
            - Corporate Checking Account
          maxLength: 256
          type: string
        organizationId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        parentAccountId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type:
            - string
            - 'null'
        portfolioId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type:
            - string
            - 'null'
        segmentId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/Status'
        type:
          examples:
            - deposit
          type: string
        updatedAt:
          examples:
            - '2021-01-01T00:00:00Z'
          format: date-time
          type: string
      required:
        - id
        - name
        - parentAccountId
        - entityId
        - holderId
        - assetCode
        - organizationId
        - ledgerId
        - portfolioId
        - segmentId
        - status
        - alias
        - type
        - blocked
        - holderCheckSkipped
        - createdAt
        - updatedAt
        - deletedAt
      type: object
    Instrument:
      additionalProperties: false
      properties:
        accountId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type:
            - string
            - 'null'
        bankingDetails:
          $ref: '#/components/schemas/BankingDetails'
        createdAt:
          examples:
            - '2025-01-01T00:00:00Z'
          format: date-time
          type: string
        deletedAt:
          examples:
            - '2025-01-01T00:00:00Z'
          format: date-time
          type:
            - string
            - 'null'
        document:
          examples:
            - '91315026015'
          maxLength: 100
          type: string
        holderId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        id:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        ledgerId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type:
            - string
            - 'null'
        metadata:
          additionalProperties: {}
          type: object
        regulatoryFields:
          $ref: '#/components/schemas/RegulatoryFields'
        relatedParties:
          items:
            $ref: '#/components/schemas/RelatedParty'
          type:
            - array
            - 'null'
        type:
          examples:
            - NATURAL_PERSON
          maxLength: 100
          type: string
        updatedAt:
          examples:
            - '2025-01-01T00:00:00Z'
          format: date-time
          type: string
      required:
        - ledgerId
        - accountId
        - holderId
        - createdAt
        - updatedAt
        - deletedAt
      type: object
    InstrumentFailure:
      additionalProperties: false
      properties:
        reason:
          examples:
            - '0001'
          type: string
        status:
          examples:
            - FAILED
          type: string
      required:
        - status
        - reason
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Dónde ocurrió el error, p. ej. 'body.items[3].tags' o
            'path.thing-id'
          type: string
        message:
          description: Texto del mensaje de error
          type: string
        value:
          description: El valor en la ubicación indicada
      type: object
    Status:
      additionalProperties: false
      properties:
        code:
          enum:
            - ACTIVE
            - INACTIVE
            - PENDING
            - SUSPENDED
            - DELETED
          examples:
            - ACTIVE
          maxLength: 100
          type: string
        description:
          examples:
            - Active status
          maxLength: 256
          type:
            - string
            - 'null'
      required:
        - code
        - description
      type: object
    BankingDetails:
      additionalProperties: false
      properties:
        account:
          examples:
            - '123450'
          maxLength: 50
          type: string
        bankId:
          examples:
            - '12345'
          maxLength: 50
          type: string
        branch:
          examples:
            - '0001'
          maxLength: 50
          type: string
        closingDate:
          examples:
            - '2025-12-31'
          format: date
          type: string
        countryCode:
          examples:
            - US
          maxLength: 2
          type: string
        iban:
          examples:
            - US12345678901234567890
          maxLength: 34
          type: string
        openingDate:
          examples:
            - '2025-01-01'
          format: date
          type: string
        type:
          examples:
            - CACC
          maxLength: 10
          type: string
      type: object
    RegulatoryFields:
      additionalProperties: false
      properties:
        participantDocument:
          examples:
            - '12345678912345'
          maxLength: 100
          type: string
      type: object
    RelatedParty:
      additionalProperties: false
      properties:
        document:
          examples:
            - '12345678900'
          maxLength: 100
          type: string
        endDate:
          examples:
            - '2026-01-01'
          format: date
          type: string
        id:
          examples:
            - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        name:
          examples:
            - John Smith
          maxLength: 256
          type: string
        role:
          examples:
            - PRIMARY_HOLDER
          maxLength: 100
          type: string
        startDate:
          examples:
            - '2025-01-01'
          format: date
          type: string
      required:
        - document
        - name
        - role
        - startDate
      type: object

````