> ## 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 a Holder

> Use this endpoint to update the details of a holder.



## OpenAPI

````yaml /en/openapi/v3-current/CRM.yaml patch /v1/holders/{holder_id}
openapi: 3.1.0
info:
  title: CRM
  description: >-
    The CRM Integration API is a non-transactional component that provides a set
    of endpoints for managing holders of ledger accounts and their associated
    data. CRM is designed to organize and expose customer data for use by other
    components within the system, facilitating efficient integration and data
    management.
  version: 3.7.1
servers:
  - url: https://crm.sandbox.lerian.net
security: []
tags:
  - name: Holders
paths:
  /v1/holders/{holder_id}:
    patch:
      tags:
        - Holders API
      summary: Update a Holder
      description: Use this endpoint to update the details of a holder.
      parameters:
        - name: holder_id
          in: path
          description: Unique identifier of the holder you want to update.
          required: true
          example: ''
          schema:
            type: string
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/XOrganizationId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHolderRequest'
            example:
              externalId: d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42
              name: ACME Corp LTD
              addresses:
                primary:
                  line1: Rua Botucatu 10
                  line2: Casa B
                  zipCode: '04023060'
                  city: São Paulo
                  state: SP
                  country: BR
                  description: BR address
                additional1:
                  line1: 75020 Odell Grove
                  line2: Apt. 181
                  zipCode: 40969-4460
                  city: Rubenport
                  state: NH
                  country: US
                  description: US address
                additional2:
                  line1: 52 Lavender Hill
                  line2: Apt. 2
                  zipCode: SW11 5RH
                  city: Battersea
                  state: London
                  country: UK
                  description: UK address
              contact:
                primaryEmail: john.doe@example.com
                secondaryEmail: john.doe@example.com
                mobilePhone: '5577927967227'
                otherPhone: '556829443019'
              naturalPerson:
                favoriteName: Timothy Bode
                socialName: Dr. Ervin Keebler
                gender: male
                birthDate: '1990-10-12'
                civilStatus: Married
                nationality: Brazilian
                motherName: Hector Jaskolski
                fatherName: Ms. Carolyn Weber
                status: Active
              legalPerson:
                activity: Electronic devices development
                foundingDate: '2025-01-01'
                representative:
                  document: '91315026015'
                  email: john.doe@example.com
                  name: John Doe
                  role: CFO
                size: Medium
                status: Closed
                tradeName: Lerian Studio
                type: Limited Liability
              metadata:
                metadata1: value1
                metadata2: 2
      responses:
        '200':
          description: >-
            Indicates that the resource was successfully created and the
            operation was completed as expected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HolderResponse'
              example:
                id: 0194f0ea-2cb2-78c9-b9be-704ba20a9cd8
                externalId: d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42
                type: LEGAL_PERSON
                name: ACME Corp LTD
                document: '91315026015'
                addresses:
                  primary:
                    line1: Rua Botucatu 10
                    line2: Casa B
                    zipCode: '04023060'
                    city: São Paulo
                    state: SP
                    country: BR
                    description: BR address
                  additional1:
                    line1: 75020 Odell Grove
                    line2: Apt. 181
                    zipCode: 40969-4460
                    city: Rubenport
                    state: NH
                    country: US
                    description: US address
                  additional2:
                    line1: 52 Lavender Hill
                    line2: Apt. 2
                    zipCode: SW11 5RH
                    city: Battersea
                    state: London
                    country: UK
                    description: UK address
                contact:
                  primaryEmail: john.doe@example.com
                  secondaryEmail: john.doe@example.com
                  mobilePhone: '5577927967227'
                  otherPhone: '556829443019'
                naturalPerson:
                  favoriteName: Timothy Bode
                  socialName: Dr. Ervin Keebler
                  gender: male
                  birthDate: '1990-10-12'
                  civilStatus: Married
                  nationality: Brazilian
                  motherName: Hector Jaskolski
                  fatherName: Ms. Carolyn Weber
                  status: Active
                legalPerson:
                  activity: Electronic devices development
                  foundingDate: '2025-01-01'
                  representative:
                    document: '91315026015'
                    email: john.doe@example.com
                    name: John Doe
                    role: CFO
                  size: Medium
                  status: Closed
                  tradeName: Lerian Studio
                  type: Limited Liability
                metadata:
                  metadata1: value1
                  metadata2: 2
                createdAt: '2025-01-01T00:00:00Z'
                updatedAt: '2025-01-01T00:00:00Z'
                deletedAt: null
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0001:
                  $ref: '#/components/examples/Error0001'
                Error0002:
                  $ref: '#/components/examples/Error0002'
                Error0004:
                  $ref: '#/components/examples/Error0004'
                Error0005:
                  $ref: '#/components/examples/Error0005'
                Error0007:
                  $ref: '#/components/examples/Error0007'
                Error0012:
                  $ref: '#/components/examples/Error0012'
                Error0022:
                  $ref: '#/components/examples/Error0022'
          headers: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0006:
                  $ref: '#/components/examples/Error0006'
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0014:
                  $ref: '#/components/examples/Error0014'
          headers: {}
      security: []
components:
  parameters:
    Authorization:
      name: Authorization
      in: header
      description: >-
        The authorization token in the 'Bearer <token>' format.  


        **Important:** This header is required if your environment has Access
        Manager enabled. For more information, refer to the [Access
        Manager](/en/access-manager) documentation.
      required: false
      schema:
        type: string
    XOrganizationId:
      name: X-Organization-id
      in: header
      description: The unique identifier of the Organization associated with the request.
      required: true
      schema:
        type: string
        example: 019c96a0-0a98-7287-9a31-786e0809c769
  schemas:
    UpdateHolderRequest:
      description: User's details that will be updated.
      type: object
      properties:
        externalId:
          description: Optional field for linking this Holder to an external system.
          type: string
        name:
          description: >-
            Full name of the Holder.


            **Note:** Use the legal name for companies (Legal Person). For
            individuals (Natural Person), use their full name.
          type: string
        addresses:
          $ref: '#/components/schemas/Addresses'
          description: Holder's address information.
        contact:
          $ref: '#/components/schemas/Contact'
          description: Holder's contact information.
        naturalPerson:
          $ref: '#/components/schemas/NaturalPerson'
          description: Information specific to individuals.
        legalPerson:
          $ref: '#/components/schemas/LegalPerson'
          description: Information specific to legal entities.
        metadata:
          $ref: '#/components/schemas/Metadata'
    HolderResponse:
      description: Holder's details.
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the Holder.
        externalId:
          description: Optional field for linking this Holder to an external system.
          type: string
        type:
          description: |-
            Defines if the Holder is an individual or a company.
            * `NATURAL_PERSON` – Individual
            * `LEGAL_PERSON` – Company
          type: string
          enum:
            - NATURAL_PERSON
            - LEGAL_PERSON
        name:
          type: string
          description: Full name of the Holder.
        document:
          type: string
          description: Holder's identification number (such as _CPF_ or _CNPJ_).
        addresses:
          $ref: '#/components/schemas/Addresses'
          description: Holder's address information.
        contact:
          $ref: '#/components/schemas/Contact'
          description: Holder's contact information.
        naturalPerson:
          $ref: '#/components/schemas/NaturalPerson'
          description: Information specific to individuals.
        legalPerson:
          $ref: '#/components/schemas/LegalPerson'
          description: Information specific to legal entities.
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          description: Date when the Holder was created.
        deletedAt:
          type: string
          description: Date when the Holder was deleted.
        updatedAt:
          type: string
          description: Date when the Holder was last updated.
    ErrorMessage:
      description: The response message error.
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
    Addresses:
      description: Information about the Holder's address.
      type: object
      properties:
        primary:
          $ref: '#/components/schemas/Address'
          description: Details about the primary address.
        additional1:
          $ref: '#/components/schemas/Address'
        additional2:
          $ref: '#/components/schemas/Address'
    Contact:
      description: User's contact information.
      type: object
      properties:
        primaryEmail:
          description: The primary email used to contact the holder.
          type: string
        secondaryEmail:
          description: The secondary email used to contact the holder.
          type: string
        mobilePhone:
          description: >-
            The mobile phone number used to contact the holder, including
            country code.
          type: string
        otherPhone:
          description: Any additional phone number used to contact the holder.
          type: string
    NaturalPerson:
      description: Personal details of an individual (Natural Person).
      type: object
      properties:
        favoriteName:
          description: Nickname or preferred name.
          type: string
        socialName:
          description: Social name, if different from the legal name.
          type: string
        gender:
          description: Gender identity of the person.
          type: string
        birthDate:
          type: string
          description: Date of birth in YYYY-MM-DD format.
          format: date
        civilStatus:
          description: 'Civil status — for example: `Single`, `Married`, or `Divorced`.'
          type: string
        nationality:
          description: Nationality, for example, `Brazilian`.
          type: string
        motherName:
          description: Mother's full name.
          type: string
        fatherName:
          description: Father's full name.
          type: string
        status:
          description: Current status of the individual in the system.
          type: string
    LegalPerson:
      description: Information specific to legal entities (companies).
      type: object
      properties:
        activity:
          description: The type of business or activity the company engages in.
          type: string
        foundingDate:
          description: The date when the company was established.
          type: string
        representative:
          $ref: '#/components/schemas/Representative'
          description: Details of the company's legal representative.
        size:
          description: The size classification of the company.
          type: string
        status:
          description: The current status of the company.
          type: string
        tradeName:
          description: The registered business name of the company, if applicable.
          type: string
        type:
          description: The legal structure of the company.
          type: string
    Metadata:
      type: object
      additionalProperties:
        type: string
      description: >-
        An object containing key-value pairs to add as metadata, where the field
        `name` is the key and the field `value` is the value. For example, to
        add a Cost Center, use 'costCenter': 'BR_11101997'.
    Address:
      description: Details about a specific address.
      type: object
      properties:
        line1:
          description: Street name and building number.
          type: string
        line2:
          description: Extra address details, for example, apartment or suite number.
          type: string
        zipCode:
          description: Postal or ZIP code.
          type: string
        city:
          description: City where the address is located.
          type: string
        state:
          description: State, province, or region.
          type: string
        country:
          description: Two-letter country code (ISO 3166-1 alpha-2).
          type: string
        description:
          description: A label to help identify this address.
          type: string
    Representative:
      description: Details of the company's legal representative.
      type: object
      properties:
        document:
          description: The document number of the legal representative.
          type: string
        email:
          description: The email address of the legal representative.
          type: string
        name:
          description: The legal representative's name.
          type: string
        role:
          description: The role of the legal representative within the company.
          type: string
  examples:
    Error0001:
      value:
        code: CRM-0001
        title: Invalid Metadata Nesting
        message: >-
          The metadata object cannot contain nested values. Please ensure that
          the value %v is not nested and try again.
      summary: Invalid Metadata Nesting
    Error0002:
      value:
        code: CRM-0002
        title: Metadata Key Length Exceeded
        message: >-
          The metadata key %v exceeds the maximum allowed length of %v
          characters. Please use a shorter key.
      summary: Metadata Key Length Exceeded
    Error0004:
      value:
        code: CRM-0004
        title: Invalid Field Type
        message: >-
          Your request contains one or more fields with an invalid data type.
          Please refer to the documentation to verify that all fields have the
          correct type.
      summary: Invalid Field Type
    Error0005:
      value:
        code: CRM-0005
        title: Invalid Path Parameter
        message: >-
          One or more path parameters are in an incorrect format. Please check
          the following parameters %v and ensure they meet the required format
          before trying again.
      summary: Invalid Path Parameter
    Error0007:
      value:
        code: CRM-0007
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields as per the documentation. The unexpected fields are
          listed in the fields object.
        fields: '{{field}}: {{field.value}}'
      summary: Unexpected Fields in the Request
    Error0012:
      value:
        code: CRM-0012
        title: Metadata Value Length Exceeded
        message: >-
          The metadata value %v exceeds the maximum allowed length of %v
          characters. Please use a shorter value.
      summary: Metadata Value Length Exceeded
    Error0022:
      value:
        code: CRM-0022
        title: Invalid Header Value
        message: >-
          One or more headers have invalid values. Please check the following
          headers %v and ensure they contain valid UUIDs before trying again.
      summary: Invalid Header Value
    Error0006:
      value:
        code: CRM-0006
        title: Holder ID Not Found
        message: >-
          The provided holder ID does not exist in our records. Please verify
          the holder ID and try again.
      summary: Holder ID Not Found
    Error0014:
      value:
        code: CRM-0014
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.
      summary: Internal Server Error

````