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

# Update an Instrument



## OpenAPI

````yaml en/openapi/v3-current/ledger.yaml patch /v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}
openapi: 3.1.0
info:
  title: Midaz Ledger API
  version: 4.0.0
servers:
  - url: /
security: []
tags:
  - name: Account Types (v1)
  - name: Account Types (v2)
  - name: Accounts (v1)
  - name: Accounts (v2)
  - name: Asset Rates (v1)
  - name: Assets (v1)
  - name: Assets (v2)
  - name: Balances (v1)
  - name: Balances (v2)
  - name: Billing Calculate (v2)
  - name: Billing Packages (v2)
  - name: Composition (v2)
  - name: Encryption (v2)
  - name: Fees (v2)
  - name: Holders (v2)
  - name: Instruments (v2)
  - name: Ledgers (v1)
  - name: Ledgers (v2)
  - name: Metadata Indexes (v1)
  - name: Metadata Indexes (v2)
  - name: Operation Routes (v1)
  - name: Operation Routes (v2)
  - name: Operations (v1)
  - name: Operations (v2)
  - name: Organizations (v1)
  - name: Organizations (v2)
  - name: Packages (v2)
  - name: Portfolios (v1)
  - name: Portfolios (v2)
  - name: Protection (v2)
  - name: Segments (v1)
  - name: Segments (v2)
  - name: Transaction Routes (v1)
  - name: Transaction Routes (v2)
  - name: Transactions (v1)
  - name: Transactions (v2)
paths:
  /v2/organizations/{organization_id}/holders/{holder_id}/instruments/{instrument_id}:
    patch:
      tags:
        - Instruments (v2)
      summary: Update an Instrument
      operationId: updateInstrumentV2
      parameters:
        - description: Organization ID (UUID)
          in: path
          name: organization_id
          required: true
          schema:
            description: Organization ID (UUID)
            type: string
        - description: Holder ID (UUID)
          in: path
          name: holder_id
          required: true
          schema:
            description: Holder ID (UUID)
            type: string
        - description: Instrument ID (UUID)
          in: path
          name: instrument_id
          required: true
          schema:
            description: Instrument ID (UUID)
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInstrumentInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instrument'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateInstrumentInput:
      additionalProperties: false
      properties:
        bankingDetails:
          $ref: '#/components/schemas/BankingDetails'
        metadata:
          additionalProperties: {}
          type: object
        regulatoryFields:
          $ref: '#/components/schemas/RegulatoryFields'
        relatedParties:
          items:
            $ref: '#/components/schemas/RelatedParty'
          type:
            - array
            - 'null'
      required:
        - metadata
        - bankingDetails
      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:
            - '12345678900'
          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
    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
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      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
    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
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````