> ## 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.

# Org Settings Update



## OpenAPI

````yaml post /api/org/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/org/settings/update:
    post:
      tags:
        - Org
      summary: Org Settings Update
      operationId: org_settings_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgSettings'
        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:
    OrgSettings:
      properties:
        proxy_server_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Proxy Server Url
        model_registry:
          anyOf:
            - $ref: '#/components/schemas/ModelRegistry'
            - type: 'null'
        product_visual_settings:
          anyOf:
            - $ref: '#/components/schemas/ProductVisualSettings'
            - type: 'null'
        webhook_config:
          anyOf:
            - $ref: '#/components/schemas/WebhookConfig'
            - type: 'null'
        interaction_cache:
          anyOf:
            - $ref: '#/components/schemas/InteractionCacheSettings'
            - type: 'null'
          description: Interaction caching configuration
        interaction_recording:
          anyOf:
            - $ref: '#/components/schemas/InteractionRecordingSettings'
            - type: 'null'
          description: >-
            Controls what request/response data is persisted for OpenAPI and MCP
            interactions
        workflow_recording:
          anyOf:
            - $ref: '#/components/schemas/WorkflowRecordingSettings'
            - type: 'null'
          description: Controls what workflow run history data is persisted
        response_size_control:
          anyOf:
            - $ref: '#/components/schemas/ResponseSizeControlSettings'
            - type: 'null'
          description: Response size control configuration for managing large API responses
        json_compression:
          anyOf:
            - $ref: '#/components/schemas/JsonCompressionSettings'
            - type: 'null'
          description: JSON compression configuration for reducing response payload sizes
        pii_sanitization:
          anyOf:
            - $ref: '#/components/schemas/PiiSanitizationSettings'
            - type: 'null'
          description: >-
            PII sanitization configuration for masking sensitive information in
            API responses
        mock_execution:
          anyOf:
            - $ref: '#/components/schemas/MockExecutionSettings'
            - type: 'null'
          description: >-
            Mock execution mode — return OpenAPI-based mock responses instead of
            calling real APIs
        reasoning_effort:
          anyOf:
            - type: string
              enum:
                - none
                - low
                - medium
                - high
            - type: 'null'
          title: Reasoning Effort
          description: >-
            Portable model reasoning effort for Copilot chat across providers.
            None disables forced reasoning; low/medium/high map to each
            provider's native thinking controls. When unset, Copilot defaults to
            medium.
      type: object
      title: OrgSettings
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModelRegistry:
      properties:
        selected:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected
          description: The ID of the selected model
        available_models:
          items:
            $ref: '#/components/schemas/ModelConfig'
          type: array
          title: Available Models
      type: object
      title: ModelRegistry
    ProductVisualSettings:
      properties:
        sidebar_icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Sidebar Icon
          description: The icon of that will be displayed in the sidebar
        product_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Name
          description: The name of the product
        copilot_icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Copilot Icon
          description: The icon of that will be displayed in the copilot
        copilot_welcome_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Copilot Welcome Text
          description: The welcome text for the copilot
        copilot_welcome_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Copilot Welcome Image
          description: The welcome image for the copilot
      type: object
      title: ProductVisualSettings
    WebhookConfig:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: The webhook URL where the request will be sent
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
          description: Additional headers to include in the webhook request
        connect_timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Connect Timeout
          description: Connect Timeout in seconds for the webhook request
          default: 30
        read_timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Read Timeout
          description: Read Timeout in seconds for the webhook request
          default: 30
        retry_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry Count
          description: Number of retry attempts if webhook fails
          default: 2
        retry_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry Delay
          description: Delay in seconds between retry attempts
          default: 5
      type: object
      title: WebhookConfig
      description: Configuration for webhook execution
    InteractionCacheSettings:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether interaction caching is enabled
          default: false
        ttl_sec:
          type: integer
          title: Ttl Sec
          description: Cache TTL in seconds
          default: 3600
        operation_type:
          type: string
          title: Operation Type
          description: 'Which operation types to cache: ''get'', ''post'', or ''both'''
          default: both
      type: object
      title: InteractionCacheSettings
    InteractionRecordingSettings:
      properties:
        mode:
          type: string
          enum:
            - full
            - headers_only
            - none
          title: Mode
          description: >-
            Controls what OpenAPI and MCP interaction data is persisted: full
            (request/response bodies), headers_only (headers and sizes only), or
            none (no interaction records).
          default: full
      type: object
      title: InteractionRecordingSettings
    WorkflowRecordingSettings:
      properties:
        mode:
          type: string
          enum:
            - full
            - headers_only
            - none
          title: Mode
          description: >-
            Controls what workflow run history is persisted: full (inputs, all
            step traces, result), headers_only (metadata and sizes only), or
            none (no history except HITL approval checkpoints required for
            resume).
          default: full
      type: object
      title: WorkflowRecordingSettings
    ResponseSizeControlSettings:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Whether response size control is enabled. When disabled, no size
            checks are performed.
          default: false
        max_size_bytes:
          type: integer
          exclusiveMinimum: 0
          title: Max Size Bytes
          description: 'Maximum allowed response size in bytes (default: 100,000 bytes)'
          default: 100000
        handling_mode:
          type: string
          pattern: ^(alert_only|auto_truncate|signal_agent)$
          title: Handling Mode
          description: >-
            How to handle oversized responses: 'alert_only' (log only),
            'auto_truncate' (truncate response), or 'signal_agent' (return 413
            with projection hints)
          default: auto_truncate
      type: object
      title: ResponseSizeControlSettings
    JsonCompressionSettings:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Whether JSON compression is enabled. When enabled, large JSON
            responses are compacted to reduce size.
          default: false
        min_compression_ratio:
          type: number
          maximum: 100
          minimum: 0
          title: Min Compression Ratio
          description: >-
            Minimum compression ratio (in %) required to apply compression. If
            compression doesn't achieve this ratio, the original response is
            returned.
          default: 5
        mode:
          type: string
          title: Mode
          description: >-
            Compression mode: 'toon' for TOON format (optimized for LLM token
            efficiency) or 'json-compact' for tabular JSON compression.
          default: json-compact
      type: object
      title: JsonCompressionSettings
    PiiSanitizationSettings:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Whether PII sanitization is enabled. When enabled, sensitive
            information is automatically masked in API responses.
          default: false
        patterns:
          additionalProperties:
            $ref: '#/components/schemas/EntityPattern'
          type: object
          title: Patterns
          description: >-
            Unified dictionary of entity patterns. Key is entity name (e.g.,
            'EMAIL_ADDRESS'), value contains pattern, replacement, description,
            and whether it's built-in.
      type: object
      title: PiiSanitizationSettings
    MockExecutionSettings:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: >-
            When enabled, API calls return mock responses from OpenAPI spec
            examples instead of calling real APIs.
          default: false
        use_llm_fallback:
          type: boolean
          title: Use Llm Fallback
          description: >-
            When enabled, use an LLM to generate mock responses before schema
            placeholders. Falls back to schema/description if the LLM call
            fails. Disabled by default for faster mock responses.
          default: false
      type: object
      title: MockExecutionSettings
    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
    ModelConfig:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the model entry
        provider:
          type: string
          title: Provider
          description: Provider name, e.g., openai, anthropic, bedrock, azure
        apiKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Apikey
          description: >-
            API key for authentication. Required for azure; not used for
            bedrock.
        baseURL:
          anyOf:
            - type: string
            - type: 'null'
          title: Baseurl
          description: >-
            Base URL for API calls. Required for azure (deployments endpoint
            prefix).
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: >-
            Model name or ID. For azure manual mode: Azure OpenAI deployment
            name.
        modelVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelversion
          description: >-
            Version or variant of the model. For azure manual mode: Azure
            api-version.
        modelSettings:
          additionalProperties:
            anyOf:
              - type: number
              - type: 'null'
          type: object
          title: Modelsettings
          description: Configuration for inference (e.g., maxTokens, temperature)
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
        queryParams:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Queryparams
        providerSpecificOptions:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Providerspecificoptions
          description: >-
            Provider-specific configuration. bedrock: region plus either
            bedrock_api_key (API key auth) or
            aws_access_key_id/aws_secret_access_key (IAM auth), optional
            aws_session_token. azure auto-discover: tenantId, clientId,
            clientSecret, subscriptionId, resourceGroupName, accountName,
            optional defaultApiVersion. azure manual: optional uiName.
      type: object
      required:
        - id
        - provider
      title: ModelConfig
    EntityPattern:
      properties:
        pattern:
          type: string
          title: Pattern
          description: Regex pattern to match
        replacement:
          type: string
          title: Replacement
          description: Replacement text (e.g., '<EMAIL_ADDRESS>')
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of what this pattern detects
        builtin:
          type: boolean
          title: Builtin
          description: >-
            Whether this is a Presidio built-in entity (read-only pattern) or
            custom
          default: false
        enabled:
          type: boolean
          title: Enabled
          description: Whether this entity detection is enabled
          default: true
      type: object
      required:
        - pattern
        - replacement
      title: EntityPattern
      description: Unified pattern definition for PII entities (built-in or custom).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````