Skip to content

Workspace API

Memory

Read and edit what Spec keeps about how you and your workspace work.

Endpoints
GET https://api.parcelengineering.com/api/v1/workspace/memory/{scope}
PUT https://api.parcelengineering.com/api/v1/workspace/memory/{scope}
GET https://api.parcelengineering.com/api/v1/workspace/memory/{scope}/revisions
GET https://api.parcelengineering.com/api/v1/workspace/memory/{scope}/revisions/{revision}
POST https://api.parcelengineering.com/api/v1/workspace/memory/{scope}/revisions/{revision}/restore

Spec keeps a short memory for each member and one for the workspace: how you work, your firm’s process, and how you want Spec to work. Each memory is one Markdown body of at most 4,000 characters (an emoji counts as two), with its last 200 versions kept as revisions. Every route takes workspace_id as a query parameter and costs 0 credits.

Scope

scopeMemoryWho can readWho can change
meYour ownOnly youYou
workspaceShared by the workspaceEvery memberAdmins and owners

Nobody else can read your own memory, admins included. An API key acts as the member who created it, so a key you make reads and changes your own memory: share it as you would your sign-in.

Read

GET /workspace/memory/{scope} returns the memory. One that was never saved reads as an empty body at revision 0.

Response
{
"data": {
"scope": "me",
"body": "- Include phone and email on every CRM push",
"revision": 3,
"updated_source": "spec",
"updated_at": "2026-12-05T18:00:00.000Z",
"max_chars": 4000
},
"metadata": { "credits": 0 }
}

Replace

PUT /workspace/memory/{scope} replaces the whole body. Send the revision you read; if someone saved since, the call answers 409 revision_conflict and changes nothing. Saving the same text again writes no new revision.

Request body
{ "body": "- Include phone and email on every CRM push", "expected_revision": 3 }

The response is the memory as saved, in the same shape as a read.

Revisions

GET /workspace/memory/{scope}/revisions lists the revisions, newest first, up to 200, each with revision, source, author_user_id, author_run_id and created_at. GET .../revisions/{revision} returns one with its body. POST .../revisions/{revision}/restore with { "expected_revision": n } saves that body again as the newest revision.

source says who wrote a revision:

sourceWritten by
memberYou, in the app
specSpec, in a chat
refreshThe daily tidy
apiAn API key or an MCP client

Errors

StatuscodeWhen
403forbiddenChanging workspace without being an admin or owner, or an API key whose creator has left
404not_foundNo such revision
409revision_conflictSomeone saved since you read; details.revision is the current one
413memory_fullThe body is over 4,000 characters; details.length is its length