> ## 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.

# Open a holder-owned account (with optional instrument)



## OpenAPI

````yaml en/openapi/v3-current/ledger.yaml post /v1/organizations/{organization_id}/ledgers/{ledger_id}/holders/{holder_id}/accounts
openapi: 3.1.0
info:
  title: Midaz Ledger API
  description: >-
    Complete API reference for Midaz Ledger services including organization
    management, ledger operations, assets, segments, portfolios, accounts,
    account types, transactions, operations, balances, operation routes,
    transaction routes, and metadata indexes.
  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: Open a holder-owned account (with optional instrument)
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/LedgerId'
        - name: holder_id
          in: path
          required: true
          description: Holder ID (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: The unique identifier of the Organization associated with the Ledger.
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
        format: uuid
    LedgerId:
      name: ledger_id
      in: path
      description: The unique identifier of the associated Ledger.
      required: true
      example: 019c96a0-0ac0-7de9-9f53-9cf842a2ee5a
      schema:
        type: string
        format: uuid
    ContentType:
      name: Content-Type
      in: header
      description: >-
        The type of media of the resource. Recommended value is
        `application/json`.
      required: false
      example: application/json
      schema:
        type: string
    XRequestId:
      name: X-Request-Id
      in: header
      description: A unique identifier used to trace and track each request.
      required: false
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
        format: uuid
    Authorization:
      name: Authorization
      in: header
      required: false
      schema:
        type: string
      description: >
        Bearer JWT token for authentication.

        Required when `PLUGIN_AUTH_ENABLED=true` (enforced in multi-tenant
        deployments).

        Optional in default OSS single-tenant mode.

        Format: `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: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the 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: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      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

````