> ## 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 Freshchat settings

> Change the Freshchat AI agent, conversation intake, or handoff routing, or pause the integration. Omitted fields keep their value.



## OpenAPI

````yaml patch /integrations/freshchat/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/freshchat/settings:
    patch:
      summary: Update Freshchat settings
      description: >-
        Partially update the Freshchat integration settings; omitted fields keep
        their value. Credentials cannot be changed here. assign_to_agent needs
        handoff_agent_email (different from default_agent_email),
        assign_to_group needs handoff_group_id — else 400. Answers 404 when
        Freshchat is not connected.
      operationId: updateFreshchatSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                default_agent_email:
                  type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                enabled:
                  type: boolean
                auto_handle_all_incoming_chats:
                  type: boolean
                handoff_behavior:
                  type: string
                  enum:
                    - unassign
                    - freshchat_automation
                    - assign_to_agent
                    - assign_to_group
                  description: >-
                    Where a conversation goes when the AI hands off: unassign
                    (back to the queue), freshchat_automation (leave it to
                    Freshchat assignment rules), assign_to_agent
                    (handoff_agent_email), assign_to_group (handoff_group_id)
                handoff_agent_email:
                  anyOf:
                    - type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    - type: 'null'
                handoff_group_id:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                handoff_marker_property_name:
                  type: string
                  minLength: 1
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FreshchatSettingsEnvelopeDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    FreshchatSettingsEnvelopeDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/FreshchatSettingsEnvelopeDto'
      type: object
      properties:
        connected:
          type: boolean
          description: Whether Freshchat is connected for the organization
        settings:
          anyOf:
            - $ref: '#/components/schemas/FreshchatPublicSettingsDto'
            - type: 'null'
      required:
        - connected
        - settings
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
    FreshchatPublicSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/FreshchatPublicSettingsDto'
      type: object
      properties:
        domain:
          type: string
          description: Freshchat domain
        enabled:
          type: boolean
          description: Whether the integration is enabled
        default_agent_email:
          type: string
          description: >-
            Freshchat agent the AI acts as: conversations assigned to it are
            handled by the AI
        auto_handle_all_incoming_chats:
          type: boolean
          description: >-
            Handle every incoming conversation, not only the ones assigned to
            the AI agent
        handoff_behavior:
          type: string
          enum:
            - unassign
            - freshchat_automation
            - assign_to_agent
            - assign_to_group
          description: >-
            Where a conversation goes when the AI hands off: unassign (back to
            the queue), freshchat_automation (leave it to Freshchat assignment
            rules), assign_to_agent (handoff_agent_email), assign_to_group
            (handoff_group_id)
        handoff_agent_email:
          anyOf:
            - type: string
            - type: 'null'
          description: Agent that receives handoffs
        handoff_group_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Group that receives handoffs
        handoff_marker_property_name:
          type: string
          description: Custom conversation property set to true on handoff
      required:
        - domain
        - enabled
        - default_agent_email
        - auto_handle_all_incoming_chats
        - handoff_behavior
        - handoff_agent_email
        - handoff_group_id
        - handoff_marker_property_name
      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.