Skip to main content
POST
Upload Document
Upload files associated with entities using multipart/form-data.

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

  1. Storage: File is uploaded to S3 (if enabled) or local storage
  2. Database Record: Document record is created in the database
  3. Versioning: Initial version (v1) is automatically created
  4. Entity Relationship: If entityId is provided, a relationship is created automatically
  5. 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:
Common categories include:
  • 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.
Maximum file size depends on server configuration (typically 50MB).
Even if entityId or categoryId don’t exist, the document will still be created. The relationship or category assignment will simply be skipped.