GET /backups/export
Downloads the current bot configuration as a JSON file. Sensitive fields (API keys, tokens) are redacted with a placeholder. Authentication: API key or bot-owner JWT Bearer token required.Response
Returns a JSON file withContent-Disposition: attachment and a timestamped filename.
The current bot configuration with sensitive fields redacted.
ISO 8601 timestamp of the export.
Backup schema version.
Example
POST /backups/import
Applies configuration from a previously exported JSON payload. Redacted values ([REDACTED] placeholder) are skipped automatically to preserve live secrets.
Authentication: API key or bot-owner JWT Bearer token required.
Request body
The config object to import (from an export payload).
Optional ISO 8601 export timestamp for provenance.
Optional backup schema version.
Response fields
List of config paths that were successfully applied.
List of config paths that were skipped (for example, redacted values).
List of objects describing paths that failed to apply.
Example
GET /backups
Returns metadata for all stored config backups, sorted newest first. Authentication: API key or bot-owner JWT Bearer token required.Response fields
Returns an array of backup metadata objects.Backup ID (filename without the
.json extension).Full filename of the backup file.
ISO 8601 creation timestamp.
File size in bytes.
Example
POST /backups
Creates an immediate manual backup of the current configuration. Authentication: API key or bot-owner JWT Bearer token required.Response fields
The new backup ID.
File size in bytes.
ISO 8601 creation timestamp.
Example
GET /backups/:id/download
Streams a specific backup JSON file for download by its ID. Authentication: API key or bot-owner JWT Bearer token required.Path parameters
The backup ID (filename without the
.json extension).Response
Returns the backup JSON file withContent-Disposition: attachment.
Example
POST /backups/:id/restore
Restores the live configuration from a stored backup. Redacted sensitive values are skipped to preserve the current live secrets. Authentication: API key or bot-owner JWT Bearer token required.Path parameters
The backup ID to restore.
Response fields
Same shape asPOST /backups/import: applied, skipped, and failed arrays.
Example
POST /backups/prune
Deletes backups that exceed the retention policy. Defaults to keeping the last 7 daily and 4 weekly backups. Authentication: API key or bot-owner JWT Bearer token required.Request body
Number of daily backups to keep. Default:
7.Number of weekly backups to keep. Default:
4.Response fields
List of backup IDs that were deleted.
Number of backups deleted.