Skip to main content

Overview

The snapshot endpoints manage saved workspace configurations. Each snapshot captures LLM settings, integration configuration, active agents, active workflows, and optional prompt overrides for one office or branch. Use these endpoints to automate franchise replication, back up a configuration before changes, or restore a workspace to a saved state. For a conceptual walkthrough, see Workspace snapshots and franchise replication.

The snapshot object

List snapshots

GET /api/snapshots Returns all saved snapshots, including the two canonical seeded templates.
Response:

Save a snapshot

POST /api/snapshots/save Captures a configuration as a new snapshot. name and officeName are required; the endpoint returns HTTP 400 if either is missing. description, tags, scope, and configuration are optional and fall back to defaults when omitted.
Returns HTTP 201 with the created snapshot. New snapshot IDs are generated with a snap_ prefix.

Clone a snapshot

POST /api/snapshots/:id/clone Copies an existing snapshot into a new office or branch configuration. The clone gets a new ID, fresh timestamps, and a cloned-branch tag appended to the source snapshot’s tags.
Returns the cloned snapshot. Returns HTTP 404 if the source snapshot does not exist.

Restore a snapshot

POST /api/snapshots/:id/restore Applies a saved snapshot’s configuration to the workspace.
Response:
Returns HTTP 404 if the snapshot does not exist.

Delete a snapshot

DELETE /api/snapshots/:id Removes a snapshot from the store.
Returns { "success": true, "message": "Snapshot deleted." }, or HTTP 404 if the snapshot does not exist.