Upload Document
API Reference
Upload Document
Upload a document and optionally associate it with an entity and category β in the gu1 platform for KYC, KYB, and compliance evidence.
POST
Upload Document
Upload files associated with entities using multipart/form-data.
Common categories include:
Authentication
This endpoint requires authentication via Bearer token and organization context. Required Headers:Authorization: Bearer <jwt-token>X-Organization-ID: <organization-id>
Form Data Parameters
File
required
The file to upload (any type supported)
UUID
ID of the entity to associate the document with
UUID
ID of the document category (UBO, Legal Representative, Corporate, etc.)
Request Example
Response
UUID
Unique identifier for the document
string
Display name of the document
string
Original filename of the uploaded file
number
File size in bytes
string
MIME type of the file
string
Path where the file is stored (S3 key or local path)
string
Storage provider used (βs3β or βlocalβ)
UUID
ID of the document category (if assigned)
UUID
ID of the organization that owns the document
timestamp
When the document was created
Response Example
What Happens After Upload
- Storage: File is uploaded to S3 (if enabled) or local storage
- Database Record: Document record is created in the database
- Versioning: Initial version (v1) is automatically created
- Entity Relationship: If
entityIdis provided, a relationship is created automatically - Risk Analysis: Automatic risk analysis is triggered if rules are configured
Supported File Types
- Documents: PDF, DOC, DOCX, TXT
- Images: PNG, JPG, JPEG, GIF
- Spreadsheets: XLS, XLSX, CSV
- Others: Any file type
Document Categories
To get available categories, use:- UBO (Ultimate Beneficial Owner)
- Legal Representative
- Corporate Documents
- Enhanced Due Diligence
Error Responses
error
Bad Request - Missing file or authentication
error
Unauthorized - Invalid token
error
Internal Server Error
Notes
The system automatically detects if S3 storage is configured and uses it, otherwise falls back to local storage.