UploadFile uploads a file to cloud storage.
POST/api/v1/uploads
Accepts multipart/form-data with file and metadata. Returns immediately with file ID; actual upload happens asynchronously.
Parameters
- file: Required, the file data (via multipart form)
- category: Required, file category for organization
- reference_type: Optional, entity type this file belongs to
- reference_id: Optional, entity ID this file belongs to
- metadata: Optional, additional file metadata
Response
Returns File with status "pending" or "processing". Poll GetFile or use webhooks to track completion.
Errors
- INVALID_ARGUMENT: File too large or type not allowed
- RESOURCE_EXHAUSTED: Organization storage quota exceeded
- PERMISSION_DENIED: Caller lacks uploads:write permission
Request
Responses
- 200
- default
A successful response.
An unexpected error response.