Skip to content

Spaces

A named container for files and runs, with a lifetime you set. The whole API is mirrored inside it.

Updated

Without a space, every call happens in a hidden workspace. Files there are temporary and unindexed. They die with the run that used them. A space is the opposite. Files belong to the space and outlive their runs. They are indexed, so you can search them.

Use a space when several calls belong together: one customer onboarding, one case file, one batch you want to search later.

Create a space

curl -X POST https://api.cloudraker.com/v1/spaces \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Acme onboarding", "ttl": 604800 }'
{
  "object": "space",
  "id": "2f6d1c48-9b7a-4b2c-9a3e-1d5f8c0b7e21",
  "name": "Acme onboarding",
  "createdAt": "2026-08-15T09:12:00.114Z",
  "expiresAt": "2026-08-22T09:12:00.114Z"
}
Field What it is
name Optional, ≤ 120 characters. Defaults to API space.
ttl Seconds until the space expires, from 300 to 7776000 (90 days). Defaults to 604800 (one week).

Lifetime

expiresAt is the deadline. Extend it at any time. The new ttl counts from now:

curl -X PATCH https://api.cloudraker.com/v1/spaces/$SPACE_ID \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "ttl": 2592000 }'

DELETE /v1/spaces/{spaceId} closes the space immediately and deletes its files. It is idempotent. Call it again to finish a purge that was too large for one pass.

Expiry is lazy

No background process sweeps expired spaces today. The first call that addresses an expired space closes it. The space is archived, its files are deleted in the background, and the call answers 404.

Design for three consequences:

  • A space past expiresAt is already gone as far as this API is concerned, even before anything touched it.
  • The space.expired webhook fires at that moment — once per space, not at the deadline. Advance warnings arrive with the sweeper later.
  • An explicit DELETE does not emit space.expired. Deleting your own space is not an expiry.

The namespaced mirror

Every /v1 route that works on the hidden workspace works inside a space, under /v1/spaces/{spaceId}/…:

Inside a space What it does
POST /v1/spaces/{spaceId}/extract (also extract/batch, parse, redact, fill, sign, pipeline) The capabilities, over the space’s files.
POST / GET / DELETE /v1/spaces/{spaceId}/files… Register, list, read and delete files — plus every file tool.
GET /v1/spaces/{spaceId}/runs and /runs/{id} The runs that happened in this space.
GET /v1/spaces/{spaceId}/search?q=… Search the space’s indexed files.
POST /v1/spaces/{spaceId}/agents, GET …/agents/{runId} Agent runs scoped to the space.

Bodies and responses are identical to the unscoped routes. Only the path changes.

Search a space

curl "https://api.cloudraker.com/v1/spaces/$SPACE_ID/search?q=termination%20clause&limit=10" \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY"

Only files in a space are indexed. Files in the hidden workspace are not, so there is nothing to search there.

List spaces

curl "https://api.cloudraker.com/v1/spaces?limit=50" \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY"

Next steps

Type to search…

↑↓ navigate↵ selectEsc close