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 Name | Values allowed | Default | Description | Mandatory |
| upload_file | File (max 5000 KB) | - | File to upload | Yes |
| file_name | Text (max 250 chars) | - | Name of the file | Yes |
| file_description | Text (max 250 chars) | - | Description of the file | No |
| file_type | Long | - | 0 for employee files, 1 for organisation files & 2 for personal files | No |
| view_download_permission | 0 / 1 / 2 | 0 | 0 (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 mapped | No |
| folder_id | Long (max 100) | - | Folder ID under which the file has to be placed | No |
| employee | Long | - | Employee file specific param - (Employee based) - Employee erec number for whom the employee file has to be added | No |
| reporting_manager_permission | 0 / 1 / 2 | 0 | Only 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 notification | No |
| folder_name | Text (max 250 chars) | - | Mention the folder name if the file has to be added under a newly created folder with this name | No |
| valid_until | Date | - | File expiry date | No |
| latitude | Text | - | Upload latitude | No |
| longitude | Text | - | Upload longitude | No |
| 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 | 0 | Give the value as 1 if acknowledgement has to be enabled for this file | Yes |
| acknowledgement_deadline | Date | - | Acknowledgement due date | No |
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¬ify_mail=true¬ify_feeds=true&acknowledgement_deadline=28-Nov-2025&file_acknowledgement=1Requests:
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"
+ "¬ify_mail=true"
+ "¬ify_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"
}