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

# Update institution settings

> Updates the current user's institution configuration. No admin privilege check is enforced -- any authenticated user with an active institution can call this endpoint, though some properties (such as `creditCaps`) require the institutions.edit entitlement and are silently dropped otherwise. Admins/managers may set `creditCaps` (per-user quotas) on their institution when the account has not enabled caps; when the account owns caps `creditCaps` is ignored (read-only inherited). The request body is validated against the institution authorized properties list (conversationModel, maxCompletionTokens, reasoningEffort, extendedContext, about, personaMode, personalisationAsked, disableToolUseInstructions, kmeanScore, ragLimitChunks, toolsDisabled, compactHistory, displayThinkingDetails, displayAgentDetails, displayRagSearchDetails, displayThinkingExecution, displayToolExecution, enableModeration, alwaysCiteSources, toolResultsMaxChars, rtEnabled, rtAdminOnly, rtTextInputEnabled, rtModel, rtVoice, gemini_rt_voice, xai_rt_voice, rtVADEagerness, rtNoiseReduction, rtTranscriptionLanguage, disableFileUploadForUser, disableAudioNotesForUser, disableClipboardForUser, locationEnabled, guestUI, theme, picture, ainame, assistantsDisabled). Any properties not in this list are rejected with a 400.




## OpenAPI

````yaml /mdx/api-reference/runtime/runtime-api.json put /api/user/institution
openapi: 3.0.0
info:
  title: Pria Runtime API
  version: 2.0.1
  description: >-
    Pria API Documentation Praxis's developer platform is a core part of our
    mission to empower organizations to grow better. Our APIs are designed to
    enable teams of any shape or size to build robust integrations that help
    them customize and get the most value out of Pria. All Pria APIs are built
    using REST conventions and designed to have a predictable URL structure.
    <br/>  <br/>They use many standard HTTP features, including methods (POST,
    GET, PUT, DELETE) and error response codes.  <br/> <br/>All API calls are
    made under https://hiimpria.ai/api and all responses return standard JSON.
    In these docs, you'll find lists of all available endpoints for a given API,
    along with interactive code blocks for building requests. For walkthroughs
    of basic usage for these APIs, check out the API guides.
servers:
  - url: https://pria.praxislxp.com
    description: Pria API Server
security: []
tags:
  - name: Authentication
    description: User authentication, registration, and password management (/api/auth)
  - name: OAuth
    description: OAuth authentication providers - Google, GitHub, SSO (/api/auth/oauth)
  - name: User
    description: User profile management and account operations (/api/user)
  - name: User Institutions
    description: User institution memberships and switching (/api/user/institution)
  - name: User Tools
    description: Available tools for authenticated users (/api/user/tools)
  - name: Institutions
    description: Institution settings and configuration (/api/user/institution)
  - name: Conversation
    description: AI conversation and Q&A endpoints (/api/ai)
  - name: Realtime
    description: Real-time voice AI and WebRTC sessions (/api/ai/rt)
  - name: Assistant
    description: AI assistant configuration and management (/api/user/assistant)
  - name: History
    description: Conversation history and favorites (/api/user/history)
  - name: RAG
    description: >-
      Document upload, embedding, and retrieval-augmented generation
      (/api/user/files, /api/user/rag)
  - name: Setting
    description: Instance variables and settings management (/api/user/setting)
  - name: Branding
    description: Digital twin branding and customization (/api/agent/branding)
  - name: Agent
    description: Agent engagement and session management (/api/agent)
  - name: SDK Launch
    description: >-
      SDK launch token signing and verification for secure iframe embedding
      (/api/auth/sdk-sign, /api/auth/sdk-verify)
  - name: Testing
    description: Health checks, diagnostics, and test endpoints (/api/test)
  - name: Admin Accounts
    description: Account management for super admins (/api/admin/account)
  - name: Admin Institutions
    description: Institution management for admins (/api/admin/institution)
  - name: Admin Users
    description: User management for admins (/api/admin/user)
  - name: Admin Entitlements
    description: >-
      User-institution relationships and permissions
      (/api/admin/userInstitution)
  - name: Admin Sessions
    description: Session management for admins (/api/admin/session)
  - name: Admin Histories
    description: Conversation history management and analytics (/api/admin/history)
  - name: Admin Assistants
    description: AI assistant management for admins (/api/admin/assistant)
  - name: Admin Questions
    description: Institution question and prompt management (/api/admin/question)
  - name: Admin Tools
    description: Tool configuration management (/api/admin/tool)
  - name: Admin AI Models
    description: AI model configuration (/api/admin/aimodel)
  - name: Admin MCP Servers
    description: Model Context Protocol server management (/api/admin/mcpserver)
  - name: Admin Feedbacks
    description: User feedback management (/api/admin/feedback)
  - name: Admin Uploads
    description: Upload management (/api/admin/upload)
  - name: Admin Charts
    description: Analytics and visualization chart management (/api/admin/chart)
  - name: Audio Notes
    description: Capture and ingest spoken notes into the personal vault
  - name: Memory
    description: User-facing memory parameters (personal + shared instance memory).
  - name: My Data
    description: >-
      GDPR controls — personal-scope counts, async ZIP-by-email export, and
      scoped soft-delete. Every endpoint pins `user = req.user._id` AND
      `institution: null`; institution-scoped data is governed by the
      institution's own retention policy and never reached from here.
  - name: Questions
    description: >-
      User-facing read of the onboarding question bank used by the "create a
      digital twin" wizard.
  - name: Transcription
    description: >-
      One-shot speech-to-text for in-place dictation. Audio blob in, transcript
      out — no Upload / History / RAG embeddings are persisted. Use
      `/audio-notes` for anything durable.
paths:
  /api/user/institution:
    put:
      tags:
        - Institutions
      summary: Update institution settings
      description: >
        Updates the current user's institution configuration. No admin privilege
        check is enforced -- any authenticated user with an active institution
        can call this endpoint, though some properties (such as `creditCaps`)
        require the institutions.edit entitlement and are silently dropped
        otherwise. Admins/managers may set `creditCaps` (per-user quotas) on
        their institution when the account has not enabled caps; when the
        account owns caps `creditCaps` is ignored (read-only inherited). The
        request body is validated against the institution authorized properties
        list (conversationModel, maxCompletionTokens, reasoningEffort,
        extendedContext, about, personaMode, personalisationAsked,
        disableToolUseInstructions, kmeanScore, ragLimitChunks, toolsDisabled,
        compactHistory, displayThinkingDetails, displayAgentDetails,
        displayRagSearchDetails, displayThinkingExecution, displayToolExecution,
        enableModeration, alwaysCiteSources, toolResultsMaxChars, rtEnabled,
        rtAdminOnly, rtTextInputEnabled, rtModel, rtVoice, gemini_rt_voice,
        xai_rt_voice, rtVADEagerness, rtNoiseReduction, rtTranscriptionLanguage,
        disableFileUploadForUser, disableAudioNotesForUser,
        disableClipboardForUser, locationEnabled, guestUI, theme, picture,
        ainame, assistantsDisabled). Any properties not in this list are
        rejected with a 400.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Any combination of authorized institution properties
              properties:
                conversationModel:
                  type: string
                  description: Default conversation model for the institution
                maxCompletionTokens:
                  type: integer
                  description: Maximum completion tokens for AI responses
                reasoningEffort:
                  type: string
                  description: Reasoning effort level (none, low, medium, high, max)
                extendedContext:
                  type: boolean
                  description: Whether extended context is enabled
                about:
                  type: string
                  description: About text for the institution
                personaMode:
                  type: boolean
                  description: >-
                    Persona twin toggle (admin-gated — requires the
                    institutions.edit entitlement, silently stripped otherwise).
                    When true the platform prompt becomes persona-aware —
                    capability and onboarding questions are answered in the
                    twin's own voice, without tool lists or platform guides.
                personalisationAsked:
                  type: boolean
                  description: Whether personalisation has been asked
                disableToolUseInstructions:
                  type: boolean
                  description: Whether to disable tool use instructions
                kmeanScore:
                  type: number
                  description: K-means score threshold for RAG
                ragLimitChunks:
                  type: integer
                  description: Maximum number of RAG chunks to retrieve
                toolsDisabled:
                  type: boolean
                  description: Whether tools are disabled for AI conversations
                enableModeration:
                  type: boolean
                  description: >-
                    Route incoming prompts through the moderation model before
                    they reach the main LLM
                alwaysCiteSources:
                  type: boolean
                  description: >-
                    Add an explicit citation directive to the system prompt so
                    the model footnotes RAG / web sources in its answers
                toolResultsMaxChars:
                  type: integer
                  description: >-
                    Character cap for individual tool / scrape / vault results
                    before they are trimmed and saved to the IP Vault. Default
                    60000.
                  minimum: 1000
                  maximum: 200000
                rtEnabled:
                  type: boolean
                  description: >-
                    Enable Convo / Speech-to-Speech (realtime voice) mode for
                    this instance
                rtAdminOnly:
                  type: boolean
                  description: Restrict Convo mode to admin users only
                rtTextInputEnabled:
                  type: boolean
                  description: Allow text input alongside speech while in Convo mode
                rtModel:
                  type: string
                  description: >-
                    System model id for Convo / Speech-to-Speech (provider
                    auto-derived from the model id)
                rtVoice:
                  type: string
                  description: >-
                    OpenAI Realtime voice (alloy, ash, ballad, coral, echo,
                    sage, shimmer, verse, cedar, marin)
                gemini_rt_voice:
                  type: string
                  description: Gemini Live voice (Puck, Charon, Kore, etc.)
                xai_rt_voice:
                  type: string
                  description: xAI realtime voice (eve, ara, rex, sal, leo)
                rtVADEagerness:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                  description: OpenAI realtime voice-activity-detection eagerness
                rtNoiseReduction:
                  type: string
                  enum:
                    - ''
                    - near_field
                    - far_field
                  description: OpenAI realtime noise reduction profile
                rtTranscriptionLanguage:
                  type: string
                  description: >-
                    ISO 639-1 language hint for OpenAI realtime transcription
                    (blank = auto-detect)
                disableClipboardForUser:
                  type: boolean
                  description: >-
                    Hide clipboard controls from non-admin users in this
                    institution
                locationEnabled:
                  type: boolean
                  description: >-
                    Allow this institution's users to opt-in to sharing browser
                    geolocation with the assistant for location-aware answers.
                    Defaults to true.
                guestUI:
                  type: boolean
                  description: >-
                    Strip the UI down to a chat-only minimum surface for
                    non-admin users
                theme:
                  type: string
                  description: >-
                    Forced UI theme for all users in this institution. '' = user
                    directed, 'dark' = force dark mode, 'light' = force light
                    mode
                  enum:
                    - ''
                    - dark
                    - light
                creditCaps:
                  allOf:
                    - $ref: '#/components/schemas/InstitutionCreditCaps'
                  description: >-
                    Per-user quota configuration. Settable by admins/managers
                    with the institutions.edit entitlement when the account has
                    not enabled caps; ignored (read-only inherited) when the
                    account owns caps.
      responses:
        '200':
          description: Institution updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Institution updated!
        '400':
          description: >-
            Bad request - empty body, user has no institution, unauthorized
            properties, or generic error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    description: >-
                      One of: 'Invalid properties', 'Select an institution!',
                      'Unauthorized properties detected: ...', or 'Error'
        '401':
          description: Unauthorized - user not found or account deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Authentication Required
        '404':
          description: >-
            Institution not found - institution ID on user does not match any
            record
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Institution not found!
      security:
        - apiKeyAuth: []
components:
  schemas:
    InstitutionCreditCaps:
      type: object
      description: >-
        Per-institution user-quota configuration. Admins with the
        institutions.edit entitlement may set these when the account has not
        enabled caps; when the account owns caps the institution inherits them
        read-only.
      properties:
        enabled:
          type: boolean
          default: false
          description: >-
            When true and the account has not enabled caps, per-user quotas are
            enforced for this institution's members.
        perUserInstitution:
          type: number
          nullable: true
          description: >-
            Maximum lifetime credits a user may consume in this institution.
            Null or 0 = no cap.
        perUser24h:
          type: number
          nullable: true
          description: >-
            Maximum credits a user may consume in any rolling 24-hour window.
            Null or 0 = no cap. Auto-recovers.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: JWT token passed in x-access-token header

````