Documents

Rename, pin, order, archive or edit an in-house Space document

PATCH
/v1/space/documents/{document_id}
curl -X PATCH "https://api.orchestor.io/v1/space/documents/%3Cdocument_id%3E" \  -H "Authorization: Bearer $API_KEY" \  -H "X-Workspace-ID: wks_abc123" \  -H "Content-Type: application/json" \  -d '{  "archived": true,  "markdown": "string",  "pinned": true,  "sort_position": 1,  "title": "string",  "updated_at": "string"}'
{  "data": {    "archived": true,    "created_at": "2026-01-01T00:00:00Z",    "deleted_at": "2026-01-01T00:00:00Z",    "folder_id": null,    "id": "<string>",    "markdown": "<string>",    "parent_id": null,    "pinned": true,    "sort_position": 0,    "tab_name": "",    "title": "<string>",    "updated_at": "2026-01-01T00:00:00Z",    "workspace_id": "<string>"  }}

Get your Orchestor API key

Create an API key in your workspace settings.

Authorizations

Satisfy one of these options:

  • Session cookie
  • API key

Authentication details

cookie
wos-session

Browser session established by signing in to the web app. The server checks your workspace membership and permissions. Supply X-Workspace-ID for workspace-scoped operations. For server-to-server requests, use an API key when the operation supports it.

Path Parameters

document_idstringpathrequired
Pattern
^doc_[a-f0-9]{24}$

Headers

X-Workspace-IDstringheader

Workspace to access. With a workspace-scoped API key, the server derives this value from the key, so the header is optional. If supplied, it must match the credential workspace or the request returns 403 workspace_mismatch. For interactive session requests, supply this header to select a workspace where you are a member. A project ID cannot be used as a workspace ID.

Example"wks_abc123"

Bodyapplication/jsonrequired

Additional properties
Not allowed
archivedbooleanbody
markdownstringbody

Markdown body. CLI: UTF-8 file path or - for stdin.

String length
≤ 1000000
pinnedbooleanbody
sort_positionintegerbody
Value range
≥ 0, ≤ 2147483647
titlestringbody
String length
≤ 200
updated_atstringbodyrequiredformat:date-time

Response

application/json

Updated document

dataSpaceDocumentrequired
data.archivedbooleanrequired
data.created_atstringrequiredformat:date-time
data.deleted_atstring | nullrequiredformat:date-time
data.folder_idstring | nulldefault:null
data.idstringrequired
data.markdownstringrequired
String length
≤ 1000000
data.parent_idstring | nulldefault:null
data.pinnedbooleanrequired
data.sort_positionintegerrequired
Value range
≥ 0, ≤ 2147483647
data.tab_namestringdefault:
data.titlestringrequired
String length
≤ 200
data.updated_atstringrequiredformat:date-time
data.workspace_idstringrequired