> ## 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 your CSAT settings — customize the feedback-page and request-email templates. Omitted keys are preserved; null clears a template back to the default design.

# Update CSAT settings



## OpenAPI

````yaml patch /csat/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:
  /csat/settings:
    patch:
      summary: Update CSAT settings
      description: >-
        Partially update the CSAT settings for your organization. Omitted keys
        are preserved; sending an explicit null (or a whitespace-only string)
        for a template field clears it back to the default OpenCX design. The
        web template must include a submit affordance (data-csat-score,
        data-csat-submit, or OpenCX.csat.submit(...)) and the email template
        must reference at least one rating link variable
        ({{score_link_1}}–{{score_link_5}} or {{csat_link}}), otherwise the
        request is rejected with 400.
      operationId: updateCsatSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCsatSettingsDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CsatSettingsResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    UpdateCsatSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/UpdateCsatSettingsDtoInput'
      type: object
      properties:
        web_enabled:
          description: Whether CSAT collection is enabled for web channel
          type: boolean
        email_enabled:
          description: Whether CSAT collection is enabled for email channel
          type: boolean
        phone_enabled:
          description: Whether CSAT collection is enabled for phone channel
          type: boolean
        whatsapp_enabled:
          description: Whether CSAT collection is enabled for WhatsApp channel
          type: boolean
        sms_enabled:
          description: Whether CSAT collection is enabled for SMS channel
          type: boolean
        slack_enabled:
          description: Whether CSAT collection is enabled for Slack channel
          type: boolean
        api_enabled:
          description: Whether CSAT collection is enabled for API channel
          type: boolean
        web_voice_enabled:
          description: Whether CSAT collection is enabled for web voice channel
          type: boolean
        instagram_enabled:
          description: Whether CSAT collection is enabled for Instagram channel
          type: boolean
        messenger_enabled:
          description: Whether CSAT collection is enabled for Facebook Messenger channel
          type: boolean
        custom_message:
          description: Custom message to display with CSAT request
          type: string
        auto_send_on_close:
          description: Whether to automatically send CSAT after session closes
          type: boolean
        send_delay_minutes:
          description: Delay in minutes before sending CSAT after session closes
          type: number
        resend_policy:
          description: >-
            How often the same session may be surveyed: once_per_session
            (default, one survey ever), once_per_close (one per closure, so a
            reopened session can be surveyed again), once_until_answered (re-ask
            after resend_after_days until the customer scores it), or always
            (survey every close, even one the customer already rated)
          type: string
          enum:
            - always
            - once_per_close
            - once_per_session
            - once_until_answered
        resend_after_days:
          description: >-
            Days to wait before re-asking an unanswered survey. Only used when
            resend_policy is once_until_answered
          type: integer
          minimum: 1
          maximum: 9007199254740991
        rescore_window_hours:
          description: >-
            How long (hours, from the first submit) a customer may change their
            score. Null = unlimited re-rating, 0 = locked as soon as the first
            score lands. Staff submits are always exempt
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - type: 'null'
        channel_config:
          description: >-
            Per-channel overrides keyed by channel (e.g. { "whatsapp": {
            "rating_style": "emoji" } }). Replaces the whole map, so send the
            channels you want to keep
          type: object
          propertyNames:
            $ref: '#/components/schemas/SessionChannel'
          additionalProperties:
            type: object
            properties:
              rating_style:
                description: >-
                  How the 1-5 scale is drawn on channels that render it
                  in-conversation
                type: string
                enum:
                  - stars
                  - emoji
                  - numbers
              rating_order:
                description: >-
                  Whether the scale is listed best-first (desc, default) or
                  worst-first (asc)
                type: string
                enum:
                  - desc
                  - asc
              custom_message:
                description: >-
                  Survey question for this channel. Falls back to the org-wide
                  custom_message
                type: string
        web_template_html:
          description: >-
            Full-HTML template for the public CSAT feedback page. Null/empty
            clears it (default page).
          anyOf:
            - type: string
            - type: 'null'
        email_template_html:
          description: >-
            Full-HTML template for the CSAT request email. Null/empty clears it
            (default email).
          anyOf:
            - type: string
            - type: 'null'
        email_template_subject:
          description: >-
            Subject line for the custom CSAT request email. Null falls back to
            the default.
          anyOf:
            - type: string
            - type: 'null'
    CsatSettingsResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/CsatSettingsResponseDto'
      type: object
      properties:
        organization_id:
          type: string
          description: The ID of the organization
        web_enabled:
          description: Whether CSAT collection is enabled for web channel
          type: boolean
        email_enabled:
          description: Whether CSAT collection is enabled for email channel
          type: boolean
        phone_enabled:
          description: Whether CSAT collection is enabled for phone channel
          type: boolean
        whatsapp_enabled:
          description: Whether CSAT collection is enabled for WhatsApp channel
          type: boolean
        sms_enabled:
          description: Whether CSAT collection is enabled for SMS channel
          type: boolean
        slack_enabled:
          description: Whether CSAT collection is enabled for Slack channel
          type: boolean
        api_enabled:
          description: Whether CSAT collection is enabled for API channel
          type: boolean
        web_voice_enabled:
          description: Whether CSAT collection is enabled for web voice channel
          type: boolean
        instagram_enabled:
          description: Whether CSAT collection is enabled for Instagram channel
          type: boolean
        messenger_enabled:
          description: Whether CSAT collection is enabled for Facebook Messenger channel
          type: boolean
        custom_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Custom message to display with CSAT request
        auto_send_on_close:
          description: Whether to automatically send CSAT after session closes
          type: boolean
        send_delay_minutes:
          description: Delay in minutes before sending CSAT after session closes
          type: number
        resend_policy:
          type: string
          enum:
            - always
            - once_per_close
            - once_per_session
            - once_until_answered
          description: >-
            How often the same session may be surveyed: once_per_session,
            once_per_close, once_until_answered, or always
        resend_after_days:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: >-
            Days to wait before re-asking an unanswered survey (only used when
            resend_policy is once_until_answered)
        rescore_window_hours:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - type: 'null'
          description: >-
            How long (hours, from the first submit) a customer may change their
            score (null = unlimited, 0 = locked immediately)
        channel_config:
          type: object
          propertyNames:
            $ref: '#/components/schemas/SessionChannel'
          additionalProperties:
            type: object
            properties:
              rating_style:
                description: >-
                  How the 1-5 scale is drawn on channels that render it
                  in-conversation
                type: string
                enum:
                  - stars
                  - emoji
                  - numbers
              rating_order:
                description: >-
                  Whether the scale is listed best-first (desc, default) or
                  worst-first (asc)
                type: string
                enum:
                  - desc
                  - asc
              custom_message:
                description: >-
                  Survey question for this channel. Falls back to the org-wide
                  custom_message
                type: string
            additionalProperties: false
          description: >-
            Per-channel overrides keyed by channel; an absent channel inherits
            the org-wide settings
        web_template_html:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Full-HTML template for the public CSAT feedback page (null = default
            page)
        email_template_html:
          anyOf:
            - type: string
            - type: 'null'
          description: Full-HTML template for the CSAT request email (null = default email)
        email_template_subject:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Subject line for the custom CSAT request email (null = default
            subject)
        created_at:
          description: When the settings were created
          type: string
          format: date-time
        updated_at:
          description: When the settings were last updated
          type: string
          format: date-time
      required:
        - organization_id
        - web_enabled
        - email_enabled
        - phone_enabled
        - whatsapp_enabled
        - sms_enabled
        - slack_enabled
        - api_enabled
        - web_voice_enabled
        - instagram_enabled
        - messenger_enabled
        - custom_message
        - auto_send_on_close
        - send_delay_minutes
        - resend_policy
        - resend_after_days
        - rescore_window_hours
        - channel_config
        - web_template_html
        - email_template_html
        - email_template_subject
        - created_at
        - updated_at
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````