Skip to main content
POST
/
api
/
configs
/
import
Update Configuration
curl --request POST \
  --url https://api.example.com/api/configs/import \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "version": 123,
    "ui": {
      "enable_signup": true,
      "ENABLE_LOGIN_FORM": true,
      "default_locale": "<string>",
      "default_models": "<string>",
      "default_pinned_models": "<string>",
      "model_order_list": [
        {}
      ],
      "prompt_suggestions": [
        {}
      ],
      "banners": [
        {}
      ]
    },
    "auth": {
      "enable_api_keys": true,
      "jwt_expiry": "<string>"
    },
    "oauth": {
      "enable_signup": true,
      "merge_accounts_by_email": true
    },
    "ollama": {
      "enable": true,
      "base_urls": [
        {}
      ],
      "api_configs": {}
    },
    "openai": {
      "enable": true,
      "api_keys": [
        {}
      ],
      "api_base_urls": [
        {}
      ],
      "api_configs": {}
    },
    "models": {
      "base_models_cache": true,
      "default_metadata": {},
      "default_params": {}
    },
    "tool_server": {
      "connections": [
        {}
      ]
    },
    "terminal_server": {
      "connections": [
        {}
      ]
    },
    "direct": {
      "enable": true
    },
    "webui": {
      "url": "<string>"
    },
    "user": {
      "permissions": {}
    },
    "folders": {
      "enable": true,
      "max_file_count": "<string>"
    },
    "channels": {
      "enable": true
    },
    "notes": {
      "enable": true
    },
    "webhook_url": "<string>"
  }
}
'
{
  "version": 123,
  "ui": {},
  "auth": {},
  "oauth": {},
  "ollama": {},
  "openai": {},
  "models": {},
  "tool_server": {},
  "terminal_server": {},
  "direct": {},
  "webui": {},
  "user": {},
  "folders": {},
  "channels": {},
  "notes": {},
  "webhook_url": "<string>"
}
Imports a complete system configuration object, updating all settings atomically. This endpoint allows administrators to restore configurations from backups or apply configuration changes in bulk.

Authentication

Requires admin authentication.

Request Body

config
object
required
Complete configuration object to import. See the response schema from GET /api/configs/export for the full structure.

Response

Returns the updated configuration object in the same format as GET /api/configs/export.
version
integer
Configuration version number
ui
object
UI-related configuration settings (see GET endpoint for full schema)
auth
object
Authentication configuration (see GET endpoint for full schema)
oauth
object
OAuth configuration settings (see GET endpoint for full schema)
ollama
object
Ollama configuration (see GET endpoint for full schema)
openai
object
OpenAI configuration (see GET endpoint for full schema)
models
object
Model configuration (see GET endpoint for full schema)
tool_server
object
Tool server configuration (see GET endpoint for full schema)
terminal_server
object
Terminal server configuration (see GET endpoint for full schema)
direct
object
Direct connection settings (see GET endpoint for full schema)
webui
object
Web UI configuration (see GET endpoint for full schema)
user
object
User configuration (see GET endpoint for full schema)
folders
object
Folder configuration (see GET endpoint for full schema)
channels
object
Channel configuration (see GET endpoint for full schema)
notes
object
Notes configuration (see GET endpoint for full schema)
webhook_url
string
Webhook URL for notifications

Example Request

{
  "config": {
    "version": 0,
    "ui": {
      "enable_signup": false,
      "ENABLE_LOGIN_FORM": true,
      "default_locale": "en-US",
      "default_models": "gpt-4,gpt-3.5-turbo",
      "default_pinned_models": "gpt-4",
      "model_order_list": [],
      "prompt_suggestions": [
        {
          "title": ["Help me study", "vocabulary for a college entrance exam"],
          "content": "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."
        }
      ],
      "default_user_role": "user",
      "default_group_id": "",
      "watermark": "Generated by Open WebUI",
      "enable_community_sharing": true,
      "enable_message_rating": true,
      "enable_user_webhooks": true,
      "banners": [
        {
          "id": "maintenance-notice",
          "type": "info",
          "title": "Scheduled Maintenance",
          "content": "System maintenance scheduled for tonight at 11 PM UTC.",
          "dismissible": true,
          "timestamp": 1709251200
        }
      ]
    },
    "auth": {
      "enable_api_keys": true,
      "api_key": {
        "endpoint_restrictions": true,
        "allowed_endpoints": "/api/chat,/api/completions"
      },
      "jwt_expiry": "2w",
      "admin": {
        "show": true,
        "email": "admin@example.com"
      }
    },
    "ollama": {
      "enable": true,
      "base_urls": ["http://localhost:11434"],
      "api_configs": {}
    },
    "openai": {
      "enable": true,
      "api_keys": ["sk-..."],
      "api_base_urls": ["https://api.openai.com/v1"],
      "api_configs": {}
    },
    "models": {
      "base_models_cache": true,
      "default_metadata": {},
      "default_params": {
        "temperature": 0.7,
        "top_p": 0.9
      }
    },
    "tool_server": {
      "connections": [
        {
          "url": "https://tools.example.com",
          "path": "/openapi.json",
          "type": "openapi",
          "auth_type": "bearer",
          "key": "your-api-key"
        }
      ]
    },
    "direct": {
      "enable": false
    },
    "webui": {
      "url": "https://chat.example.com"
    }
  }
}

Example Response

{
  "version": 0,
  "ui": {
    "enable_signup": false,
    "ENABLE_LOGIN_FORM": true,
    "default_locale": "en-US",
    "default_models": "gpt-4,gpt-3.5-turbo",
    "default_pinned_models": "gpt-4",
    "model_order_list": [],
    "prompt_suggestions": [
      {
        "title": ["Help me study", "vocabulary for a college entrance exam"],
        "content": "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."
      }
    ],
    "default_user_role": "user",
    "default_group_id": "",
    "watermark": "Generated by Open WebUI",
    "enable_community_sharing": true,
    "enable_message_rating": true,
    "enable_user_webhooks": true,
    "banners": [
      {
        "id": "maintenance-notice",
        "type": "info",
        "title": "Scheduled Maintenance",
        "content": "System maintenance scheduled for tonight at 11 PM UTC.",
        "dismissible": true,
        "timestamp": 1709251200
      }
    ]
  },
  "auth": {
    "enable_api_keys": true,
    "api_key": {
      "endpoint_restrictions": true,
      "allowed_endpoints": "/api/chat,/api/completions"
    },
    "jwt_expiry": "2w",
    "admin": {
      "show": true,
      "email": "admin@example.com"
    }
  },
  "ollama": {
    "enable": true,
    "base_urls": ["http://localhost:11434"],
    "api_configs": {}
  },
  "openai": {
    "enable": true,
    "api_keys": ["sk-..."],
    "api_base_urls": ["https://api.openai.com/v1"],
    "api_configs": {}
  },
  "models": {
    "base_models_cache": true,
    "default_metadata": {},
    "default_params": {
      "temperature": 0.7,
      "top_p": 0.9
    }
  },
  "tool_server": {
    "connections": [
      {
        "url": "https://tools.example.com",
        "path": "/openapi.json",
        "type": "openapi",
        "auth_type": "bearer",
        "key": "your-api-key"
      }
    ]
  },
  "direct": {
    "enable": false
  },
  "webui": {
    "url": "https://chat.example.com"
  }
}

Notes

  • This endpoint performs a complete configuration replacement. All existing configuration values will be overwritten.
  • Partial updates are not supported. To update specific settings, retrieve the current configuration with GET /api/configs/export, modify the desired fields, and POST the complete object back.
  • Configuration changes take effect immediately and may affect all users.
  • It’s recommended to back up the current configuration before importing a new one.
  • Some configuration changes may require a server restart to take full effect.