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

# Update broker

> Updates a broker profile inside a brokerage firm. Provide the brokerage firm id and the broker user id in the path and the fields to update in the request body. Only allowed for users with edit permissions.



## OpenAPI

````yaml /openapi.json patch /brokerage-firms/{brokerageFirmId}/brokers/{brokerUserId}
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /brokerage-firms/{brokerageFirmId}/brokers/{brokerUserId}:
    patch:
      tags:
        - brokerage-firms
      summary: Update broker
      description: >-
        Updates a broker profile inside a brokerage firm. Provide the brokerage
        firm id and the broker user id in the path and the fields to update in
        the request body. Only allowed for users with edit permissions.
      operationId: BrokerController_updateBroker
      parameters:
        - name: brokerUserId
          required: true
          in: path
          description: Broker user id
          schema:
            type: string
        - name: brokerageFirmId
          required: true
          in: path
          description: Brokerage firm id
          schema:
            type: string
      requestBody:
        required: true
        description: Fields to update for the broker
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBrokerInputBody'
      responses:
        '200':
          description: Broker updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateBrokerOutput'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/UserNotFoundErrorDto'
                  - $ref: '#/components/schemas/BrokerageFirmNotFoundErrorDto'
              examples:
                USER_NOT_FOUND:
                  $ref: '#/components/schemas/UserNotFoundErrorDto'
                BROKERAGE_FIRM_NOT_FOUND:
                  $ref: '#/components/schemas/BrokerageFirmNotFoundErrorDto'
          description: ''
components:
  schemas:
    UpdateBrokerInputBody:
      type: object
      properties:
        firstName:
          type: string
          description: First name
        lastName:
          type: string
          description: Last name
        brokerRole:
          type: string
    UpdateBrokerOutput:
      type: object
      properties: {}
    UserNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - USER_NOT_FOUND
        message:
          type: string
          example: No user found for user id {userId}
        details:
          $ref: '#/components/schemas/UserNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    BrokerageFirmNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - BROKERAGE_FIRM_NOT_FOUND
        message:
          type: string
          example: No brokerage firm found for brokerage firm id {brokerageFirmId}
        details:
          $ref: '#/components/schemas/BrokerageFirmNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    UserNotFoundDetailsDto:
      type: object
      properties:
        userId:
          type: string
        source:
          type: string
      required:
        - userId
        - source
    BrokerageFirmNotFoundDetailsDto:
      type: object
      properties:
        brokerageFirmId:
          type: string
        source:
          type: string
        policyId:
          type: string
      required:
        - brokerageFirmId

````