Config API
Manage per-user agent configuration with automatic versioned backups. Configuration is persisted in the database and survives server restarts. The system keeps the last 10 configuration backups and allows restoring to any previous version.
All Config API endpoints require authentication. Include a valid session cookie or auth token with every request. Unauthenticated requests receive a 401 Unauthorized response.
Get current configuration
Returns the authenticated user’s current agent configuration and a list of available backups. If no custom configuration has been saved, the default OpenClaw configuration is returned.
Response
Errors
Save configuration
Saves a new configuration for the authenticated user. The current configuration is automatically backed up before the new one is applied. The system retains the 10 most recent backups.
Request body
Response
Errors
Restore a backup
Restores a previous configuration from a backup for the authenticated user. The current configuration is automatically backed up before the restore is applied.
Request body
Response
Errors
Example: save and restore