Spaces API
Publishing files as versions, reading them, comments and the space database.
All paths are relative to the API origin. Send Authorization: Bearer <token> unless a route says otherwise; see the API overview for tokens and errors.
POST /v1/comments/:id/report
Signed in, can see the comment; keeps a copy and tells staff (Discord, REPORTS_EMAIL); 400 your own comment
Body
| Field | Type | Required | Notes |
|---|---|---|---|
reason | "spam" | "abuse" | "other" | yes | |
note | string | no |
Response: 204, no body
POST /v1/spaces/:id/report
Signed in, can see the space; keeps a copy of its name and tells staff
Body
| Field | Type | Required | Notes |
|---|---|---|---|
reason | "spam" | "abuse" | "other" | yes | |
note | string | no |
Response: 204, no body
GET /v1/spaces
?workspace=<slug>: that workspace's spaces you can see (unknown slug: empty); else all you can push to. ?status=active (default, no archived), archived, or trash (what you may restore); each with your favorite and openedAt
Query
| Field | Type | Required | Notes |
|---|---|---|---|
workspace | string | no | |
status | "active" | "archived" | "trash" | no (default "active") |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
spaces | object[] | yes |
GET /v1/spaces/find
?q=<words>&workspace=<slug>&status=active archived: spaces you can see (active by default) whose name or page titles match, best first; strong = close enough to publish into (topicMatch); page/pagePath = the page whose title matched at least as well as the name
Query
| Field | Type | Required | Notes |
|---|---|---|---|
q | string | yes | |
workspace | string | no | |
limit | integer | no (default 10) | |
status | "active" | "archived" | no (default "active") |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
spaces | object[] | yes |
POST /v1/spaces
Body
| Field | Type | Required | Notes |
|---|---|---|---|
workspace | string | yes | |
name | string | yes | |
visibility | "public" | "members" | no (default "members") | |
folderId | string | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
GET /v1/spaces/:id
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
PATCH /v1/spaces/:id
Slug: 2-60 lowercase letters, numbers and single dashes; 409 when another space has it now or had it before; the old link (cloudy.page/<old>/) 301s to the new one, or to the id link; a new slug (custom link) where the space had none: 403 plan_limit when the workspace is at its custom-link cap (default 1, staff raise it per workspace); renaming or removing one is never capped
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | no | |
icon | string | null | no | |
visibility | "public" | "members" | no | |
guestComments | boolean | no | |
guestWrites | boolean | no | |
viewers | object | no | |
password | string | null | no | |
slug | null | string | no | |
searchIndexed | boolean | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
GET /v1/spaces/:id/custom-links
Admin; the workspace's custom links on the pages host: used and cap (null = no cap)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
used | integer | yes | |
cap | integer | null | yes |
DELETE /v1/spaces/:id
A person only (the website or the app; CLI, MCP and agents: 403, they archive instead); admin of its workspace, a live space owner, or its maker; moves it to the Trash for TRASH_DAYS (its link stops working), then it's deleted for good with its apps; forever=1 on a space in the Trash deletes it now; 400 for an app preview
Request: ?forever=1
Response: 204, no body
POST /v1/spaces/:id/restore
Whoever may delete it (agents too); out of the Trash as it was; 404 for anyone else
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
POST /v1/spaces/:id/archive
Push (agents too); out of every list, the link keeps working; a new version brings it back
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
POST /v1/spaces/:id/unarchive
Push
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
PUT /v1/spaces/:id/favorite
View; adds it to the end of your favorites
Response: 204, no body
DELETE /v1/spaces/:id/favorite
Signed in; takes it off your favorites
Response: 204, no body
POST /v1/spaces/:id/opened
View; you opened it (your Recent); ignored for CLI, MCP and agents
Response: 204, no body
PUT /v1/spaces/:id/folder
View + edit the workspace (agents too); lists it in a folder (null: the top level); never changes its link or who can open it
Body
| Field | Type | Required | Notes |
|---|---|---|---|
folderId | string | null | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
workspace | object | yes | |
visibility | "public" | "members" | yes | |
guestComments | boolean | yes | |
guestWrites | boolean | yes | |
viewers | object | yes | |
passwordProtected | boolean | yes (default false) | |
latestVersion | integer | yes | |
path | string | yes | |
url | string | yes | |
shareUrl | string | null | yes | |
slug | string | null | no | |
searchIndexed | boolean | no | |
kind | "repo" | "live" | "app" | yes (default "repo") | |
permissions | object | yes | |
createdAt | number | yes | |
createdBy | string | no | |
updatedAt | number | null | no | |
snapshotUrl | string | null | no | |
archivedAt | number | null | no | |
project | string | null | no | |
deletedAt | number | null | no | |
favorite | integer | null | no | |
openedAt | number | null | no | |
icon | string | null | no | |
folderId | string | null | no | |
mergedInto | object | null | no |
POST /v1/spaces/:id/merge
Push on both (agents too); it becomes a page of into and is archived, its links open the page; 409 with comments, uploads or data
Body
| Field | Type | Required | Notes |
|---|---|---|---|
into | string | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
space | object | yes | |
page | string | yes |
POST /v1/spaces/:id/move
Owner of both workspaces; a live space takes its apps along; links don't change; 400 for an app preview
Body
| Field | Type | Required | Notes |
|---|---|---|---|
workspace | string | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
space | object | yes | |
moved | string[] | yes |
GET /v1/spaces/:id/head
- liveUrl
Response
| Field | Type | Required | Notes |
|---|---|---|---|
latestVersion | integer | yes | |
commentsUpdatedAt | number | yes | |
reactions | integer | yes (default 0) | |
reactionsUpdatedAt | number | yes (default 0) | |
uploads | integer | yes (default 0) | |
uploadsUpdatedAt | number | yes (default 0) | |
liveUrl | string | no |
GET /v1/spaces/:id/page
View; the website's space page in one read: me, the space, head, folders, and with ?path= that page (its file, comments, linked Discord threads)
Query
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | no | |
v | string | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
me | object | null | yes | |
space | object | yes | |
head | object | yes | |
folders | object[] | yes | |
doc | object | null | yes |
GET /v1/spaces/:id/capabilities
View; what pages can do here (packages/contract/src/capabilities.ts) and whether each is on
Response
| Field | Type | Required | Notes |
|---|---|---|---|
capabilities | object[] | yes |
PUT /v1/spaces/:id/capabilities/:capability
Admin; switch capabilities only (others: PATCH /v1/spaces/:id); 403 for a preview not turned on for the space
Body
| Field | Type | Required | Notes |
|---|---|---|---|
on | boolean | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
capabilities | object[] | yes |
GET /v1/spaces/:id/rules
View; the agent rules for this space: its own and its workspace's, with your own switch. enabled: false and none while the feature is off for the workspace
Response
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes | |
rules | object[] | yes |
POST /v1/spaces/:id/rules
Push (agents too); a rule for this space; 409 when the name is taken; 404 while the feature is off
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | |
when | string | no (default "") | |
do | string | yes | |
skill | string | null | no | |
enabled | boolean | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes | |
rules | object[] | yes |
PATCH /v1/spaces/:id/rules/:name
Push (agents too); a new wording starts a new version
Body
| Field | Type | Required | Notes |
|---|---|---|---|
when | string | no | |
do | string | no | |
skill | string | null | no | |
enabled | boolean | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes | |
rules | object[] | yes |
DELETE /v1/spaces/:id/rules/:name
Push (agents too)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes | |
rules | object[] | yes |
PUT /v1/spaces/:id/rules/:ruleId/me
View, signed in; your own switch for a space or workspace rule (null: follow the space)
Body
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | null | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes | |
rules | object[] | yes |
POST /v1/spaces/:id/rules/stats
View, signed in; counts from one session (the CLI's hook): sent, fit, followed, corrected, tokens; never any words
Body
| Field | Type | Required | Notes |
|---|---|---|---|
rows | object[] | yes | |
session | object | no |
Response: 204, no body
GET /v1/spaces/:id/rules/stats
View; per rule and per day for ?days= (1-90, default 7); people lists everyone for admins, only you for others
Query
| Field | Type | Required | Notes |
|---|---|---|---|
days | integer | no (default 7) |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes | |
days | number | yes | |
sessions | number | yes | |
sessionTokens | number | yes | |
rules | object[] | yes | |
daily | object[] | yes | |
people | object[] | yes |
POST /v1/spaces/:id/unlock
Public space with a password; 401 wrong, 429 too many tries (PRD 013)
Body
| Field | Type | Required | Notes |
|---|---|---|---|
password | string | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
token | string | yes | |
exp | integer | yes |
POST /v1/spaces/:id/views
View; the app's beacon; not counted for people who can push
Body
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | yes | |
version | integer | null | no | |
referrer | string | null | no |
Response: 204, no body
POST /v1/spaces/:id/seen
View; the website's page view: the view (with path), your Recent and your read of the comments, written after it answers
Body
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | null | no | |
version | integer | null | no | |
referrer | string | null | no |
Response: 204, no body
GET /v1/spaces/:id/visitors
Push; views, visitors, people, last 90 days max
Query
| Field | Type | Required | Notes |
|---|---|---|---|
days | integer | no (default 30) |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
days | integer | yes | |
views | integer | yes | |
visitors | integer | yes | |
returning | integer | yes | |
signedIn | integer | yes | |
daily | object[] | yes | |
countries | object[] | yes | |
referrers | object[] | yes | |
pages | object[] | yes | |
people | object[] | yes | |
guests | object[] | yes | |
recent | object[] | yes |
POST /v1/spaces/:id/push/plan
Prefix: the files replace only that folder (adding a page); the rest of the latest version stays
Body
| Field | Type | Required | Notes |
|---|---|---|---|
files | object[] | yes | |
prefix | string | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
baseVersion | integer | yes | |
missing | string[] | yes | |
diff | object | yes |
PUT /v1/spaces/:id/blobs/:sha256
Server verifies the hash
Request: raw file bytes
Response: 204, no body
POST /v1/spaces/:id/versions
409 if a listed blob is missing; prefix as in push/plan
Body
| Field | Type | Required | Notes |
|---|---|---|---|
files | object[] | yes | |
message | string | no | |
baseVersion | integer | no | |
prefix | string | no | |
project | string | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
version | object | null | yes | |
diff | object | yes | |
url | string | yes |
GET /v1/spaces/:id/versions
Newest first
Response
| Field | Type | Required | Notes |
|---|---|---|---|
versions | object[] | yes |
GET /v1/spaces/:id/versions/:n
N = number or "latest"
Response
| Field | Type | Required | Notes |
|---|---|---|---|
version | object | yes | |
files | object[] | yes | |
diff | object | yes | |
pagePictures | object | no |
GET /v1/spaces/:id/files/*path
Request: ?v=<n>
Response
| Field | Type | Required | Notes |
|---|---|---|---|
versionNumber | integer | yes | |
file | object | yes | |
content | string | yes | |
rawUrl | string | null | yes |
GET /v1/spaces/:id/history/*path
Response
| Field | Type | Required | Notes |
|---|---|---|---|
entries | object[] | yes |
GET /v1/spaces/:id/download/*path
View; attachment (PRD 012)
Request: ?v=<n>
Response: file bytes
GET /v1/spaces/:id/download-link/*path
View; 5-minute /dl/<ticket> link for browsers
Request: ?v=<n>
Response
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes | |
expiresAt | number | yes |
GET /v1/spaces/:id/uploads
CanSeeFiles; newest first (PRD 012)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
uploads | object[] | yes |
POST /v1/spaces/:id/uploads
Push; Content-Length required, MAX_UPLOAD_BYTES; streamed to our storage
Request: raw bytes, ?name=
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
size | integer | yes | |
sha256 | string | yes | |
contentType | string | yes | |
uploadedBy | object | null | yes | |
createdAt | number | yes |
GET /v1/spaces/:id/uploads/:uploadId/raw
CanSeeFiles; attachment, nosniff, sandbox CSP, x-content-sha256
Response: file bytes
GET /v1/spaces/:id/uploads/:uploadId/link
CanSeeFiles; 5-minute /dl/<ticket> link for browsers
Response
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes | |
expiresAt | number | yes |
DELETE /v1/spaces/:id/uploads/:uploadId
Push
Response: 204, no body
GET /v1/spaces/:id/notifications
View; whether you muted the space
Response
| Field | Type | Required | Notes |
|---|---|---|---|
muted | boolean | yes |
PUT /v1/spaces/:id/notifications
View; muted: no push and no comment email from it, except comments that @mention you
Body
| Field | Type | Required | Notes |
|---|---|---|---|
muted | boolean | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
muted | boolean | yes |
GET /v1/spaces/:id/comments
Query
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | no | |
status | "open" | "resolved" | "all" | no (default "open") | |
peek | "1" | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
threads | object[] | yes |
POST /v1/spaces/:id/comments
Signed in + canComment, or a guest when the space allows guest comments (20 per ip per 10 min); images attaches up to 4 uploaded images; @handles tell those people if they can see the space (not from guests); an id the client picked makes a repeat return the comment already made; parentId may be a reply, which the new one nests under (replyToId)
Body
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | no | |
path | string | yes | |
body | string | yes | |
quote | string | no | |
anchor | object | no | |
parentId | string | no | |
versionNumber | integer | no | |
images | string[] | no | |
guest | object | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
path | string | yes | |
versionNumber | integer | yes | |
parentId | string | null | yes | |
replyToId | string | null | yes (default null) | |
author | object | yes | |
guestName | string | null | yes | |
origin | object | null | yes | |
body | string | yes | |
images | object[] | yes (default []) | |
quote | string | null | yes | |
anchor | object | null | yes | |
via | string | null | yes | |
resolvedAt | number | null | yes | |
resolvedBy | object | null | yes | |
resolvedVia | string | null | yes | |
resolvedVersion | number | null | yes (default null) | |
editedAt | number | null | yes | |
editedBy | object | null | yes | |
editedVia | string | null | yes | |
revisions | integer | yes | |
reactions | object[] | yes (default []) | |
createdAt | number | yes |
GET /v1/spaces/:id/mention-people
Signed in + canComment; up to 8 people who can see the space: workspace members and commenters (only commenters for someone outside the workspace)
Query
| Field | Type | Required | Notes |
|---|---|---|---|
q | string | no (default "") |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
people | object[] | yes |
POST /v1/spaces/:id/comment-images
CanComment, or a guest (key in x-cloudtifact-guest-key) where guest comments are on; PNG/JPEG/GIF/WebP by magic bytes, 2 MB, at most 4096 px a side, 20 per hour per ip and per uploader
Request: raw image bytes
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
url | string | yes | |
contentType | string | yes | |
size | integer | yes |
GET /v1/spaces/:id/comment-images/:imageId
No auth: the random id is the grant; sniffed Content-Type, immutable, nosniff, sandbox CSP
Response: image bytes
PATCH /v1/comments/:id
Author only (a guest: with their key); old text kept as a revision; only newly @mentioned people are told
Body
| Field | Type | Required | Notes |
|---|---|---|---|
body | string | yes | |
guest | object | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
path | string | yes | |
versionNumber | integer | yes | |
parentId | string | null | yes | |
replyToId | string | null | yes (default null) | |
author | object | yes | |
guestName | string | null | yes | |
origin | object | null | yes | |
body | string | yes | |
images | object[] | yes (default []) | |
quote | string | null | yes | |
anchor | object | null | yes | |
via | string | null | yes | |
resolvedAt | number | null | yes | |
resolvedBy | object | null | yes | |
resolvedVia | string | null | yes | |
resolvedVersion | number | null | yes (default null) | |
editedAt | number | null | yes | |
editedBy | object | null | yes | |
editedVia | string | null | yes | |
revisions | integer | yes | |
reactions | object[] | yes (default []) | |
createdAt | number | yes |
DELETE /v1/comments/:id
Author (a guest: with their key), or canPush; a thread goes with its replies; a reply's answers move up to what it answered
Body
| Field | Type | Required | Notes |
|---|---|---|---|
guest | object | no |
Response: 204, no body
GET /v1/comments/:id/revisions
Every version, oldest first (empty if never edited)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
revisions | object[] | yes |
POST /v1/comments/:id/resolve
Thread author, or canPush on the space (403 otherwise)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
path | string | yes | |
versionNumber | integer | yes | |
parentId | string | null | yes | |
replyToId | string | null | yes (default null) | |
author | object | yes | |
guestName | string | null | yes | |
origin | object | null | yes | |
body | string | yes | |
images | object[] | yes (default []) | |
quote | string | null | yes | |
anchor | object | null | yes | |
via | string | null | yes | |
resolvedAt | number | null | yes | |
resolvedBy | object | null | yes | |
resolvedVia | string | null | yes | |
resolvedVersion | number | null | yes (default null) | |
editedAt | number | null | yes | |
editedBy | object | null | yes | |
editedVia | string | null | yes | |
revisions | integer | yes | |
reactions | object[] | yes (default []) | |
createdAt | number | yes |
POST /v1/comments/:id/unresolve
Thread author, or canPush on the space (403 otherwise)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
path | string | yes | |
versionNumber | integer | yes | |
parentId | string | null | yes | |
replyToId | string | null | yes (default null) | |
author | object | yes | |
guestName | string | null | yes | |
origin | object | null | yes | |
body | string | yes | |
images | object[] | yes (default []) | |
quote | string | null | yes | |
anchor | object | null | yes | |
via | string | null | yes | |
resolvedAt | number | null | yes | |
resolvedBy | object | null | yes | |
resolvedVia | string | null | yes | |
resolvedVersion | number | null | yes (default null) | |
editedAt | number | null | yes | |
editedBy | object | null | yes | |
editedVia | string | null | yes | |
revisions | integer | yes | |
reactions | object[] | yes (default []) | |
createdAt | number | yes |
PUT /v1/comments/:id/reactions/:emoji
Signed in + canComment (404 if you can't see it); emoji is one of ๐ โค๏ธ ๐ ๐ ๐ โ , URL-encoded; idempotent; tells nobody (no push, email or Inbox)
Response
| Field | Type | Required | Notes |
|---|---|---|---|
reactions | object[] | yes |
DELETE /v1/comments/:id/reactions/:emoji
As PUT; removes your reaction, fine if there was none
Response
| Field | Type | Required | Notes |
|---|---|---|---|
reactions | object[] | yes |
POST /v1/spaces/:id/db/query
View; write: true needs push (401 signed out / 403, never downgraded)
Body
| Field | Type | Required | Notes |
|---|---|---|---|
sql | string | yes | |
params | (string | number | null | boolean | object)[] | no | |
write | boolean | no |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
columns | string[] | yes | |
rows | ((string | number | null | object)[])[] | yes | |
rowsRead | number | yes | |
rowsWritten | number | yes | |
truncated | boolean | yes |
GET /v1/spaces/:id/db
View; tables, columns, row counts, size
Response
| Field | Type | Required | Notes |
|---|---|---|---|
tables | object[] | yes | |
databaseSize | number | yes |
POST /v1/spaces/:id/db/rows
Push; one row: insert, or update/delete by primary key (rowid when none); 404 when no row matches; logged with its values
Body
Type: object
Response
| Field | Type | Required | Notes |
|---|---|---|---|
rowsWritten | number | yes |
GET /v1/spaces/:id/db/exists
View; { hasTables }, no row counts
Response
| Field | Type | Required | Notes |
|---|---|---|---|
hasTables | boolean | yes |
GET /v1/spaces/:id/db/guest-writes
Push; the named writes guests may run
Response
| Field | Type | Required | Notes |
|---|---|---|---|
statements | object[] | yes |
PUT /v1/spaces/:id/db/guest-writes
Push; replaces the set; each must be one write statement
Body
| Field | Type | Required | Notes |
|---|---|---|---|
statements | object[] | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
statements | object[] | yes |
GET /v1/spaces/:id/db/writes
Push; the write log, newest first, with guest name and origin
Query
| Field | Type | Required | Notes |
|---|---|---|---|
limit | integer | no (default 100) |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
writes | object[] | yes |
GET /v1/spaces/:id/db/export
Push; attachment <spaceId>.sql, replays via db/query with write: true
Response: text/plain .sql dump
POST /v1/spaces/:id/db/reset
Admin; wipes every table; { before } undoes it via restore
Response
| Field | Type | Required | Notes |
|---|---|---|---|
before | number | yes |
POST /v1/spaces/:id/db/restore
Admin; point-in-time restore, last 30 days
Body
| Field | Type | Required | Notes |
|---|---|---|---|
at | string (date-time) | integer | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
restoredTo | number | yes | |
undoBookmark | string | yes |