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

# Update HubSpot integration settings

> Change the HubSpot AI user, handoff assignment, reply-all, close stage, or handoff comment. Omitted fields keep their value.



## OpenAPI

````yaml patch /integrations/hubspot/settings
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /integrations/hubspot/settings:
    patch:
      summary: Update HubSpot integration settings
      description: >-
        Partially update the HubSpot integration settings; omitted fields stay
        unchanged. `handoff_user_id` is required with `handoff_assignment_type:
        assign_to_user` and cleared for the other types. Changing
        `default_user_id` moves the conversations the AI currently owns to the
        new user. 404 when HubSpot is not connected.
      operationId: updateHubspotIntegrationSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHubspotPublicSettingsDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubspotPublicSettingsResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    UpdateHubspotPublicSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/UpdateHubspotPublicSettingsDtoInput'
      type: object
      properties:
        default_user_id:
          description: HubSpot user id the AI acts as
          type: string
          minLength: 1
        handoff_assignment_type:
          type: string
          enum:
            - unassigned
            - assign_to_user
            - leave_unchanged
          description: >-
            After handoff: unassigned = clear the owner, assign_to_user = assign
            to handoff_user_id, leave_unchanged = keep the current owner
        handoff_user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            HubSpot user id handed-off conversations go to when
            handoff_assignment_type is assign_to_user
        ai_reply_to_all_enabled:
          type: boolean
          description: >-
            true = AI email replies go to every recipient on the thread
            (reply-all), not just the sender
        close_ticket_stage_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            HubSpot ticket pipeline stage id used when a session is closed; null
            = the pipeline default closed stage
        post_handoff_note:
          type: boolean
          description: >-
            true = a handoff posts a summary comment on the HubSpot
            conversation/ticket
    HubspotPublicSettingsResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/HubspotPublicSettingsResponseDto'
      type: object
      properties:
        connected:
          type: boolean
          description: false = HubSpot is not connected; settings is null
        settings:
          anyOf:
            - $ref: '#/components/schemas/HubspotPublicSettingsDto'
            - type: 'null'
      required:
        - connected
        - settings
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
    HubspotPublicSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/HubspotPublicSettingsDto'
      type: object
      properties:
        default_user_id:
          type: string
          description: >-
            HubSpot user id the AI acts as (its seat); conversations it owns are
            assigned to this user
        handoff_assignment_type:
          type: string
          enum:
            - unassigned
            - assign_to_user
            - leave_unchanged
          description: >-
            After handoff: unassigned = clear the owner, assign_to_user = assign
            to handoff_user_id, leave_unchanged = keep the current owner
        handoff_user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            HubSpot user id handed-off conversations go to when
            handoff_assignment_type is assign_to_user
        ai_reply_to_all_enabled:
          type: boolean
          description: >-
            true = AI email replies go to every recipient on the thread
            (reply-all), not just the sender
        close_ticket_stage_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            HubSpot ticket pipeline stage id used when a session is closed; null
            = the pipeline default closed stage
        post_handoff_note:
          type: boolean
          description: >-
            true = a handoff posts a summary comment on the HubSpot
            conversation/ticket
      required:
        - default_user_id
        - handoff_assignment_type
        - handoff_user_id
        - ai_reply_to_all_enabled
        - close_ticket_stage_id
        - post_handoff_note
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.