When to use this module

  • Upload images or documents for contacts or WhatsApp messages
  • Attach WhatsApp message media → upload, then use fileId in the message payload
  • Upload a CSV import fileMode=Import, pass fileId to the import endpoint

Endpoints

MethodRouteAuthDescription
POST/api/v1/Files🔑 API KeySingle-shot direct file upload
POST/api/v1/Files/chunk🔑 API KeyUpload large files securely in chunks

Direct Upload — Form Fields

For standard files (like profile pictures or standard attachments), you can upload the entire file in a single request using the /api/v1/Files endpoint.

FieldTypeRequiredDescription
FileIFormFilerequiredThe file binary to upload
ModeenumrequiredFirm / Profile / Contact / Message / Template / Import
ObjIdGuid?optionalOptional owning entity ID (e.g. linking to a specific record)
IsPublicbooleanoptionalTrue to store in public container and return a resolvable FullPath (default is False)

Chunk Upload — Form Fields

You can safely upload both small profile pictures and massive documents. For very large files, our system automatically breaks them down into smaller pieces to ensure a reliable upload.

FieldTypeRequiredDescription
FileIFormFilerequiredThe binary file chunk to upload
BlockIndexintrequiredZero-based chunk index (0 for first chunk)
TotalBlocksintrequiredTotal number of chunks for this file
ModeenumrequiredFirm / Profile / Contact / Message / Template / Import
FileIdGuid?optionalRequired for chunks after the first (BlockIndex > 0) to correlate parts

Single-Chunk Upload Flow

For small files (like profile pictures or logos), you can upload the entire file in a single, fast request.

Step 1 - Send your file Use the endpoint to send us your small file. │ ▼ Step 2 - Secure Storage We securely save your file in the cloud. │ ▼ Step 3 - Success You immediately get back a unique File ID and a public link!

Multi-Chunk Upload Flow

For large files, the upload happens in smaller parts to prevent failures. Once all parts are received, we automatically combine them back together for you.

Part 1 - Start Upload Send the first piece of your large file. → We return a unique File ID to track the progress. Part 2 - Continue Upload Send the next pieces using the same File ID. → We safely store each piece as it arrives. Final Part - Completion Send the final piece of the file. → We seamlessly merge all the pieces together. → You get back the final public link!
Always store the FileId from the first response and pass it in all subsequent chunk requests. The server uses it to group blocks before committing.

Upload Response

JSON
{
  "isSuccess": true,
  "data": {
    "fileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "url": "fileurl",
    "isComplete": true
  },
  "message": "File uploaded successfully"
}

Background WhatsApp Processing

This heavy lifting happens entirely in the background. You only need to provide us the File ID, and we handle the complex WhatsApp integration automatically.
Step 1 - Upload You upload your file to us and receive a File ID. │ ▼ Step 2 - Attach to Message You provide that File ID when sending a WhatsApp message. │ ▼ Step 3 - Background Transfer Our system secretly handles the complex transfer directly to WhatsApp. │ ▼ Step 4 - Delivery WhatsApp accepts the media and seamlessly delivers it to your contact!