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

# Create or update broker

> Create or update a broker in Venturu's system. If the broker with the specified external ID already exists, their information will be updated. If not, a new broker will be created.



## OpenAPI

````yaml /openapi.json put /partner/v1/brokers/{externalBrokerId}
openapi: 3.0.0
info:
  title: Venturu API Documentation
  version: 1.0.0
  description: This is the OpenAPI specification for Venturu.
servers:
  - url: https://www.venturu.com/api
    description: Production server
  - url: http://localhost:3000/api
    description: Local development server
security: []
paths:
  /partner/v1/brokers/{externalBrokerId}:
    put:
      tags:
        - Partner
      summary: Create or update broker
      description: >-
        Create or update a broker in Venturu's system. If the broker with the
        specified external ID already exists, their information will be updated.
        If not, a new broker will be created.
      operationId: put-partner-v1-brokers-{externalBrokerId}
      parameters:
        - in: path
          name: externalBrokerId
          schema:
            type: string
            description: The ID of the broker from your system.
          required: true
          description: The ID of the broker from your system.
          example: '123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putBrokerRequestSchema'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/putBrokerResponseSchema'
        '201':
          description: HTTP 201
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/putBrokerResponseSchema'
      security:
        - BearerAuth: []
components:
  schemas:
    putBrokerRequestSchema:
      type: object
      properties:
        name:
          type: string
          description: The full name of the broker.
        email:
          type: string
          description: The email address of the broker.
        phone:
          type: string
          nullable: true
          description: The phone number of the broker.
        avatarUrl:
          type: string
          nullable: true
          description: A URL to the broker's profile picture.
        forwardingEmail:
          type: string
          nullable: true
          description: >-
            If leads should be forwarded to a specific email address (i.e. in
            case of CRMs), this value can be specified.
        profile:
          type: object
          properties:
            bio:
              type: string
              nullable: true
              description: A short biography of the broker.
            website:
              type: string
              nullable: true
              description: The broker's personal or professional website.
            linkedInUrl:
              type: string
              nullable: true
              description: The broker's LinkedIn profile URL.
          nullable: true
          description: Additional profile information about the broker.
        licenses:
          type: array
          items:
            type: object
            properties:
              licenseNumber:
                type: string
                description: The license number of the broker.
              state:
                type: string
                description: >-
                  The state where the license is valid. It is recommended that
                  this is specified as the full name of the state.
              country:
                type: string
                description: >-
                  The country where the license is valid. It is recommended that
                  this is specified as a two-letter ISO country code.
            required:
              - licenseNumber
              - state
              - country
            description: A broker license.
          nullable: true
          description: A list of licenses held by the broker.
        serviceAreas:
          type: array
          items:
            type: object
            properties:
              neighborhood:
                type: string
                nullable: true
                description: The neighborhood served by the broker.
              city:
                type: string
                nullable: true
                description: The city served by the broker.
              county:
                type: string
                nullable: true
                description: The county served by the broker.
              state:
                type: string
                description: >-
                  The state served by the broker. It is recommended that this is
                  specified as the full name of the state.
              country:
                type: string
                description: >-
                  The country served by the broker. It is recommended that this
                  is specified as a two-letter ISO country code.
            required:
              - state
              - country
            description: >-
              A service area served by the broker. The highest service area
              level that needs to be specified is 'state'.
          nullable: true
          description: A list of service areas covered by the broker.
      required:
        - name
        - email
    putBrokerResponseSchema:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
          description: Indicates that the operation has succeeded.
        message:
          type: string
          description: A message providing additional information about the operation.
        venturuBrokerId:
          type: string
          nullable: true
          description: >-
            The Venturu ID of the created or updated broker, if the operation
            was successful.
        venturuProfileUrl:
          type: string
          nullable: true
          description: >-
            A URL to the broker's Venturu profile, if the operation was
            successful.
      required:
        - status
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````