files

Upload a file into the vault

Clerk session or agt_ token with files:write (live tier re-checked). The agent path sends application/json with the bytes base64-encoded in content_base64; the browser panel sends multipart/form-data with a file part (that variant is not described by this schema). Naming a folder_id requires the caller to manage that folder. The response carries the new id, never a blob URL.

post/api/files/upload

Request

  • Base URL: https://www.immersivecommons.com
  • URL: https://www.immersivecommons.com/api/files/upload
  • Auth: HTTP bearer

Request body

filenamestring required
content_base64string required

The file bytes, base64-encoded.

content_typestring

MIME type; guessed from the filename when omitted.

folder_idstring

Target folder. Must exist AND be one the caller manages; omit for the vault root.

visibility'private' | 'ic-members' | 'grantees'
granteesstring[]

Clerk user ids to admit (with visibility: grantees).

labelstring
descriptionstring
tagsstring[]

Response

File stored.

okboolean required
idstring required

Use this with /api/files/{id} and the download route.

filenamestring required
sizeinteger required
visibilitystring required
via'clerk' | 'agent'

Changes

No recorded changes to this operation across all 1 revision of this API.