Brume · Docs
API

Files

Workspace files, uploads and exports.

GET
/api/workspaces/{workspace_id}/file-content/{file_path}

Return stored binary content with safe download headers and its MIME type.

Text-only files and paths without stored binary content return HTTP 404.

Path Parameters

workspace_id*string
file_path*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/file-content/string"
null
GET
/api/workspaces/{workspace_id}/file-export/{file_path}

Convert a file to the requested format and stream it back as a download.

Requires permission to view workspace files; the conversion is read-only and never writes the result back to the workspace.

Path Parameters

workspace_id*string
file_path*string

Query Parameters

format*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/file-export/string?format=string"
null
GET
/api/workspaces/{workspace_id}/file-versions/{file_id}

Path Parameters

workspace_id*string
file_id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/file-versions/string"
{  "versions": [    {      "created_at": "string",      "created_by_agent": "string",      "created_by_user": "string",      "version": 0    }  ]}
GET
/api/workspaces/{workspace_id}/file-versions/{file_id}/{version}

Path Parameters

workspace_id*string
file_id*string
version*integer

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/file-versions/string/0"
{  "content": "string",  "created_at": "string",  "version": 0}
GET
/api/workspaces/{workspace_id}/files

List visible files, including linked client files and shared skills where applicable.

Path Parameters

workspace_id*string

Query Parameters

tree?boolean
Defaultfalse
prefix?string
Default""

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/files"
[  {    "accent_color": "string",    "mime_type": "string",    "path": "string",    "size": 0,    "source": "workspace"  }]
POST
/api/workspaces/{workspace_id}/files

Claim a pending upload and enqueue asynchronous file processing.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/files" \  -H "Content-Type: application/json" \  -d '{    "upload_id": "string"  }'
{}
DELETE
/api/workspaces/{workspace_id}/files

Move files or folder trees to trash as one recoverable batch.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/workspaces/string/files" \  -H "Content-Type: application/json" \  -d '{    "paths": [      "string"    ]  }'
{  "batch_id": "string",  "deleted": 0}
POST
/api/workspaces/{workspace_id}/files/download

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/files/download" \  -H "Content-Type: application/json" \  -d '{    "paths": [      "string"    ]  }'
null
PATCH
/api/workspaces/{workspace_id}/files/move

Move file trees, including across linked private workspaces; requires edit permission.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/api/workspaces/string/files/move" \  -H "Content-Type: application/json" \  -d '{    "destination": "string",    "paths": [      "string"    ]  }'
{  "moved": 0}
POST
/api/workspaces/{workspace_id}/files/presign

Issue a time-limited upload URL; requires permission to create workspace files.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/files/presign" \  -H "Content-Type: application/json" \  -d '{    "content_type": "string",    "filename": "string",    "size": 0  }'
{  "expires_at": "string",  "headers": {},  "upload_id": "string",  "url": "string"}
PATCH
/api/workspaces/{workspace_id}/files/rename

Rename a file or folder tree with edit permission, rejecting path collisions.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/api/workspaces/string/files/rename" \  -H "Content-Type: application/json" \  -d '{    "new_name": "string",    "path": "string"  }'
{  "new_path": "string"}
GET
/api/workspaces/{workspace_id}/files/{file_path}

Read workspace content with fallbacks for system and tenant-shared skill files.

Path Parameters

workspace_id*string
file_path*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/files/string"
{  "content": "string",  "content_revision": 0,  "file_id": "string",  "marker_state": {},  "mime_type": "text/plain",  "path": "string",  "restored_passage_ids": [    "string"  ]}
PUT
/api/workspaces/{workspace_id}/files/{file_path}

Save a user edit with edit permission, guarding shared skill changes against conflicts.

Path Parameters

workspace_id*string
file_path*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/api/workspaces/string/files/string" \  -H "Content-Type: application/json" \  -d '{    "content": "string"  }'
{  "content": "string",  "content_revision": 0,  "file_id": "string",  "marker_state": {},  "mime_type": "text/plain",  "path": "string",  "restored_passage_ids": [    "string"  ]}
POST
/api/workspaces/{workspace_id}/folders

Create a folder with file-creation permission, returning 409 when it already exists.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/folders" \  -H "Content-Type: application/json" \  -d '{    "path": "string"  }'
{  "path": "string"}
GET
/api/workspaces/{workspace_id}/search

Search across workspace content; queries shorter than two characters return no results.

Path Parameters

workspace_id*string

Query Parameters

q?string
Default""
limit?integer
Default20

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/search"
{  "results": [    {      "conversation_id": "string",      "id": "string",      "snippet": "string",      "title": "string",      "type": "string"    }  ]}
GET
/api/workspaces/{workspace_id}/trash

List recoverable trash entries; requires permission to delete workspace files.

Path Parameters

workspace_id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/trash"
{  "entries": [    {      "delete_batch_id": "string",      "deleted_at": "2019-08-24T14:15:22Z",      "deleted_by_agent": true,      "deleted_by_user_id": "string",      "id": "string",      "mime_type": "string",      "original_path": "string"    }  ]}
DELETE
/api/workspaces/{workspace_id}/trash

Permanently purge selected or all trash entries; requires workspace settings permission.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/workspaces/string/trash" \  -H "Content-Type: application/json" \  -d '{}'
{  "purged": 0}
POST
/api/workspaces/{workspace_id}/trash/restore

Restore selected entries or a deletion batch, renaming paths when collisions occur.

Path Parameters

workspace_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/trash/restore" \  -H "Content-Type: application/json" \  -d '{}'
{  "restored": [    {      "original_path": "string",      "renamed": true,      "restored_path": "string",      "trashed_file_id": "string"    }  ]}