Add Files API - v3

To upload an organisation file, employee file or personal file.

Request URL:

https://people.zoho.com/people/api/v3/files/add

Scope:

ZOHOPEOPLE.files.ALL

Request Type:

POST

Request Parameters:

Parameter NameValues allowedDefaultDescriptionMandatory
upload_file File (max 5000 KB)-File to uploadYes
file_nameText (max 250 chars)-Name of the fileYes
file_descriptionText (max 250 chars)-Description of the fileNo
file_typeLong-0 for employee files, 1 for organisation files & 2 for personal filesNo
view_download_permission 0 / 1 / 2 00 (both view & download enabled), 1 (view & download disabled), 2 (view enabled & download disabled)Yes
role_id Long (multiple, max 100)-Employee file specific param - (Role based) - Role ID for which the employee file has to be mappedNo
folder_id Long (max 100) -Folder ID under which the file has to be placedNo
employeeLong -Employee file specific param - (Employee based) - Employee erec number for whom the employee file has to be addedNo
reporting_manager_permission0 / 1 / 2 0Only for employee-based files - 0 (no view, no download), 1 - (view & download enabled), 2 - (view enabled but download restricted)Yes
notify_mail Boolean-Send mail notification No
notify_feeds Boolean-Send feed notificationNo
folder_name Text (max 250 chars) -Mention the folder name if the file has to be added under a newly created folder with this nameNo
valid_until Date-File expiry dateNo
latitude Text -Upload latitudeNo
longitude Text-Upload longitudeNo
share_with_organization JSONObject-Organization file specific param - Specify the organization entities for which the file has to be shared. Example : {"Department":["******000000302002","*******000001213001"],"LocationName":["******000000309023","******000000309033"]}No
file_acknowledgement 0 / 1 0Give the value as 1 if acknowledgement has to be enabled for this fileYes
acknowledgement_deadline Date -Acknowledgement due dateNo

Threshold Limit: 30 requests | Lock period: 5 minutes

Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.

Sample Request:

Copiedhttps://people.zoho.com/api/v3/files/add?file_type=1&folder_id=******000001274209&file_name=Social media policy file&view_download_permission=1&notify_mail=true&notify_feeds=true&acknowledgement_deadline=28-Nov-2025&file_acknowledgement=1

Requests:

CopiedOkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
String jsonShareWithOrg = "{\"Department\":[\"******000000302002\",\"******000001213001\"],"
        + "\"LocationName\":[\"******000000309023\",\"******000000309033\"]}";
File file = new File("path/to/testfile.txt");
RequestBody requestBody = new MultipartBody.Builder().setType(MultipartBody.FORM)
    .addFormDataPart("upload_file", file.getName(),
            RequestBody.create(file, MediaType.parse("application/octet-stream")))
    .addFormDataPart("share_with_organization", jsonShareWithOrg)
    .build();
Request request = new Request.Builder()
    .url("https://people.zoho.com/api/v3/files/add"
        + "?file_type=1"
        + "&folder_id=******000001274209"
        + "&file_name=Social Media Policy File"
        + "&view_download_permission=1"
        + "&notify_mail=true"
        + "&notify_feeds=true"
        + "&acknowledgement_deadline=28-Nov-2025"
        + "&file_acknowledgement=1")
    .method("POST", requestBody)
    .build();

Response response = client.newCall(request).execute();
Copiedcurl -X POST "https://people.zoho.com/api/v3/files/add" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
        "upload_file": "<file_path_or_base64>",
        "share_with_organization": {
          "Department":["******000000302002","******000001213001"],
          "LocationName":["******000000309023","******000000309033"]
        },
        "file_type": 1,
        "folder_id": "******000001274209",
        "file_name": "Social Media Policy File",
        "view_download_permission": 1,
        "notify_mail": true,
        "notify_feeds": true,
        "acknowledgement_deadline": "28-Nov-2025",
        "file_acknowledgement": 1
      }'

Sample Response:

Copied{
 "data": {
 "file_id": "******000003031001"
 },
 "message": "File added successfully",
 "status": "success"
}