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

# Settings Update

> Endpoint to update user-specific settings.

Compares the provided settings with existing stored settings for the authenticated user.
If changes are detected, the settings are updated accordingly. If no settings exist,
a new settings record is created for the user.

Args:
    payload (Settings): A `Settings` object containing updated user preferences or values.

Returns:
    dict: A confirmation message indicating whether the settings were updated or skipped.

Raises:
    HTTPException 500: If a runtime error occurs during update.



## OpenAPI

````yaml post /api/user/settings/update
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/user/settings/update:
    post:
      tags:
        - User
      summary: Settings Update
      description: >-
        Endpoint to update user-specific settings.


        Compares the provided settings with existing stored settings for the
        authenticated user.

        If changes are detected, the settings are updated accordingly. If no
        settings exist,

        a new settings record is created for the user.


        Args:
            payload (Settings): A `Settings` object containing updated user preferences or values.

        Returns:
            dict: A confirmation message indicating whether the settings were updated or skipped.

        Raises:
            HTTPException 500: If a runtime error occurs during update.
      operationId: settings_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Settings'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    Settings:
      properties:
        conversation_starters:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConversationStarter'
              type: array
            - type: 'null'
          title: Conversation Starters
          description: conversational starters.
        dark_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Dark Mode
          description: User dark mode information.
        personal_context:
          anyOf:
            - $ref: '#/components/schemas/PersonalContext'
            - type: 'null'
          description: User personal context information.
        enable_follow_up_suggestions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable Follow Up Suggestions
          description: >-
            When true, show follow-up suggestion chips after assistant
            responses. Defaults to disabled when unset.
        prompt_presets:
          anyOf:
            - items:
                $ref: '#/components/schemas/PromptPreset'
              type: array
            - type: 'null'
          title: Prompt Presets
          description: Personal prompt presets (name, prompt text, optional agent).
      type: object
      title: Settings
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConversationStarter:
      properties:
        name:
          type: string
          title: Name
          description: Conversation name.
        action:
          items:
            $ref: '#/components/schemas/ConversationAction'
          type: array
          title: Action
      type: object
      required:
        - name
        - action
      title: ConversationStarter
    PersonalContext:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Name
        position:
          anyOf:
            - type: string
            - type: 'null'
          title: Position
          description: Position
        traits:
          anyOf:
            - type: string
            - type: 'null'
          title: Traits
          description: Traits
        additional_personalization:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Additional Personalization
          description: Additional personalization
      type: object
      required:
        - name
        - position
        - traits
        - additional_personalization
      title: PersonalContext
    PromptPreset:
      properties:
        id:
          type: string
          title: Id
          description: Unique preset id.
        name:
          type: string
          title: Name
          description: Display name for the preset.
        prompt:
          type: string
          title: Prompt
          description: Prompt text to insert into chat.
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
          description: Optional agent id to attach when applying the preset.
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
          description: Optional agent display name for the UI.
      type: object
      required:
        - id
        - name
        - prompt
      title: PromptPreset
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConversationAction:
      properties:
        api_name:
          type: string
          title: Api Name
          description: Name of the API.
        domain_url:
          type: string
          title: Domain Url
          description: API domain url.
        user_input:
          type: string
          title: User Input
          description: User input data.
      type: object
      required:
        - api_name
        - domain_url
        - user_input
      title: ConversationAction
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````