# Side Space > Side Space is a shared drive for media teams. Every save is a version; every version can carry > JSON "sidecars" (tags, the AI prompt that made it, transcripts, media facts) and "renditions" > (thumbnail, 720p proxy). Programs and AI agents use the same HTTP API as the apps. ## Start here - API description (OpenAPI 3.1): /v1/openapi.yaml - Every operation with its scope and example calls: /v1/operations.json (JSON) or /llms-full.txt (plain text, with rules to paste into AGENTS.md or CLAUDE.md). - Errors: {"error":{"code","message","details"?,"request_id"}}. Match on code; on 429 or 503 wait Retry-After seconds; quote request_id (also the X-Request-Id header) when reporting a problem. - A helper (a subagent, a render job) gets its own narrower token: POST /v1/token/derive {"name","scopes"?,"space_ids"?,"expires_in_seconds"?}. Revoking a token ends the ones derived from it. - Authenticate with a personal access token: `Authorization: Bearer ssp_…`. A person makes one with `side token create NAME --scope files:read` (or in the app); it is shown once. Tokens carry scopes and belong to a space (the CLI's current one, or --space NAME; --all-spaces for a token that reaches every space). - A token made for one space reaches it without naming it: every /v1/spaces/{sid}/… path also answers at /v1/space/… (GET /v1/space is the space itself). Other credentials get 400 space_required there. - Scopes: files:read, files:write (includes read), sidecars:write (any namespace) or sidecars:write: (one, or a family with a trailing *), renditions:write, events:read, shares:manage, members:manage, webhooks:manage, runs:write, pipelines:manage, plugins:manage, comments:write, admin. - Apps acting for people use OAuth 2.1 (authorization code + PKCE S256): metadata at /.well-known/oauth-authorization-server; developers register with `side app create NAME --redirect URI [--confidential]`, or apps register themselves (RFC 7591). What a person grants becomes a token (scopes and spaces they picked; never admin), revocable like any token. - An agent (AI agent or service account) is a member of its own: `side agent create NAME`, add it to a space with its address, then `side token create NAME --agent ID`. Every change it makes is marked as an agent's in the journal (`actor_kind: "agent"`) and in the apps. ## MCP Connect an MCP client to `/mcp` on this server (streamable HTTP). Clients that support MCP authorization need nothing else: a 401 points them (WWW-Authenticate resource_metadata) to /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server; they register at /oauth/register, the person signs in and approves in the browser, and the client gets an hour-long token plus a refresh token. Other clients send `Authorization: Bearer ssp_…`. Tools: list_spaces, search, list_folder, describe_file (what a video or image is, from its metadata, without downloading it), read_text, write_text, get_sidecar, put_sidecar, list_versions, label_version, compare_versions, restore_version, recent_changes, recent_activity, list_members, list_actions, run_action (transcribe, tag or convert a file and wait for the result), get_run. The token's scopes and spaces apply to every tool, and tools/list shows only the tools the token may use. ## Common calls - List spaces: GET /v1/spaces - Find files by name, metadata and comments: GET /v1/search?q=words[&space=ID][&type=video|image|audio|folder|other][&mode=auto|keyword|meaning] When the server has an embeddings model, files close in meaning follow the word matches (matched: ["meaning"], score), so "q=two people arguing on a beach" works. Hits in a transcript, a timed comment or a piece of transcript close in meaning carry moments: [{at_ms, until_ms, text, source}]. - Sandbox (fork): POST /v1/spaces/{sid}/forks {"name","path"?} makes a new drive of the same space sharing the files (instant, no copies; same members and plan, same workspace_id); work in it, GET /v1/spaces/{fork}/fork/changes, POST /v1/spaces/{fork}/fork/apply {"paths"?,"force"?,"dry_run"?}. A token for the space reaches its forks; to keep an agent to one fork, give it a token with drive_ids: [fork]. MCP: fork_space, fork_changes, apply_fork. - S3 tools (aws cli, rclone, boto3, any AWS SDK): `side token create NAME --scope files:write --s3` prints an access key id (SSAK…) and secret; point the tool at the server's S3 endpoint (port 8070 by default) with path-style addressing. Bucket = space (its name in lower case, spaces as dashes, or its id), key = path. Puts make versions, deletes go to the trash, multipart and presigned URLs work. - Browse: GET /v1/spaces/{sid}/nodes/{nid}/children (the root is the space's root_node_id) - Find by path: GET /v1/spaces/{sid}/paths/Ep01/Shots/a.mov - Versions: GET /v1/spaces/{sid}/nodes/{nid}/versions. Name one ("Client cut") with PUT /v1/spaces/{sid}/versions/{vid}/label {"label"}; a name belongs to one version of a file at a time. What changed: GET /v1/spaces/{sid}/versions/{a}/compare/{b} (bytes shared, media facts and sidecars that differ). The MCP tools take a version id, number or name. - Read a version's metadata: GET /v1/spaces/{sid}/versions/{vid}/sidecars - Write your results: PUT /v1/spaces/{sid}/versions/{vid}/sidecars/{ns} with {"doc": {…}}. Custom namespaces start with "x-" (e.g. x-acme.qc). A space manager can make a namespace writable by one member only (PUT /v1/spaces/{sid}/namespaces/{ns}). - Follow changes: GET /v1/spaces/{sid}/journal?after=SEQ (each entry has op, node, actor_kind), or the /v1/ws WebSocket for "something changed" signals, or `side events tail --json`. - Be told about changes: POST /v1/spaces/{sid}/webhooks {"url", "events", "path_glob", "mime_prefix"} (a space manager; tokens need webhooks:manage). Each event is one POST signed with `Side-Signature: t=…,v1=HMAC-SHA256(secret, "t.body")`, in order, retried until it gets a 2xx. - File bytes: POST /v1/spaces/{sid}/download-tickets returns a manifest and a ticket for the block gateway; the CLI (`side get`, `side put`) does this for you. ## Actions (AI and conversions) - What this server can do to files: GET /v1/spaces/{sid}/actions. First-party actions: side.transcribe (speech to timed text, into the "transcript" sidecar), side.tags (a vision model describes and tags a video or image, into "ai.tags"), side.convert (ffmpeg presets: mp4, webm, prores-proxy, wav, mp3, jpg, png, webp, gif; a new file next to the source). - Run one: POST /v1/spaces/{sid}/runs {"action", "path" (or version_id/node_id), "params"} (tokens need runs:write), then GET /v1/spaces/{sid}/runs/{rid} until state is done or failed. Results are cached by content: the same bytes with the same params answer at once (`cached: true`, and free); pass "fresh": true to run again. - Plans: each space has its own plan, limiting storage, file size, members and AI runs a month. A refusal is HTTP 402 with code quota_exceeded and a message saying which limit and when it renews: tell the person, don't retry. GET /v1/spaces/{sid}/plan shows limits and what was used. - Before running, read the file's sidecars: a transcript or tags may already be there. - Pipelines run an action on every new matching file: POST /v1/spaces/{sid}/pipelines {"name", "action", "params", "path_glob", "mime_prefix", "conditions", "after"} (a space manager; tokens need pipelines:manage); POST …/pipelines/{pid}/backfill does the files already there. conditions: min_size, max_size, min_duration_s, max_duration_s, min_width, min_height, has_audio. after: an action name; the pipeline then starts when that action finishes on a matching file instead of on save. Ready-made sets: GET /v1/spaces/{sid}/pipeline-templates, POST …/pipeline-templates/{id} {"path_glob", "backfill"}. - Plugins add third-party actions (x-vendor.plugin.action): POST /v1/spaces/{sid}/plugins {"manifest_url"} (a space manager; tokens need plugins:manage). A plugin is an HTTPS service that receives signed jobs and answers with sidecars and files; see /v1/openapi.yaml (PluginManifest, PluginJob, PluginResult). With "runtime": "runner" it has no endpoint: `side runner --plugin ID --secret S -- ./tool` (or any program calling POST /v1/plugin-runs/claim) takes its jobs on a machine of your own, e.g. with local models. ## Organizations and folder rules - A space may belong to an organization (GET /v1/orgs, /v1/orgs/{oid}/members, /spaces). Each member has one role in it, their own (there are no team groups). - Folders can limit or widen who may change what inside (never who sees it): GET /v1/spaces/{sid}/nodes/{nid}/access says your role at a file or folder and which folder decides it. A 403 on a write inside a folder with rules names the role it needs: tell the person rather than retrying, or write somewhere you may. - Audit export for organization admins: GET /v1/orgs/{oid}/audit?since=&until=&format=jsonl|csv (tokens need admin). ## Review comments - People leave review notes on files, often at a moment of a video: GET /v1/spaces/{sid}/nodes/{nid}/comments gives threads (at_ms = milliseconds into the media, region = a rectangle of the frame as fractions, replies nested). Add ?resolved=1 for done ones. - Answer or act on them: POST …/nodes/{nid}/comments {"body", "at_ms", "parent_id"} (tokens need comments:write); PATCH /v1/spaces/{sid}/comments/{cid} {"resolved": true} once fixed. - MCP tools: list_comments, add_comment, resolve_comment. Webhook events comment.created and comment.updated carry the comment. ## SDKs TypeScript (`@sidespace/sdk`), Python (`sidespace`), Go (`github.com/blendduck/sidespace/sdks/go`) and Rust (`sidespace`), passing one shared test suite: by-path upload, download (byte ranges), versions, edits (binary bodies for large ones), sidecars, search, `changes()`, webhook signature checks, and `run(space, path, action, params)` that waits for the result. ## Rules for agents - Writes never destroy: a save makes a new version, and any version can be restored. - Prefer writing results to a sidecar over writing new files next to the original. - Ask a person before deleting, moving many files, or changing members and shares. ## Rules for agents (paste into AGENTS.md or CLAUDE.md) - Work in a fork for anything bigger than one file: POST /v1/spaces/{sid}/forks (MCP fork_space), change files there, check GET .../fork/changes, then apply with dry_run first. People can review it. - Give helpers their own token: POST /v1/token/derive with only the scopes, spaces and lifetime they need. Revoke it when they finish (DELETE /v1/token/derived/{id}); revoking yours ends theirs. - A token made for one space reaches it at /v1/space/… (the same as /v1/spaces/{sid}/…, no id needed); other credentials get 400 space_required there and name the space. - Save with the version you read: send If-Match: "ver_…" (if_version_id in the SDKs and MCP write_text). If a teammate saved in between you get 412 precondition_failed with details.current_version_id and nothing is overwritten: read that version, merge, write again. If-None-Match: * (if_new) creates a file only if nothing is there yet. - Change part of a long file in place: POST /v1/spaces/{sid}/nodes/{nid}/edits (SDK edit, MCP edit_text and append_text) sends only the changed bytes. Offsets are bytes of the version you read. - Nothing is lost: a save makes a version, a delete goes to the trash for 30 days. Prefer restoring a version (POST /v1/spaces/{sid}/versions/{vid}/restore) over rewriting a file by hand. - Do not download video to understand it: describe_file, GET .../sidecars (transcript, tags, media) and search moments answer most questions. - Write your own metadata in your own sidecar namespace (x-yourcompany.something); never in ai.* or media.*, which belong to the server's pipelines. - On 429 or 503 wait for Retry-After seconds. Match errors on error.code, never on the message, and quote error.request_id when you report a problem. ## Every operation Generated from /v1/openapi.yaml; the same list as JSON is /v1/operations.json. Auth: none (no token), token (any token), scope (a token with one of the scopes), session (signed-in app only). ### blockgw GET /chunks/{hash} Download one chunk as plaintext (get ticket) auth: none ?t (string): Ticket from upload-sessions or download-tickets returns: 200 string curl: curl "$SIDESPACE_URL/chunks/$HASH" PUT /chunks/{hash} Upload one chunk (put ticket). The gateway checks BLAKE3(body) == hash; an existing chunk answers 200 without rewriting. auth: none ?t (string): Ticket from upload-sessions or download-tickets returns: 200 Already stored curl: curl -X PUT "$SIDESPACE_URL/chunks/$HASH" POST /edit Apply byte edits to the version the ticket names (a put ticket with manifest_hash, made by the server for POST …/edits) and return the new manifest. Only the chunks around the edits are read, chunked and stored. auth: none ?t (string): Ticket from upload-sessions or download-tickets body.ops (object[], required): Sorted, non-overlapping, offsets in the old file body.truncate (integer): Cut the result to this many bytes afterwards returns: 200 Manifest curl: curl -X POST -H "Content-Type: application/json" -d '{"ops":[]}' "$SIDESPACE_URL/edit" GET /files/{version_id} Whole file as a stream, with Range support (get ticket bound to this version). Only chunks overlapping the range are read. auth: none ?t (string): Ticket from upload-sessions or download-tickets ?download (string): File name for Content-Disposition attachment returns: 200 Full body curl: curl "$SIDESPACE_URL/files/$VERSION_ID" POST /internal/has Internal only. Which of these chunks are missing in this space. auth: token body.hashes (Hash[], required) body.space_id (string, required) returns: 200 Missing curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"hashes":[],"space_id":"…"}' "$SIDESPACE_URL/internal/has" GET /internal/manifests/{hash} Internal only, served by sidespace-server for the gateway's /files stream. auth: token returns: 200 Manifest curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/internal/manifests/$HASH" POST /stream-upload Upload a whole file; the gateway chunks and stores it and returns the manifest (put ticket) auth: none ?t (string): Ticket from upload-sessions or download-tickets returns: 200 Manifest curl: curl -X POST "$SIDESPACE_URL/stream-upload" ### developer GET /v1/agents Agents the caller made auth: session returns: 200 Agents curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/agents" POST /v1/agents Make an agent (AI agent or service account). Add it to spaces by its email address, then make it a token with agent_id. auth: session body.name (string, required) returns: 201 User curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/agents" DELETE /v1/agents/{id} Retire an agent - revokes its tokens and takes it out of every space (its past changes stay attributed to it) auth: session returns: 204 Retired curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/agents/$ID" GET /v1/apps OAuth apps the caller registered (signed-in apps only) auth: session returns: 200 Apps curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/apps" POST /v1/apps Register an OAuth app. People connect it at /oauth/authorize; it gets tokens at /oauth/token (see /.well-known/oauth-authorization-server). Apps can also register themselves at /oauth/register (RFC 7591, public clients only). auth: session body.name (string, required) body.redirect_uris (string[], required): https, http on localhost (any port), or the app's own scheme body.client_uri (string): https home page shown on the consent page body.confidential (boolean): Server-side app: gets a client_secret (shown once); PKCE becomes optional body.logo_uri (string) returns: 201 The app (and its secret, once) curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…","redirect_uris":[]}' "$SIDESPACE_URL/v1/apps" DELETE /v1/apps/{id} Delete an app; every grant made to it stops working auth: session returns: 204 Deleted curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/apps/$ID" GET /v1/llms-full.txt The agent guide (/llms.txt), rules to paste into AGENTS.md or CLAUDE.md, and every operation in plain text (no auth) auth: none returns: 200 string curl: curl "$SIDESPACE_URL/v1/llms-full.txt" GET /v1/openapi.yaml This API description (no auth) auth: none returns: 200 string curl: curl "$SIDESPACE_URL/v1/openapi.yaml" GET /v1/operations.json Every operation with the scope it needs and example calls (curl, and TypeScript, Python, CLI and MCP where they exist), generated from this description (no auth) auth: none returns: 200 Operations curl: curl "$SIDESPACE_URL/v1/operations.json" POST /v1/plugin-runs/claim A runner claims the oldest waiting job of a runner plugin (ADR 0022). Authorization: Bearer :. The job is a PluginJob with a fresh callback token and input URL; complete it with the /v1/plugin-runs/{rid}/… calls. auth: none ?wait (integer): Seconds to wait for a job (long poll) returns: 200 A job curl: curl -X POST "$SIDESPACE_URL/v1/plugin-runs/claim" POST /v1/plugin-runs/{rid}/complete Finish a run the plugin answered with 202 (or a device claimed), with its result or an error. A device may write only the sidecars its action writes; {"error", "retry": true} puts a device's run back to waiting. auth: scope: admin body.error (string): On complete: the run failed body.files (object[]) body.retry (boolean): With error: try another attempt body.sidecars (object): namespace → document, only namespaces the action declares returns: 200 Run curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/plugin-runs/$RID/complete" POST /v1/plugin-runs/{rid}/progress A plugin (or a device, ADR 0059) reports how far a run has got. For a device's run it also renews the hold. auth: scope: admin body.progress (number, required) body.eta_s (number): Seconds it expects to need still; shown on the run as eta_at body.stage (string): The step it is at, e.g. transcribe, describe; shown on the run as stage returns: 204 Recorded curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"progress":0}' "$SIDESPACE_URL/v1/plugin-runs/$RID/progress" POST /v1/plugin-runs/{rid}/upload A ticket to upload a new file's bytes into the run's space (POST them to the gateway's /stream-upload, which answers with the manifest) auth: scope: admin returns: 200 UploadSession curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/plugin-runs/$RID/upload" POST /v1/runs/claim A member's device claims one file's waiting first-party runs (ADR 0059): a signed-in device, or a token with runs:execute naming itself in `device`. It gets runs of drives where its person is an editor (folder rules apply), in the drives it chose, whose workspace lets members' devices work and whose drive is not set to "server", for the actions and backends it lists, in the classes it takes now. Best first: someone waiting, then batches, then automatic; light before heavy; drives in turn. The other waiting runs of the same file come along, so the file is read and decoded once. First, the runs this device still held are taken back (it asks again only after a restart); that counts as an attempt, and after 3 the run fails. Report on each run with its callback, as runner plugins do: /v1/plugin-runs/{rid}/progress (at least every lease_seconds; it keeps the hold), /upload, /complete. auth: scope: runs:execute ?wait (integer): Seconds to wait for work (long poll) body.can (DeviceCapability[], required): Best first. Actions devices do (GET /v1/runs/device-actions); others are left out and named in ignored / X-Ignored-Can, and only a can with none known is refused. A run with no backend named (on it, or the workspace's default) waits with backend "" and the device that claims it fixes it body.classes (string[]): Default both; on battery, light body.device (string): A token runner's name (letters, digits, . _ -), so its runs come back to it after a restart; a signed-in device leaves it out body.max (integer): Runs of one file in a claim body.name (string): Shown to people ("Alice's MacBook Pro") body.priorities (string[]): Only runs of these priorities; empty = all. "Only when I ask" is [now] body.spaces (string[]): Only these drives (the device's settings); empty = all returns: 200 DeviceBundle curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"can":[]}' "$SIDESPACE_URL/v1/runs/claim" GET /v1/runs/device-actions The actions devices may do, with how they do them, so a device need not learn them from a refusal auth: scope: runs:execute returns: 200 Actions curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/runs/device-actions" POST /v1/runs/waiting How many runs wait that a claim with this request would find, without claiming (ADR 0060) auth: scope: runs:execute body.can (DeviceCapability[], required): Best first. Actions devices do (GET /v1/runs/device-actions); others are left out and named in ignored / X-Ignored-Can, and only a can with none known is refused. A run with no backend named (on it, or the workspace's default) waits with backend "" and the device that claims it fixes it body.classes (string[]): Default both; on battery, light body.device (string): A token runner's name (letters, digits, . _ -), so its runs come back to it after a restart; a signed-in device leaves it out body.max (integer): Runs of one file in a claim body.name (string): Shown to people ("Alice's MacBook Pro") body.priorities (string[]): Only runs of these priorities; empty = all. "Only when I ask" is [now] body.spaces (string[]): Only these drives (the device's settings); empty = all returns: 200 Counts curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"can":[]}' "$SIDESPACE_URL/v1/runs/waiting" POST /v1/runs/{rid}/release The device holding a run gives it back (going to sleep, quitting, on battery); it waits again and the attempt does not count. Token runners name their device. auth: scope: runs:execute body.device (string): The name a token runner claimed with returns: 200 Run curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/runs/$RID/release" GET /v1/spaces/{sid}/actions What can be done to files here, with a JSON Schema of each action's params and whether this server can run it auth: scope: files:read returns: 200 Actions curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/actions" mcp: list_actions {"space":"Film A"} python: side.actions() typescript: await side.actions() GET /v1/spaces/{sid}/ai Where the drive's AI work is done, its workspace's AI settings, the devices around that may do it, and how many runs wait for one (any member; ADR 0059) auth: scope: files:read returns: 200 DriveAI curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/ai" PATCH /v1/spaces/{sid}/ai Say where the drive's AI work is done (workspace admin; tokens need admin). Runs already waiting follow: on "server" they move to the server. auth: scope: admin body.where (AIWhere, required) returns: 200 DriveAI curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"where":{}}' "$SIDESPACE_URL/v1/spaces/$SID/ai" GET /v1/spaces/{sid}/ai/missing Files a device can pull into its queue, newest first (any member; only files the caller may edit are listed) auth: scope: files:read ?actions (string): Comma-separated actions, e.g. side.ocr,side.capture: those this device can do. Ones the workspace has off are left out; leave it out for all it has on. 400 for one devices do not do ?version_ids (string): Comma-separated versions (at most 200): only those, e.g. the ones this device uploaded, to do them first ?limit (integer) ?cursor (string): next_cursor of the page before returns: 200 MissingPage curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/ai/missing" GET /v1/spaces/{sid}/pipeline-templates Ready-made rule sets (any member) auth: scope: files:read returns: 200 Templates curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/pipeline-templates" POST /v1/spaces/{sid}/pipeline-templates/{tid} Create a template's pipelines in the space (manager; tokens need pipelines:manage) auth: scope: pipelines:manage body.backfill (boolean): Also run them on the matching files already there body.path_glob (string): Limit them to these paths returns: 201 Created curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/pipeline-templates/$TID" GET /v1/spaces/{sid}/pipelines The space's pipelines (any member) auth: scope: files:read returns: 200 Pipelines curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/pipelines" POST /v1/spaces/{sid}/pipelines Run an action on every new file that matches (manager; tokens need pipelines:manage). Starts with files saved from now on; backfill for the ones already there. auth: scope: pipelines:manage body.action (string) body.active (boolean) body.after (string): An action name; "" clears it body.conditions (PipelineConditions) body.mime_prefix (string) body.name (string) body.params (object) body.path_glob (string) returns: 201 Pipeline curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/pipelines" PATCH /v1/spaces/{sid}/pipelines/{pid} Change it, or turn it off or back on (manager) auth: scope: pipelines:manage body.action (string) body.active (boolean) body.after (string): An action name; "" clears it body.conditions (PipelineConditions) body.mime_prefix (string) body.name (string) body.params (object) body.path_glob (string) returns: 200 Pipeline curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/pipelines/$PID" DELETE /v1/spaces/{sid}/pipelines/{pid} Remove it (its runs stay) auth: scope: pipelines:manage returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/pipelines/$PID" POST /v1/spaces/{sid}/pipelines/{pid}/backfill Queue the action on the matching files already in the space (manager) auth: scope: pipelines:manage returns: 200 How many runs started curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/pipelines/$PID/backfill" GET /v1/spaces/{sid}/plugins The space's plugins (any member) auth: scope: files:read returns: 200 Plugins curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/plugins" POST /v1/spaces/{sid}/plugins Install a plugin from its manifest (manager; tokens need plugins:manage). The signing secret is shown once. auth: scope: plugins:manage body.active (boolean) body.manifest (PluginManifest) body.manifest_url (string) returns: 201 Installed curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/plugins" PATCH /v1/spaces/{sid}/plugins/{pid} Take a new manifest (same name), or turn it off or on (manager) auth: scope: plugins:manage body.active (boolean) body.manifest (PluginManifest) body.manifest_url (string) returns: 200 Plugin curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/plugins/$PID" DELETE /v1/spaces/{sid}/plugins/{pid} Uninstall (manager). Runs still waiting on it fail; what it wrote stays. auth: scope: plugins:manage returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/plugins/$PID" GET /v1/spaces/{sid}/runs Recent runs, newest first (any member) auth: scope: files:read ?version_id (string) ?node_id (string) ?state (RunState) ?action (string) ?pipeline_id (string) ?limit (integer) returns: 200 Runs curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/runs" POST /v1/spaces/{sid}/runs Run an action on a file (editor; tokens need runs:write). Answers the queued, waiting or running run, or 200 with a done run when the same bytes were done before. Where it is done is decided now (ADR 0059): the drive's setting (GET /v1/spaces/{sid}/ai), the workspace's, and whether a member's device that can do it asked for work lately. A run for a device is "waiting" (target device) until one claims it. auth: scope: runs:write body.action (string, required) body.backend (string): Another backend than the workspace's default; the run then never moves to another (no fallback to the server unless it has this one) body.device (string): With here and a token: the runner's name, as it claims with body.fresh (boolean): Run again even if these bytes were done before body.here (boolean): Bind the run to the calling device (a signed-in device, or a token runner named in device): only it claims it, it never moves to the server or another device, and released it stays bound. 409 when that device has not asked for this action lately, the drive works on the server, or the workspace keeps members' devices out. A live run of the same work that still waits is bound to the caller instead. Bound runs still waiting are canceled when their device stops asking for work for 30 minutes. body.node_id (string) body.params (object): Checked against the action's params_schema body.path (string) body.priority (string): now: someone is waiting; batch: one of many a person started; auto: a device pulling missing work for itself. Pipelines' runs are auto. body.version_id (string) returns: 200 Run cli: side run /cuts/a.mov side.transcribe --param language=en curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"action":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/runs" mcp: run_action {"space":"Film A","action":"side.transcribe","path":"/cuts/a.mov","params":{"language":"en"}} python: side.run("/cuts/a.mov", "side.transcribe", {"language": "en"}) typescript: await side.run("/cuts/a.mov", "side.transcribe", { language: "en" }) GET /v1/spaces/{sid}/runs/{rid} One run, with progress while running and the result when done auth: scope: files:read returns: 200 Run curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/runs/$RID" POST /v1/spaces/{sid}/runs/{rid}/cancel Stop a queued, waiting or running run (editor) auth: scope: runs:write returns: 200 Run curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/runs/$RID/cancel" GET /v1/spaces/{sid}/webhooks The space's webhook subscriptions (manager; tokens need webhooks:manage) auth: scope: webhooks:manage returns: 200 Subscriptions curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/webhooks" POST /v1/spaces/{sid}/webhooks Subscribe a URL to the space's events (manager). The secret is shown once. auth: scope: webhooks:manage body.active (boolean) body.description (string) body.events (string[]) body.from_seq (integer): Create only: start after this seq instead of with new events body.mime_prefix (string) body.path_glob (string) body.url (string) returns: 201 Created cli: side webhook create https://example.com/hook --event version.created curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/webhooks" python: side.create_webhook("https://example.com/hook", events=["version.created"]) typescript: await side.createWebhook({ url: "https://example.com/hook", events: ["version.created"] }) PATCH /v1/spaces/{sid}/webhooks/{wid} Change filters or URL, or turn it off or back on (on clears its failures) auth: scope: webhooks:manage body.active (boolean) body.description (string) body.events (string[]) body.from_seq (integer): Create only: start after this seq instead of with new events body.mime_prefix (string) body.path_glob (string) body.url (string) returns: 200 Webhook curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/webhooks/$WID" DELETE /v1/spaces/{sid}/webhooks/{wid} Remove the subscription and its delivery log auth: scope: webhooks:manage returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/webhooks/$WID" GET /v1/spaces/{sid}/webhooks/{wid}/deliveries Latest delivery attempts, newest first (kept 7 days) auth: scope: webhooks:manage ?limit (integer) returns: 200 Deliveries curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/webhooks/$WID/deliveries" POST /v1/spaces/{sid}/webhooks/{wid}/ping Send a test event of type ping now; the answer is the delivery (status, error, time) auth: scope: webhooks:manage returns: 200 WebhookDelivery curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/webhooks/$WID/ping" POST /v1/spaces/{sid}/webhooks/{wid}/replay Send every event after from_seq again (and turn the subscription on) auth: scope: webhooks:manage body.from_seq (integer, required) returns: 200 Webhook curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"from_seq":0}' "$SIDESPACE_URL/v1/spaces/$SID/webhooks/$WID/replay" GET /v1/token The calling access token itself (who it acts as, scopes, spaces, expiry). Any token may call it. auth: token returns: 200 TokenInfo cli: side token whoami curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/token" python: side.token_info() typescript: await side.tokenInfo() POST /v1/token/derive Make a narrower token from the calling one, e.g. for a subagent: scopes and spaces only shrink, it expires no later, and it is switched off when the calling token (or any token above it) is revoked or expires. At most 8 levels. A signed-in app may call it too, to hand an agent a short-lived token: scopes are then required, it lasts an hour unless expires_in_seconds says otherwise (at most a day), and it has no parent. auth: token body.name (string, required) body.drive_ids (string[]): Only these drives, each one the calling token reaches. A calling token with drive_ids passes them on: the new one reaches no drive outside them body.expires_in_seconds (integer): Omitted means when the calling token expires; never later than that body.s3 (boolean) body.scopes (string[]): Each must be granted by the calling token; omitted means the same scopes body.space_ids (string[]): Each must be reachable by the calling token; omitted (with drive_ids) means the same spaces and drives returns: 201 The token (shown once) and its details cli: side token derive subagent --scope files:read --expires 1h curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/token/derive" python: side.derive_token("subagent", scopes=["files:read"], expires_in_seconds=3600) typescript: await side.deriveToken({ name: "subagent", scopes: ["files:read"], expiresInSeconds: 3600 }) GET /v1/token/derived Tokens derived from the calling one, at any depth, newest first auth: token returns: 200 Tokens cli: side token derived curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/token/derived" python: side.derived_tokens() typescript: await side.derivedTokens() DELETE /v1/token/derived/{id} Revoke a token derived from the calling one, and every token below it. The id "self" revokes the calling token. auth: token returns: 204 Revoked cli: side token revoke tok_… curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/token/derived/$ID" python: side.revoke_token("tok_…") typescript: await side.revokeToken("tok_…") GET /v1/tokens Personal access tokens the caller made (for themselves and their agents), revoked ones included auth: session returns: 200 Tokens curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/tokens" POST /v1/tokens Make a personal access token; the secret is returned once auth: session body.name (string, required) body.scopes (string[], required) body.agent_id (string): Act as this agent (one the caller made) instead of the caller body.drive_ids (string[]): Only these drives (a space's id, or a fork's) of those spaces; omitted means every drive of them, forks made later included body.expires_in_days (integer): 0 means never body.s3 (boolean): Also make it an S3 key for the S3-compatible gateway: s3_access_key_id is returned and the token is the secret access key body.space_ids (string[]): Limit to these workspaces (the caller must be a member); omitted means every workspace. A drive's id here means that drive only returns: 201 The token (shown once) and its details cli: side token create NAME --scope files:read --space "Film A" curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…","scopes":[]}' "$SIDESPACE_URL/v1/tokens" DELETE /v1/tokens/{id} Revoke a token at once auth: session returns: 204 Revoked curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/tokens/$ID" GET /v1/workspaces/{wid}/ai Whether members' devices may do the workspace's AI work, and each action's default backend (any member) auth: scope: files:read returns: 200 WorkspaceAI curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/ai" PATCH /v1/workspaces/{wid}/ai Change them (admin). A backend of "" clears the action's default. auth: scope: admin body.backends (object): action → backend, e.g. {"side.transcribe": "whisper-large-v3-turbo"} body.embed_model (string): Move the workspace to another vector model (ADR 0061): its files are embedded again in the background; search keeps the old model until that is done. The current id again calls a move off. Not through backends body.member_devices (boolean) returns: 200 WorkspaceAI curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/ai" GET /v1/workspaces/{wid}/automation AI Automation, which recognitions the workspace wants done to its files (any member) auth: scope: files:read returns: 200 Automation curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/automation" PATCH /v1/workspaces/{wid}/automation Turn actions on or off (admin); actions left out stay as they are auth: scope: admin body.items (object[], required) returns: 200 Automation curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"items":[]}' "$SIDESPACE_URL/v1/workspaces/$WID/automation" GET /v1/workspaces/{wid}/fields The fields of a workspace that can be filtered, listed and counted (any member) auth: scope: files:read returns: 200 Fields curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/fields" POST /v1/workspaces/{wid}/fields Add a field of the workspace's own (admin); the index of its drives is rebuilt auth: scope: admin body.key (string): Lowercase letters, digits and _ (client); filtered as f.client. Fixed once made body.label (object) body.options (object) body.position (integer) body.type (string): Fixed once made returns: 201 FacetDef curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/fields" PATCH /v1/workspaces/{wid}/fields/{key} Change a field's label, enum values or position (admin); key and type stay. 403 for a built-in or plugin field auth: scope: admin body.key (string): Lowercase letters, digits and _ (client); filtered as f.client. Fixed once made body.label (object) body.options (object) body.position (integer) body.type (string): Fixed once made returns: 200 FacetDef curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/fields/$KEY" DELETE /v1/workspaces/{wid}/fields/{key} Remove a field of the workspace's own (admin); the values stay in the files' fields sidecars auth: scope: admin returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/fields/$KEY" GET /v1/workspaces/{wid}/tags The tag vocabulary (any member) auth: scope: files:read returns: 200 Tags curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/tags" POST /v1/workspaces/{wid}/tags/merge Fold tags into one spelling (admin); each, with its own others, becomes one of its aliases auth: scope: admin body.from (string[], required) body.into (string, required) returns: 200 TagTerm curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"from":[],"into":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/tags/merge" POST /v1/workspaces/{wid}/tags/rename Rename a tag (admin); the old spelling and its others fold into the new one auth: scope: admin body.from (string, required) body.to (string, required) returns: 200 TagTerm curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"from":"…","to":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/tags/rename" POST /v1/workspaces/{wid}/tags/restore Undo taking a tag off every file (admin); only that tag's spellings, only on the workspace's drives auth: scope: admin body.aliases (string[], required) body.failed (integer, required): Files the caller could not change, left as they were body.files (object[], required) body.kept (boolean, required): The workspace kept the tag (it is kept again on restore) body.term (string, required) body.color (string) returns: 204 Put back curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"aliases":[],"failed":0,"files":[],"kept":false,"term":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/tags/restore" PUT /v1/workspaces/{wid}/tags/{term} Keep a spelling with exactly these others folded into it (admin); a spelling belongs to one tag auth: scope: admin body.aliases (string[]) returns: 200 TagTerm curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/tags/$TERM" PATCH /v1/workspaces/{wid}/tags/{term} Make a tag, or change its colour (editor); a spelling folded into another tag is that tag's (409) auth: scope: admin body.color (string): '#rrggbb', or empty for none returns: 200 TagTerm curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/tags/$TERM" DELETE /v1/workspaces/{wid}/tags/{term} Stop keeping a spelling (admin); files keep their tags auth: scope: admin returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/tags/$TERM" POST /v1/workspaces/{wid}/tags/{term}/remove Take a tag off every file of the workspace (admin) auth: scope: admin returns: 200 TagRemoval curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/tags/$TERM/remove" ### ai POST /v1/ai/chat One chat turn with Side Space AI, answered as Server-Sent Events auth: scope: runs:write body.messages (AIChatMessage[], required): The whole conversation so far, oldest first; starts and ends with a user message body.model (string): One of GET /v1/ai/models; default: the server's default body.system (string): Instructions of the app's own returns: 200 string curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"messages":[]}' "$SIDESPACE_URL/v1/ai/chat" GET /v1/ai/models Models Side Space AI offers on this server (none, and enabled false, without an Anthropic key) auth: token returns: 200 AIModelList curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/ai/models" ### auth POST /v1/auth/desktop/approve Approve a desktop sign-in as the signed-in person (sessions only; access tokens get 403) auth: session body.handle (string, required) body.space_id (string): One of the caller's spaces, for the app to work in. Required when the sign-in has `choose_space` (400 `space_required` without it); 403 for a space the caller is not a member of returns: 200 DesktopLogin curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"handle":"…"}' "$SIDESPACE_URL/v1/auth/desktop/approve" POST /v1/auth/desktop/info Describe a pending desktop sign-in to the person about to approve it (signed-in app or website session only) auth: session body.handle (string, required) returns: 200 DesktopLogin curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"handle":"…"}' "$SIDESPACE_URL/v1/auth/desktop/info" POST /v1/auth/desktop/poll Collect the desktop app's tokens once the sign-in was approved (once) auth: none body.handle (string, required) returns: 200 TokenPair curl: curl -X POST -H "Content-Type: application/json" -d '{"handle":"…"}' "$SIDESPACE_URL/v1/auth/desktop/poll" POST /v1/auth/desktop/start Start signing a desktop app in through the browser auth: none body.choose_space (boolean): The app works in one space (the CLI): the person picks one of their spaces when approving, and the poll returns it as `space_id` body.device_name (string): Shown to the person approving, e.g. "Pat's MacBook Pro" body.platform (string) returns: 200 DesktopStart curl: curl -X POST -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/auth/desktop/start" POST /v1/auth/email/start Send a 6-digit sign-in code (dev servers accept 000000 and log the code) auth: none body.email (string, required) body.link (string): A website page the mail links to; the address and the code are added, so a click signs in returns: 200 Code sent curl: curl -X POST -H "Content-Type: application/json" -d '{"email":"…"}' "$SIDESPACE_URL/v1/auth/email/start" POST /v1/auth/email/verify Exchange the code for tokens and register this device auth: none body.code (string, required) body.device_name (string, required) body.email (string, required) body.platform (string, required) body.display_name (string): Used when the account is created body.share_token (string): The share link the person signed in from; a new account remembers it returns: 200 TokenPair curl: curl -X POST -H "Content-Type: application/json" -d '{"code":"…","device_name":"…","email":"…","platform":"…"}' "$SIDESPACE_URL/v1/auth/email/verify" POST /v1/auth/google/collect The tokens of a finished Google sign-in, once auth: none body.handle (string, required) returns: 200 TokenPair curl: curl -X POST -H "Content-Type: application/json" -d '{"handle":"…"}' "$SIDESPACE_URL/v1/auth/google/collect" POST /v1/auth/google/start Begin signing in with Google; send the browser to url. It comes back to return_to with ?handle= (or ?error=) auth: none body.return_to (string, required): A page on the website body.device_name (string) body.platform (string) returns: 200 Started curl: curl -X POST -H "Content-Type: application/json" -d '{"return_to":"…"}' "$SIDESPACE_URL/v1/auth/google/start" GET /v1/auth/methods Which ways in this server offers (email codes always; Google when it has a client) auth: none returns: 200 The methods curl: curl "$SIDESPACE_URL/v1/auth/methods" POST /v1/auth/oauth/decide Allow or deny an app's authorization request as the signed-in person (sessions only) auth: session body.allow (boolean, required) body.request (string, required) body.permissions (string[]): Optional permissions turned on; reading is always granted body.space_ids (string[]) returns: 200 Where to go next curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"allow":false,"request":"…"}' "$SIDESPACE_URL/v1/auth/oauth/decide" POST /v1/auth/oauth/info Describe an app's authorization request to the signed-in person (sessions only; access tokens get 403) auth: session body.request (string, required) returns: 200 The request curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"request":"…"}' "$SIDESPACE_URL/v1/auth/oauth/info" POST /v1/auth/refresh Rotate the refresh token and get a new access token auth: none body.refresh_token (string, required) returns: 200 TokenPair curl: curl -X POST -H "Content-Type: application/json" -d '{"refresh_token":"…"}' "$SIDESPACE_URL/v1/auth/refresh" GET /v1/devices My devices auth: session returns: 200 Devices curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/devices" DELETE /v1/devices/{id} Revoke a device (its refresh token stops working at once) auth: session returns: 204 Revoked curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/devices/$ID" POST /v1/diagnostics/reports Send a failure report from a desktop app (when the person turned reports on) auth: session body.kind (string, required): mount, upload or download body.message (string, required) body.app_version (string) body.detail (string) body.device (string) body.log_tail (string) body.os (string) returns: 204 Done curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"kind":"…","message":"…"}' "$SIDESPACE_URL/v1/diagnostics/reports" POST /v1/feedback Send feedback from a desktop app (Send Feedback; a signed-in app's session, not an access token) auth: session body.message (string, required) body.app_version (string) body.device_model (string) body.drive_id (string) body.email (string) body.kind (string) body.locale (string) body.log (string) body.os_version (string) body.screenshots (object[]) body.workspace_id (string) returns: 201 Received curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"message":"…"}' "$SIDESPACE_URL/v1/feedback" GET /v1/me The signed-in user auth: token returns: 200 User curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/me" GET /v1/releases/{platform} The newest desktop build for a platform, for the apps' update check (no auth) auth: none ?current (string): The asking app's version, e.g. 0.1.0 returns: 200 Release curl: curl "$SIDESPACE_URL/v1/releases/$PLATFORM" GET /v1/releases/{platform}/appcast.xml The Mac app's Sparkle update feed (no auth) auth: none returns: 200 string curl: curl "$SIDESPACE_URL/v1/releases/$PLATFORM/appcast.xml" GET /v1/releases/{platform}/latest.json The desktop shell's update list, Tauri's static latest.json (no auth) auth: none returns: 200 DesktopUpdateList curl: curl "$SIDESPACE_URL/v1/releases/$PLATFORM/latest.json" POST /v1/releases/{platform}/latest.json Send a desktop shell version as a draft (a build machine, with a release token) auth: none body.platforms (object, required): By Tauri target, e.g. darwin-aarch64-app body.version (string, required) body.min_version (string): Apps older than this must update (not part of Tauri's format; the updater ignores it) body.notes (string) body.pub_date (string) returns: 201 The draft (the back office's release record) curl: curl -X POST -H "Content-Type: application/json" -d '{"platforms":{},"version":"…"}' "$SIDESPACE_URL/v1/releases/$PLATFORM/latest.json" ### orgs GET /v1/auth/sso/callback Where the identity provider sends the browser back (an HTML page) auth: none returns: 200 Signed in curl: curl "$SIDESPACE_URL/v1/auth/sso/callback" POST /v1/auth/sso/poll Collect the tokens once the browser came back (once) auth: none body.handle (string, required) returns: 200 TokenPair curl: curl -X POST -H "Content-Type: application/json" -d '{"handle":"…"}' "$SIDESPACE_URL/v1/auth/sso/poll" POST /v1/auth/sso/saml/{workspace_id}/acs Where a workspace's SAML identity provider posts its response (HTTP-POST binding; an HTML page) auth: none returns: 200 Signed in curl: curl -X POST "$SIDESPACE_URL/v1/auth/sso/saml/$WORKSPACE_ID/acs" GET /v1/auth/sso/saml/{workspace_id}/metadata A workspace's SAML service provider metadata (its entity ID is this URL) auth: none returns: 200 The metadata curl: curl "$SIDESPACE_URL/v1/auth/sso/saml/$WORKSPACE_ID/metadata" POST /v1/auth/sso/start Start signing in through the organization that owns the address's domain (OpenID Connect) auth: none body.email (string, required) body.device_name (string) body.platform (string) returns: 200 SSOStart curl: curl -X POST -H "Content-Type: application/json" -d '{"email":"…"}' "$SIDESPACE_URL/v1/auth/sso/start" GET /v1/orgs Your organizations auth: scope: files:read returns: 200 Organizations curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs" POST /v1/orgs Make an organization with you as its owner (people only; tokens need admin) auth: scope: admin body.name (string, required) returns: 201 Org curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/orgs" GET /v1/orgs/{oid} auth: scope: files:read returns: 200 Org curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID" PATCH /v1/orgs/{oid} Rename (an admin) auth: scope: admin body.name (string, required) returns: 200 Org curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/orgs/$OID" GET /v1/orgs/{oid}/audit Audit export (an admin; tokens need admin), oldest first, at most 200 000 records auth: scope: admin ?since (string): RFC 3339 or YYYY-MM-DD; default 30 days before until ?until (string): Default now ?format (string) returns: 200 AuditRecord curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/audit" GET /v1/orgs/{oid}/members auth: scope: files:read returns: 200 People curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/members" POST /v1/orgs/{oid}/members Add someone by email (an admin; only an owner adds owners) auth: scope: members:manage body.email (string, required) body.role (OrgRole) returns: 201 OrgMember curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"email":"…"}' "$SIDESPACE_URL/v1/orgs/$OID/members" PATCH /v1/orgs/{oid}/members/{uid} Change a role (an admin; owners by an owner). The last owner stays. auth: scope: members:manage body.role (OrgRole, required) returns: 204 Done curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"role":{}}' "$SIDESPACE_URL/v1/orgs/$OID/members/$UID" DELETE /v1/orgs/{oid}/members/{uid} Remove someone (an admin, or themself). auth: scope: members:manage returns: 204 Done curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/members/$UID" GET /v1/orgs/{oid}/spaces The organization's spaces (admins see all, members the ones they are in) auth: scope: files:read returns: 200 Spaces curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/spaces" GET /v1/orgs/{oid}/sso Single sign-on settings (an admin). A 404 still names the redirect URI and the DNS proof. auth: scope: admin returns: 200 SSOConfig curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/sso" PUT /v1/orgs/{oid}/sso Connect an OpenID Connect provider for email domains (an owner) auth: scope: admin body.domains (string[], required) body.client_id (string) body.client_secret (string) body.domain_proof (string): Value of the DNS TXT record _sidespace. body.idp_certificate_expires_at: SAML: when the soonest signing certificate in the metadata expires body.idp_metadata (string): SAML: the identity provider's metadata XML body.idp_metadata_url (string): SAML: where to fetch the metadata (https; fetched again daily) body.idp_sso_url (string): SAML: the sign-in URL the metadata names (HTTP-Redirect) body.issuer (string): OpenID Connect: the issuer URL. SAML: the identity provider's entity ID, read from its metadata body.protocol (string) body.redirect_uri (string): Register it with the provider body.required (boolean): Email codes stop working for these domains body.saml_acs_url (string): SAML: the assertion consumer service URL (HTTP-POST) to register body.saml_entity_id (string): SAML: the service provider entity ID (and metadata URL) to register body.updated_at (Timestamp) returns: 200 SSOConfig curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"domains":[]}' "$SIDESPACE_URL/v1/orgs/$OID/sso" DELETE /v1/orgs/{oid}/sso Turn single sign-on off (an owner); email codes work again auth: scope: admin returns: 204 Done curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/sso" GET /v1/spaces/{sid}/folder-access Folders with access rules auth: scope: files:read returns: 200 Folders curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/folder-access" GET /v1/spaces/{sid}/nodes/{nid}/access Your role at a file or folder, and the folder whose rules decide it auth: scope: files:read returns: 200 Access curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/access" PUT /v1/spaces/{sid}/nodes/{nid}/access Set a folder's rules (a manager; tokens need members:manage). Replaces them. auth: scope: members:manage body.grants (FolderGrant[], required) body.default_role (Role|null) returns: 200 FolderAccess curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"grants":[]}' "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/access" DELETE /v1/spaces/{sid}/nodes/{nid}/access Remove a folder's rules (a manager) auth: scope: members:manage returns: 204 Done curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/access" PUT /v1/spaces/{sid}/org Put the space in an organization, or take it out with an empty org_id (a space manager who is an admin there) auth: scope: admin body.org_id (string, required) returns: 200 Space curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"org_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/org" ### billing POST /v1/billing/stripe Stripe's webhook endpoint (checked by its Stripe-Signature header) auth: none returns: 200 Received curl: curl -X POST "$SIDESPACE_URL/v1/billing/stripe" GET /v1/plans The server's public plans (no auth) auth: none returns: 200 Plans curl: curl "$SIDESPACE_URL/v1/plans" GET /v1/spaces/{sid}/plan The space's plan, its limits after any overrides, and what the space used this month (any member) auth: scope: files:read returns: 200 Account curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/plan" POST /v1/spaces/{sid}/plan/checkout Buy a plan for the space through Stripe Checkout (the space's owner) auth: scope: files:write body.plan_id (string, required) body.interval (string) body.storage_id (string): One of the caller's buckets the space moves to once the payment lands (at once while it holds no files, else by a move). Without it, a bucket an earlier Checkout left waiting is dropped. returns: 200 The page to open curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"plan_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/plan/checkout" POST /v1/spaces/{sid}/plan/portal Open Stripe's billing portal for the space (its owner; the space has paid before) auth: scope: files:write body.interval (string): Billing interval for plan_id (default month) body.plan_id (string): A plan to switch to; the portal opens on confirming it returns: 200 The page to open curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/plan/portal" ### search GET /v1/facets What a search can filter, count and sort by, named, and names for the sidecar namespaces (the library's tabs) auth: scope: files:read ?spaces (string): Comma-separated space ids; default every space of the caller returns: 200 Fields and namespaces curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/facets" GET /v1/search Find live files and folders across the caller's spaces by name, by what their sidecars and comments say, and by meaning auth: scope: files:read ?q (string): Words (up to 8 are matched), or a description ?space (string): One space (member only); default every space ?type (string) ?mode (string): auto: words, then meaning when the server can; keyword: words only; meaning: meaning only (400 when the server has no model) ?limit (integer) returns: 200 Hits cli: side search "harbor night" curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/search" mcp: search {"query":"harbor night"} python: side.space("Film A").search("harbor night") typescript: await side.space("Film A").search("harbor night") POST /v1/search Search with filters, grouping by moment, sorting, pages, counts and coverage auth: scope: files:read body.counts (string[]): Fields to count over the hits (each filter but the field's own applies). Keyword fields by value; number and date fields by range: value is {gte, lt} (either may be missing). Durations: under 1 min, 1–5, 5–20, 20–60, over 60; dates: older than a year, the last year, month, week, day; other numbers by each whole value when few, else five equal steps. Every range is listed body.cursor (string) body.filters (SearchFilter[]): A filter on a field the server does not know is left out and named in ignored body.group (string) body.limit (integer) body.mode (string) body.order (string): Turns the sort (not relevance). Default: the sort's own body.q (string): Words (up to 8). Empty: list what the filters let through body.scope (object) body.sort (string): Default relevance with q, saved_at without. saved_at, captured_at, size, duration, width, height: largest first; name, kind, language: A to Z; or a field's key (GET /v1/facets): a keyword field by its first value, A to Z; a number or date, largest first. Empty values last. An unknown field is left out (ignored) body.vectors (object): Query vectors by model id, computed by the client (the Mac's Search by Meaning), the query prefix of the model's contract applied: base64 of little-endian float32 or float16, the model's whole output or its first dim numbers (ADR 0061). Each space is searched with its workspace's model: with this vector, or else the server's own encoding of q (SIDESPACE_EMBED_URL with that model), or by words only (meaning says why). Word hits come first, then files (or, with group moment, moments) found by meaning alone, with score; filters apply to them and total and counts include them returns: 200 SearchResult curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/search" ### notifications GET /v1/notifications auth: scope: files:read ?unread (boolean) ?cursor (string) ?limit (integer) returns: 200 NotificationPage curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/notifications" POST /v1/notifications/{id}/read auth: scope: files:read returns: 204 Marked read curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/notifications/$ID/read" ### storage GET /v1/orgs/{oid}/storage The organization's storage (members; the access key only for admins) auth: session returns: 200 Profiles curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/storage" POST /v1/orgs/{oid}/storage Add a bucket to the organization (admins); checked like a personal one. Change or remove it at /v1/orgs/{oid}/storage/{id} or /v1/storage/{id}. auth: session body.access_key (string) body.addressing (string): Override the provider's body.bucket (string) body.endpoint (string): https URL of an S3-compatible service; empty for AWS S3. For r2 the account ID is enough; for oss, cos, b2 and wasabi the region is. body.kind (string) body.name (string) body.prefix (string) body.provider (StorageProvider): Fills in endpoint, region and addressing; guessed from the endpoint when absent body.region (string): For AWS, asked from AWS when empty or wrong; us-east-1 for others when empty body.secret_key (string): Stored sealed; never returned. Required with access_key: the gateway never lends its own credentials. returns: 201 StorageProfile curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/orgs/$OID/storage" GET /v1/orgs/{oid}/storage/moves Moves of the organization's spaces, those under way first (admins) auth: session returns: 200 Moves curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/storage/moves" POST /v1/orgs/{oid}/storage/moves Move every space whose files are not in the organization's storage to its default storage (admins). Empty spaces switch at once. auth: session body.remove_source (boolean) returns: 201 Moves started curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/orgs/$OID/storage/moves" GET /v1/orgs/{oid}/storage/policy Where the organization's spaces keep their files auth: session returns: 200 OrgStoragePolicy curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/orgs/$OID/storage/policy" PATCH /v1/orgs/{oid}/storage/policy Set the default storage for new spaces and whether every space must use the organization's storage (admins). Requiring needs a default. auth: session body.default_storage_id (string): One of the organization's storage, or empty for the server's own body.required (boolean) returns: 200 OrgStoragePolicy curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/orgs/$OID/storage/policy" GET /v1/spaces/{sid}/storage Where the space keeps its files, the storage a manager could move it to, and its last move auth: scope: files:read returns: 200 SpaceStorage curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/storage" GET /v1/spaces/{sid}/storage/moves The space's moves, newest first (managers) auth: scope: files:read returns: 200 Moves curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/storage/moves" POST /v1/spaces/{sid}/storage/moves Move the space's files (and its forks') to other storage (a manager who may use it). Copies everything, switches the space over, keeps reading the old storage while older tickets last, then (remove_source) deletes the old copies. The space keeps working throughout. 409 for a fork (move its origin) or when a move is under way. auth: scope: admin body.remove_source (boolean): Delete the old copies once the move is over body.storage_id (string): Where to; empty for the server's own storage returns: 201 StorageMove curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/storage/moves" GET /v1/spaces/{sid}/storage/moves/{mid} auth: scope: files:read returns: 200 StorageMove curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/storage/moves/$MID" POST /v1/spaces/{sid}/storage/moves/{mid}/cancel Stop a move before the switch and delete what it copied (409 after the switch) auth: scope: admin returns: 200 StorageMove curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/storage/moves/$MID/cancel" POST /v1/spaces/{sid}/storage/moves/{mid}/retry Pick a failed move up where it stopped auth: scope: admin returns: 200 StorageMove curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/storage/moves/$MID/retry" GET /v1/storage My storage profiles (never the secret key) auth: session returns: 200 Profiles curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/storage" POST /v1/storage Add a bucket. The gateway first writes, reads, lists and deletes a test object in it; 400 says what failed. auth: session body.access_key (string) body.addressing (string): Override the provider's body.bucket (string) body.endpoint (string): https URL of an S3-compatible service; empty for AWS S3. For r2 the account ID is enough; for oss, cos, b2 and wasabi the region is. body.kind (string) body.name (string) body.prefix (string) body.provider (StorageProvider): Fills in endpoint, region and addressing; guessed from the endpoint when absent body.region (string): For AWS, asked from AWS when empty or wrong; us-east-1 for others when empty body.secret_key (string): Stored sealed; never returned. Required with access_key: the gateway never lends its own credentials. returns: 201 StorageProfile curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/storage" GET /v1/storage/providers The providers the server has presets for auth: session returns: 200 Providers curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/storage/providers" GET /v1/storage/{id} auth: session returns: 200 StorageProfile curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/storage/$ID" PATCH /v1/storage/{id} Rename, or change credentials or region (checked like an add). Kind, endpoint, bucket and prefix are fixed while spaces use it (409). auth: session body.access_key (string) body.addressing (string): Override the provider's body.bucket (string) body.endpoint (string): https URL of an S3-compatible service; empty for AWS S3. For r2 the account ID is enough; for oss, cos, b2 and wasabi the region is. body.kind (string) body.name (string) body.prefix (string) body.provider (StorageProvider): Fills in endpoint, region and addressing; guessed from the endpoint when absent body.region (string): For AWS, asked from AWS when empty or wrong; us-east-1 for others when empty body.secret_key (string): Stored sealed; never returned. Required with access_key: the gateway never lends its own credentials. returns: 200 StorageProfile curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/storage/$ID" DELETE /v1/storage/{id} Remove a profile no space uses (409 otherwise) auth: session returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/storage/$ID" ### shares GET /v1/public/shares/{token} A share link as its visitor sees it (a bearer token, when sent, says who is looking) auth: none ?open (string) returns: 200 PublicShare curl: curl "$SIDESPACE_URL/v1/public/shares/$TOKEN" POST /v1/public/shares/{token}/files Finish sending a file - the gateway's manifest becomes a new file (a request puts it in a folder named after the sender) auth: none body.manifest (Manifest, required) body.name (string, required) body.client_mtime (Timestamp) body.mime (string) body.parent_id (string) returns: 201 The new file curl: curl -X POST -H "Content-Type: application/json" -d '{"manifest":{},"name":"…"}' "$SIDESPACE_URL/v1/public/shares/$TOKEN/files" GET /v1/public/shares/{token}/nodes/{nid} A file or folder under the link, with a folder's contents or a review link's comments auth: none returns: 200 PublicShareNode curl: curl "$SIDESPACE_URL/v1/public/shares/$TOKEN/nodes/$NID" POST /v1/public/shares/{token}/nodes/{nid}/comments Comment on a file of a review link, as the signed-in visitor (401 login_required without a token) auth: none body.body (string, required) body.at_ms (integer) body.parent_id (string): Reply to this comment (a reply to a reply joins the same thread) body.region (Region) body.until_ms (integer): Needs at_ms; not before it body.version_id (string): The version being looked at (default: the current one) returns: 201 Comment curl: curl -X POST -H "Content-Type: application/json" -d '{"body":"…"}' "$SIDESPACE_URL/v1/public/shares/$TOKEN/nodes/$NID/comments" GET /v1/public/shares/{token}/nodes/{nid}/media Where to stream or download a file's bytes (a block gateway address with a ticket) auth: none ?r (string): The poster, or the streaming proxy (the original when there is none) ?download (string): The original returns: 200 The address curl: curl "$SIDESPACE_URL/v1/public/shares/$TOKEN/nodes/$NID/media" GET /v1/public/shares/{token}/nodes/{nid}/zip Where to download a shared folder as one zip (ADR 0044) — a signed address good for 10 minutes; counted as a download auth: none returns: 200 The address curl: curl "$SIDESPACE_URL/v1/public/shares/$TOKEN/nodes/$NID/zip" POST /v1/public/shares/{token}/save Save what a link shares into a space of the signed-in visitor's own auth: none body.node_id (string): A file or folder under the link (default: what it shares) body.space_id (string): Where it goes (default: the caller's first space) returns: 202 The copy has started curl: curl -X POST -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/public/shares/$TOKEN/save" POST /v1/public/shares/{token}/unlock Trade a link's password for its key (send it as X-Share-Key) auth: none body.password (string, required) returns: 200 The key curl: curl -X POST -H "Content-Type: application/json" -d '{"password":"…"}' "$SIDESPACE_URL/v1/public/shares/$TOKEN/unlock" POST /v1/public/shares/{token}/uploads Start sending a file through an upload link or request (signed in) — a ticket for the block gateway (pieces to POST /chunks, ADR 0042; or the whole file to /stream-upload) auth: none body.hashes (string[]): Pieces an earlier try sent; the answer's missing lists those the gateway no longer has. body.parent_id (string): Upload links: the folder (default the shared one). Requests always use their own. returns: 200 UploadSession curl: curl -X POST -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/public/shares/$TOKEN/uploads" GET /v1/public/zips/{ticket} A shared folder as a zip, streamed (from the address the zip endpoint gave) auth: none returns: 200 string curl: curl "$SIDESPACE_URL/v1/public/zips/$TICKET" GET /v1/shared What was shared with the signed-in person by email (direct shares), newest first auth: scope: files:read returns: 200 Shared with me curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/shared" GET /v1/shared/{id} A direct share as the person it was shared with sees it auth: scope: files:read ?open (string) returns: 200 PublicShare curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/shared/$ID" DELETE /v1/shared/{id} Take something shared with you off your list (it is revoked; audit share.left) auth: scope: files:write returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/shared/$ID" GET /v1/shared/{id}/nodes/{nid} A file or folder under a direct share (as /v1/public/shares/{token}/nodes/{nid}) auth: scope: files:read returns: 200 PublicShareNode curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/shared/$ID/nodes/$NID" GET /v1/spaces/{sid}/grants Direct shares of the drive, or of one file or folder (editor) auth: scope: shares:manage ?node_id (string): Only this file or folder's returns: 200 Live direct shares curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/grants" POST /v1/spaces/{sid}/grants Share a file, folder or the whole drive with people by email (editor; folder rules apply) auth: scope: shares:manage body.emails (string[], required) body.role (GrantRole, required) body.expires_at (Timestamp) body.message (string): A note for the mail body.no_mail (boolean): Send no mail (an account is still notified) body.node_id (string): The file or folder; leave out to share the whole drive returns: 201 The direct shares, one per address curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"emails":[],"role":{}}' "$SIDESPACE_URL/v1/spaces/$SID/grants" PATCH /v1/spaces/{sid}/grants/{id} Change a direct share's role (editor; audit share.role_changed) auth: scope: shares:manage body.role (GrantRole, required) returns: 200 Grant curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"role":{}}' "$SIDESPACE_URL/v1/spaces/$SID/grants/$ID" DELETE /v1/spaces/{sid}/grants/{id} Revoke a direct share (editor; audit share.revoked). The person's next request is refused. auth: scope: shares:manage returns: 204 Revoked curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/grants/$ID" GET /v1/spaces/{sid}/shares auth: scope: shares:manage returns: 200 Shares curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/shares" POST /v1/spaces/{sid}/shares Create a link (editor). The token is returned only once. auth: scope: shares:manage body.mode (ShareMode, required) body.node_id (string, required) body.can_comment (boolean): A review link: people with it can comment once signed in body.expires_at (Timestamp) body.message (string): Mode request: details for the senders body.no_download (boolean): Watch-only: no downloads; videos play their streaming proxy, and originals the browser cannot show are not served body.password (string) body.require_login (boolean): People sign in before they see anything body.title (string): Mode request (required there): what files you are asking for returns: 201 CreateShareResponse cli: side share /selects curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"mode":{},"node_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/shares" mcp: share_link {"space":"Film A","path":"/selects","can_comment":true} DELETE /v1/spaces/{sid}/shares/{id} Revoke a link (editor) auth: scope: shares:manage returns: 204 Revoked curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/shares/$ID" POST /v1/spaces/{sid}/shares/{id}/mail Send the link by mail (editor) — up to 20 addresses at a time and 100 a day per account; links made before tokens were kept cannot be mailed (409 link_unavailable); 503 mail_unavailable when the server sends no mail auth: scope: shares:manage body.emails (string[], required): Addresses; an entry may hold several separated by commas or spaces body.message (string): A note shown above the link returns: 200 Sent curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"emails":[]}' "$SIDESPACE_URL/v1/spaces/$SID/shares/$ID/mail" GET /v1/spaces/{sid}/shares/{id}/people Who the link reached (editor) — signed-in visitors who commented, sent files or saved a copy, and accounts made from it, with their email, to invite (ADR 0043) auth: scope: shares:manage returns: 200 People curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/shares/$ID/people" ### spaces GET /v1/space The calling token's own space (a token made for one space) auth: scope: files:read returns: 200 Space curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/space" GET /v1/spaces Every drive I reach: each space I am a member of and its forks, with my role in the space auth: scope: files:read returns: 200 Spaces cli: side spaces curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces" mcp: list_spaces {} python: side.spaces() typescript: await side.spaces() POST /v1/spaces Create a space (the caller becomes its manager) auth: scope: admin body.name (string, required) body.org_id (string): Make it in this organization (an admin there); it goes to the organization's default storage body.storage_id (string): A storage profile to keep its files in: mine, or the organization's. While the server takes payments, a bucket of mine needs a paid plan (403 plan_required): make the space, then send the bucket with its Checkout. returns: 201 Space curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/spaces" GET /v1/spaces/{sid} auth: scope: files:read returns: 200 Space curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID" PATCH /v1/spaces/{sid} Rename, or choose where its files are while it has none (manager) auth: scope: admin body.name (string) body.storage_id (string): A storage profile the caller may use, or empty for the server's own storage. Only while the space has no files (409: move them with POST /v1/spaces/{sid}/storage/moves). While the server takes payments, a person's own bucket needs a paid plan (403 plan_required). returns: 200 Space curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID" DELETE /v1/spaces/{sid} Delete a drive that never held anything (no files, history or forks; 409 otherwise), as S3 DeleteBucket does. An admin of its workspace, or whoever made it if it is a fork. auth: scope: admin returns: 204 Deleted curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID" GET /v1/spaces/{sid}/members auth: scope: files:read returns: 200 Members curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/members" POST /v1/spaces/{sid}/members Invite by email (manager). Creates the user record if needed and sends a space.invited notification. auth: scope: members:manage body.email (string, required) body.role (Role, required) returns: 201 Member curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"email":"…","role":{}}' "$SIDESPACE_URL/v1/spaces/$SID/members" PATCH /v1/spaces/{sid}/members/{uid} Change role (manager). The last manager cannot be demoted. auth: scope: members:manage body.role (Role, required) returns: 200 Member curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"role":{}}' "$SIDESPACE_URL/v1/spaces/$SID/members/$UID" DELETE /v1/spaces/{sid}/members/{uid} Remove a member (manager, or the member themself) auth: scope: members:manage returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/members/$UID" ### comments GET /v1/spaces/{sid}/comments/{cid} auth: scope: files:read returns: 200 Comment curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/comments/$CID" PATCH /v1/spaces/{sid}/comments/{cid} Edit the text (its author), or resolve or reopen a thread (its author, or an editor) auth: scope: comments:write body.body (string) body.resolved (boolean) returns: 200 Comment curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/comments/$CID" DELETE /v1/spaces/{sid}/comments/{cid} Delete (its author, or a manager); a thread's replies go with it auth: scope: comments:write returns: 204 Deleted curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/comments/$CID" GET /v1/spaces/{sid}/nodes/{nid}/comments A file's comment threads, in timecode order, each with its replies auth: scope: files:read ?resolved (string): Include resolved threads returns: 200 Threads curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/comments" mcp: list_comments {"space":"Film A","path":"/cuts/a.mov"} python: side.comments("/cuts/a.mov") typescript: await side.comments("/cuts/a.mov") POST /v1/spaces/{sid}/nodes/{nid}/comments Comment (commenter and up; tokens need comments:write). The person who saved the version, and the author of a comment replied to, are notified. auth: scope: comments:write body.body (string, required) body.at_ms (integer) body.parent_id (string): Reply to this comment (a reply to a reply joins the same thread) body.region (Region) body.until_ms (integer): Needs at_ms; not before it body.version_id (string): The version being looked at (default: the current one) returns: 201 Comment curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"body":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/comments" mcp: add_comment {"space":"Film A","path":"/cuts/a.mov","body":"too dark","at_ms":1500} python: side.add_comment("/cuts/a.mov", "too dark", at_ms=1500) typescript: await side.addComment("/cuts/a.mov", { body: "too dark", at_ms: 1500 }) ### versions POST /v1/spaces/{sid}/download-tickets Get a get-ticket (and, unless manifest is false, the manifest) for a version or one of its renditions auth: scope: files:read body.version_id (string, required) body.manifest (boolean): false leaves the manifest out of the answer: reading through the gateway (GET /files, ranges) does not need it, and a big file's is long body.rendition (string): e.g. thumb, or proxy (the server-made 720p H.264 stream of a video) body.stream (boolean): A ticket for a player: lasts a viewing session (6 h) instead of minutes returns: 200 DownloadTicket curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"version_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/download-tickets" POST /v1/spaces/{sid}/nodes/{nid}/edits Change byte ranges of a file and save it as a new version (editor) auth: scope: files:write ?truncate (integer): With the binary body ?if_version_id (string): With the binary body body.if_version_id (string): The version the offsets are in; must still be the head body.ops (EditOp[]) body.truncate (integer): Cut the result to this many bytes returns: 201 CommitVersionResponse curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/edits" mcp: edit_text {"space":"Film A","path":"/script.md","old_text":"dusk","new_text":"night"} python: side.edit("/script.md", [{"at": 120, "delete": 5, "text": "night"}], if_version_id="ver_…") typescript: await side.edit("/script.md", [{ at: 120, delete: 5, text: "night" }], { ifVersionId: "ver_…" }) GET /v1/spaces/{sid}/nodes/{nid}/versions Version history, newest first auth: scope: files:read returns: 200 Versions cli: side versions /cuts/a.mov curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/versions" mcp: list_versions {"space":"Film A","path":"/cuts/a.mov"} python: side.versions("/cuts/a.mov") typescript: await side.versions("/cuts/a.mov") POST /v1/spaces/{sid}/nodes/{nid}/versions Commit a new version (editor). Last save wins. auth: scope: files:write body.base_version_id (string|null, required) body.manifest (Manifest, required) body.client_mtime (Timestamp) body.if_new (boolean): Save only if the file has no version yet (same as If-None-Match: *) body.if_version_id (string): Save only if the file is still at this version (same as If-Match); else 412 `precondition_failed` body.mime (string) returns: 201 CommitVersionResponse cli: side put ./notes.md /notes.md --if-version ver_… curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"base_version_id":"…","manifest":{}}' "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/versions" mcp: write_text {"space":"Film A","path":"/notes.md","content":"# Notes\n","if_version_id":"ver_…"} python: side.upload("/notes.md", b"# Notes\n", if_version_id="ver_…") typescript: await side.upload("/notes.md", "# Notes\n", { ifVersionId: "ver_…" }) POST /v1/spaces/{sid}/upload-sessions Ask which chunks the block gateway is missing and get a put ticket (editor) auth: scope: files:write or renditions:write body.hashes (Hash[], required) returns: 200 UploadSession curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"hashes":[]}' "$SIDESPACE_URL/v1/spaces/$SID/upload-sessions" GET /v1/spaces/{sid}/versions/{vid}/compare/{other} What differs from one version to another (of one file or two files in the space) auth: scope: files:read returns: 200 VersionCompare curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/compare/$OTHER" PUT /v1/spaces/{sid}/versions/{vid}/label Name a version ("Client cut"), or clear its name with "" (editor) auth: scope: files:write body.label (string, required) returns: 200 VersionInfo curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"label":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/label" POST /v1/spaces/{sid}/versions/{vid}/restore Copy an old version as the new head (editor) auth: scope: files:write returns: 201 CommitVersionResponse cli: side restore ver_… curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/restore" mcp: restore_version {"space":"Film A","version_id":"ver_…"} python: side.restore_version("ver_…") typescript: await side.restoreVersion("ver_…") ### forks POST /v1/spaces/{sid}/fork/apply Bring a fork's changes back (editor and up) auth: scope: files:write body.dry_run (boolean) body.force (boolean): Also replace the original's newer versions body.paths (string[]): Only changes at or under these paths (fork or original paths) returns: 200 What happened to each change curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/fork/apply" mcp: apply_fork {"fork":"Film A (agent)","dry_run":true} python: side.space("Film A (agent)").apply_fork(dry_run=True) typescript: await side.space("Film A (agent)").applyFork({ dryRun: true }) GET /v1/spaces/{sid}/fork/changes How a fork differs from the space it came from auth: scope: files:read returns: 200 Changes in path order cli: side fork changes "Film A (agent)" curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/fork/changes" mcp: fork_changes {"fork":"Film A (agent)"} python: side.space("Film A (agent)").fork_changes() typescript: await side.space("Film A (agent)").forkChanges() POST /v1/spaces/{sid}/fork/copy/retry Try a failed copy again (a manager of the space, or whoever made the fork) auth: scope: files:write returns: 204 Copying again curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/fork/copy/retry" GET /v1/spaces/{sid}/forks The forks of a space (any member of it) auth: scope: files:read returns: 200 Forks curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/forks" POST /v1/spaces/{sid}/forks Fork the space (editor and up); the fork is a further drive of the same space, with its members and plan auth: scope: files:write body.name (string, required) body.copy (boolean): Take an own copy of the files in the background, so the fork stops depending on the original. It is usable at once and shares the files until the copy is done (see fork.copy) body.path (string): Only this folder of the space (default all of it) body.storage_id (string): With copy: where the fork keeps its files, a storage profile id or "server" for the server's own storage. Omitted: the original's storage returns: 201 Space cli: side fork create "Film A (agent)" --path /cuts curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/forks" mcp: fork_space {"space":"Film A","name":"Film A (agent)","path":"/cuts"} python: side.fork("Film A (agent)", path="/cuts") typescript: await side.fork("Film A (agent)", { path: "/cuts" }) ### sync GET /v1/spaces/{sid}/journal Changes after a seq, strictly ordered and gap-free auth: scope: files:read or events:read ?after (integer) ?limit (integer) returns: 200 JournalPage cli: side events tail curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/journal" mcp: recent_changes {"space":"Film A"} python: side.journal(after_seq) typescript: await side.journal(afterSeq) GET /v1/spaces/{sid}/snapshot Full listing of live nodes for the first sync; read the journal after the first page's at_seq auth: scope: files:read or events:read ?cursor (string) ?limit (integer) returns: 200 SnapshotPage curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/snapshot" GET /v1/ws WebSocket for realtime signals (see proto/ws.md). Auth by bearer header or `?access_token=`. auth: scope: events:read or files:read curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/ws" ### sidecars GET /v1/spaces/{sid}/namespaces Sidecar namespaces that one member alone writes in this space auth: scope: files:read returns: 200 Owned namespaces curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/namespaces" PUT /v1/spaces/{sid}/namespaces/{ns} Let only this member write the namespace here (manager). ai.generation or a custom x-… namespace. auth: scope: admin body.owner_id (string, required) returns: 200 NamespaceOwner curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"owner_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/namespaces/$NS" DELETE /v1/spaces/{sid}/namespaces/{ns} Let every editor write the namespace again (manager) auth: scope: admin returns: 204 Released curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/namespaces/$NS" GET /v1/spaces/{sid}/versions/{vid}/media Where the server is with a version's previews (proxy, poster, filmstrip, waveform), with time left auth: scope: files:read returns: 200 MediaStatus curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/media" GET /v1/spaces/{sid}/versions/{vid}/renditions/{kind} auth: scope: files:read returns: 200 Rendition curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/renditions/$KIND" PUT /v1/spaces/{sid}/versions/{vid}/renditions/{kind} Attach a derived file (chunks uploaded through an upload session first) auth: scope: renditions:write body.manifest (Manifest, required) body.mime (string, required) returns: 200 Rendition curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"manifest":{},"mime":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/renditions/$KIND" GET /v1/spaces/{sid}/versions/{vid}/sidecars auth: scope: files:read returns: 200 Sidecars curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars" mcp: get_sidecar {"space":"Film A","path":"/cuts/a.mov","namespace":"ai.tags"} python: side.sidecars("/cuts/a.mov") typescript: await side.sidecars("/cuts/a.mov") GET /v1/spaces/{sid}/versions/{vid}/sidecars/{ns} auth: scope: files:read returns: 200 Sidecar curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS" PUT /v1/spaces/{sid}/versions/{vid}/sidecars/{ns} Write a whole sidecar (editor) auth: scope: sidecars:write:ns body.doc (object, required) body.producer (object) body.rev (integer): The rev read (0: none yet); a stale one is refused with 409 stale_rev body.schema_version (integer) returns: 200 Sidecar curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"doc":{}}' "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS" mcp: put_sidecar {"space":"Film A","path":"/cuts/a.mov","namespace":"x-acme.qc","doc":{"passed":true}} python: side.put_sidecar("/cuts/a.mov", "x-acme.qc", {"passed": True}) typescript: await side.putSidecar("/cuts/a.mov", "x-acme.qc", { passed: true }) PATCH /v1/spaces/{sid}/versions/{vid}/sidecars/{ns} Change fields of a sidecar (editor) auth: scope: sidecars:write:ns body.ops (object[], required) body.producer (object) body.rev (integer) body.schema_version (integer) returns: 200 Sidecar curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"ops":[]}' "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS" DELETE /v1/spaces/{sid}/versions/{vid}/sidecars/{ns} Remove a sidecar, with its revisions (editor) auth: scope: sidecars:write:ns returns: 204 Deleted curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS" PUT /v1/spaces/{sid}/versions/{vid}/sidecars/{ns}/current Make a revision the current one (editor), e.g. take the new AI transcript over a person's; the index follows auth: scope: sidecars:write:ns body.revision_id (string, required) body.rev (integer): The sidecar rev read; 409 stale_rev when it changed returns: 200 Sidecar curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"revision_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS/current" GET /v1/spaces/{sid}/versions/{vid}/sidecars/{ns}/revisions The revisions of a sidecar people correct (transcript), newest first (ADR 0060) auth: scope: files:read returns: 200 Revisions curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS/revisions" GET /v1/spaces/{sid}/versions/{vid}/sidecars/{ns}/revisions/{rid} One revision, with its document auth: scope: files:read returns: 200 SidecarRevision curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/versions/$VID/sidecars/$NS/revisions/$RID" ### nodes POST /v1/spaces/{sid}/nodes Create a folder or an empty file (editor). A clashing name gets a " (2)" suffix; the response has the final name. auth: scope: files:write body.kind (NodeKind, required) body.name (string, required) body.parent_id (string, required) body.if_exists (string): When a live sibling has the same name (case-insensitive): `rename` creates "name (2).ext"; `reuse` returns the existing node of the same kind; `fail` (or `If-None-Match: *`) answers 412 `precondition_failed` with the existing `node_id`. Sync clients use `reuse` so concurrent creates of one path converge on one file (last save wins, both saves in its history). returns: 201 NodeInfo cli: side mkdir /cuts/v2 curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"kind":{},"name":"…","parent_id":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/nodes" mcp: make_folder {"space":"Film A","path":"/cuts/v2"} python: side.mkdir("/cuts/v2") typescript: await side.mkdir("/cuts/v2") GET /v1/spaces/{sid}/nodes/{nid} A node now, or with as_of as it was then auth: scope: files:read ?as_of (string): Read the space as it was: an RFC 3339 time, a duration ago ("-2h", "-90m"), or a journal seq. The answer's Sidespace-As-Of-Seq header names the last change included. Versions are kept until a file is deleted for good, so a past head_version_id can be downloaded as usual. returns: 200 NodeInfo curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID" PATCH /v1/spaces/{sid}/nodes/{nid} Rename and/or move (editor) auth: scope: files:write body.if_version_id (string): Rename or move only if the file is still at this version body.name (string) body.parent_id (string) returns: 200 NodeInfo cli: side mv /cuts/a.mov /selects/a.mov curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID" mcp: move {"space":"Film A","path":"/cuts/a.mov","to":"/selects/a.mov"} DELETE /v1/spaces/{sid}/nodes/{nid} Soft-delete a node and everything under it (editor); restorable for 30 days auth: scope: files:write returns: 200 NodeInfo cli: side rm /old.md curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID" mcp: delete {"space":"Film A","path":"/old.md"} python: side.remove("/old.md", if_version_id="ver_…") typescript: await side.remove("/old.md", { ifVersionId: "ver_…" }) GET /v1/spaces/{sid}/nodes/{nid}/children Live children ordered by name; with as_of, the children it had then (all of them, one page) auth: scope: files:read ?cursor (string) ?limit (integer) ?as_of (string): Read the space as it was: an RFC 3339 time, a duration ago ("-2h", "-90m"), or a journal seq. The answer's Sidespace-As-Of-Seq header names the last change included. Versions are kept until a file is deleted for good, so a past head_version_id can be downloaded as usual. returns: 200 NodePage cli: side ls /cuts curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/children" mcp: list_folder {"space":"Film A","path":"/cuts"} python: side.list("/cuts") typescript: await side.list("/cuts") POST /v1/spaces/{sid}/nodes/{nid}/restore Undo a soft delete (editor) auth: scope: files:write returns: 200 NodeInfo curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/restore" POST /v1/spaces/{sid}/nodes/{nid}/rewind Put a folder back the way it was at a moment (editor) auth: scope: files:write body.as_of (string, required): An RFC 3339 time, a duration ago ("-2h") or a journal seq body.dry_run (boolean) returns: 200 RewindResult cli: side rewind /Ep01 --to -2h --dry-run curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"as_of":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/rewind" mcp: rewind_folder {"space":"Film A","path":"/Ep01","as_of":"-2h","dry_run":true} python: side.rewind("/Ep01", "-2h", dry_run=True) typescript: await side.rewind("/Ep01", "-2h", { dryRun: true }) GET /v1/spaces/{sid}/nodes/{nid}/size What a folder (or file) weighs, originals and video proxies, for an offline estimate auth: scope: files:read returns: 200 FolderSize curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/nodes/$NID/size" GET /v1/spaces/{sid}/paths/{path} The live file or folder at a path, or with as_of what was there then auth: scope: files:read ?as_of (string): Read the space as it was: an RFC 3339 time, a duration ago ("-2h", "-90m"), or a journal seq. The answer's Sidespace-As-Of-Seq header names the last change included. Versions are kept until a file is deleted for good, so a past head_version_id can be downloaded as usual. returns: 200 NodeInfo cli: side ls /cuts/a.mov curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/paths/cuts/a.mov" python: side.node("/cuts/a.mov") typescript: await side.node("/cuts/a.mov") ### realtime GET /v1/spaces/{sid}/presence Who is viewing or editing which file in the space now (also pushed over /v1/ws as type "presence") auth: scope: files:read returns: 200 Live reports curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/presence" POST /v1/spaces/{sid}/presence Report this device's activity on a file (member). A report lasts 90 s unless renewed; "none" ends it. auth: scope: files:read body.node_id (string, required) body.state (string, required) returns: 200 Presence curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"node_id":"…","state":"…"}' "$SIDESPACE_URL/v1/spaces/$SID/presence" GET /v1/spaces/{sid}/shelf The team shelf, newest first (items fade after a week; changes are pushed over /v1/ws as type "shelf") auth: scope: files:read returns: 200 Items curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/shelf" POST /v1/spaces/{sid}/shelf Put a note, a link (commenter) or a file or folder of the space (editor) on the shelf auth: scope: files:write body.node_id (string) body.text (string) returns: 201 ShelfItem curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/spaces/$SID/shelf" DELETE /v1/spaces/{sid}/shelf/{iid} Take an item off the shelf (who put it there, or a manager); a file stays in the space auth: scope: files:write returns: 204 Removed curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/spaces/$SID/shelf/$IID" ### workspaces GET /v1/workspaces Your workspaces, the default one first auth: scope: files:read returns: 200 Workspaces curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces" POST /v1/workspaces Make a workspace with you as its owner, on the free plan and the server's default storage (people only) auth: scope: admin body.name (string, required) body.description (string) body.storage_id (string): A bucket of yours (refused while the server takes payments: a new workspace is on the free plan) returns: 201 Workspace curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/workspaces" GET /v1/workspaces/{wid} A workspace (also while locked) auth: scope: files:read returns: 200 Workspace curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID" PATCH /v1/workspaces/{wid} Rename or describe it (an admin; also while locked) auth: scope: admin body.description (string) body.name (string) returns: 200 Workspace curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID" GET /v1/workspaces/{wid}/audit Audit export (an admin), as under /v1/orgs/{oid}/audit auth: scope: admin ?since (string): RFC 3339 or YYYY-MM-DD; default 30 days before until ?until (string): Default now ?format (string) returns: 200 AuditRecord curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/audit" POST /v1/workspaces/{wid}/checkout Buy a plan through Stripe Checkout (an owner or admin; also while locked). Answers the page to open. auth: scope: files:write body.plan_id (string, required) body.interval (string) returns: 200 Checkout page curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"plan_id":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/checkout" GET /v1/workspaces/{wid}/drives Its drives you reach auth: scope: files:read returns: 200 Drives curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/drives" POST /v1/workspaces/{wid}/drives Make a drive (an admin), on the workspace's storage auth: scope: admin body.name (string, required) returns: 201 Space curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/drives" GET /v1/workspaces/{wid}/events Its audit log, newest first (an admin) auth: scope: admin ?before (integer) ?limit (integer) returns: 200 Events curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/events" GET /v1/workspaces/{wid}/members auth: scope: files:read returns: 200 People curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/members" POST /v1/workspaces/{wid}/members Invite by email (an admin; only an owner adds owners). The plan's member limit applies; Individual is one person (402 quota_exceeded). auth: scope: members:manage body.email (string, required) body.role (WorkspaceRole) returns: 201 Member curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"email":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/members" PATCH /v1/workspaces/{wid}/members/{uid} Change someone's own role (an admin; owners by an owner). A workspace keeps an owner. auth: scope: members:manage body.role (WorkspaceRole, required) returns: 200 Member curl: curl -X PATCH -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"role":{}}' "$SIDESPACE_URL/v1/workspaces/$WID/members/$UID" DELETE /v1/workspaces/{wid}/members/{uid} Remove someone (an admin; an owner for an owner), or leave (me). auth: scope: members:manage returns: 204 Done curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/members/$UID" GET /v1/workspaces/{wid}/plan Its plan, limits and usage (any member; also while locked) auth: scope: files:read returns: 200 Account curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/plan" POST /v1/workspaces/{wid}/portal Open Stripe's billing portal (an owner or admin; also while locked); with plan_id, straight to switching to it auth: scope: files:write body.interval (string) body.plan_id (string) returns: 200 Portal page curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/portal" GET /v1/workspaces/{wid}/retention How long versions and the trash are kept (an admin) auth: scope: admin returns: 200 Retention curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/retention" PUT /v1/workspaces/{wid}/retention Change how long versions and the trash are kept (an owner) auth: scope: admin body.versions (string, required): all: keep every version; days: keep versions saved in the last keep_days days; count: keep each file's newest keep_last body.keep_days (integer) body.keep_last (integer) body.trash_days (integer): Days deleted files stay restorable returns: 200 Retention curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"versions":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/retention" GET /v1/workspaces/{wid}/sso Single sign-on settings (an admin), as under /v1/orgs/{oid}/sso. A 404 still names the redirect URI and the DNS proof. auth: scope: admin returns: 200 SSOConfig curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/sso" PUT /v1/workspaces/{wid}/sso Connect an OpenID Connect or SAML 2.0 identity provider for email domains (an owner), as under /v1/orgs/{oid}/sso auth: scope: admin body.domains (string[], required) body.client_id (string) body.client_secret (string) body.domain_proof (string): Value of the DNS TXT record _sidespace. body.idp_certificate_expires_at: SAML: when the soonest signing certificate in the metadata expires body.idp_metadata (string): SAML: the identity provider's metadata XML body.idp_metadata_url (string): SAML: where to fetch the metadata (https; fetched again daily) body.idp_sso_url (string): SAML: the sign-in URL the metadata names (HTTP-Redirect) body.issuer (string): OpenID Connect: the issuer URL. SAML: the identity provider's entity ID, read from its metadata body.protocol (string) body.redirect_uri (string): Register it with the provider body.required (boolean): Email codes stop working for these domains body.saml_acs_url (string): SAML: the assertion consumer service URL (HTTP-POST) to register body.saml_entity_id (string): SAML: the service provider entity ID (and metadata URL) to register body.updated_at (Timestamp) returns: 200 SSOConfig curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"domains":[]}' "$SIDESPACE_URL/v1/workspaces/$WID/sso" DELETE /v1/workspaces/{wid}/sso Turn single sign-on off (an owner) auth: scope: admin returns: 204 Done curl: curl -X DELETE -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/sso" GET /v1/workspaces/{wid}/storage Its backend and its own buckets (any member; admins see access keys) auth: scope: files:read returns: 200 Storage curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/storage" PUT /v1/workspaces/{wid}/storage Make one of its own buckets its backend for new drives (an admin; a paid plan while the server takes payments) auth: session body.storage_id (string, required) returns: 200 Storage curl: curl -X PUT -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"storage_id":"…"}' "$SIDESPACE_URL/v1/workspaces/$WID/storage" POST /v1/workspaces/{wid}/storage/buckets Add a bucket of the workspace's own (an admin), checked through the block gateway auth: session body.access_key (string) body.addressing (string): Override the provider's body.bucket (string) body.endpoint (string): https URL of an S3-compatible service; empty for AWS S3. For r2 the account ID is enough; for oss, cos, b2 and wasabi the region is. body.kind (string) body.name (string) body.prefix (string) body.provider (StorageProvider): Fills in endpoint, region and addressing; guessed from the endpoint when absent body.region (string): For AWS, asked from AWS when empty or wrong; us-east-1 for others when empty body.secret_key (string): Stored sealed; never returned. Required with access_key: the gateway never lends its own credentials. returns: 201 StorageProfile curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{}' "$SIDESPACE_URL/v1/workspaces/$WID/storage/buckets" GET /v1/workspaces/{wid}/tokens Your tokens limited to this workspace (signed-in apps only) auth: session returns: 200 Tokens curl: curl -H "Authorization: Bearer $SIDESPACE_TOKEN" "$SIDESPACE_URL/v1/workspaces/$WID/tokens" POST /v1/workspaces/{wid}/tokens Make a token for this workspace (optionally only some drives, drive_ids); body as POST /v1/tokens without space_ids auth: session body.name (string, required) body.scopes (string[], required) body.agent_id (string) body.drive_ids (string[]) body.expires_in_days (integer) body.s3 (boolean) returns: 201 The token (shown once) curl: curl -X POST -H "Authorization: Bearer $SIDESPACE_TOKEN" -H "Content-Type: application/json" -d '{"name":"…","scopes":[]}' "$SIDESPACE_URL/v1/workspaces/$WID/tokens"