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
The file to upload (any type supported)
ID of the entity to associate the document with
ID of the document category (UBO, Legal Representative, Corporate, etc.)
Request Example
Response
Unique identifier for the document
Display name of the document
Original filename of the uploaded file
File size in bytes
MIME type of the file
Path where the file is stored (S3 key or local path)
Storage provider used (βs3β or βlocalβ)
ID of the document category (if assigned)
ID of the organization that owns the document
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
Bad Request - Missing file or authentication
Unauthorized - Invalid token
Internal Server Error
Notes
The system automatically detects if S3 storage is configured and uses it, otherwise falls back to local storage.