Upload File
To use the bulk write API, you need to upload a CSV file in ZIP format. Upon successful upload, the response will provide a file_id. You should include this ID when making the bulk write request.
Request URL
{api-domain}/bigin/v2/upload
Choose domain-specific URL to replace {api-domain}
You can use the domain-specific URL to access Bigin resources. Based on the data center in which the Bigin account's resources are available, replace {api-domain} in the preceding request with one of the following API domain URLs:
- For US, https://www.content.zohoapis.com
- For EU, https://www.content.zohoapis.eu
- For AU, https://www.content.zohoapis.com.au
- For IN, https://www.content.zohoapis.in
- For CN, https://www.content.zohoapis.com.cn
- For JP, https://www.content.zohoapis.jp
For more information, see Multi DC Support.
Authorization
For this endpoint, pass the access token as an authorization header. See OAuth Authentication for more information about access tokens.
Authorization: Zoho-oauthtoken <ACCESS_TOKEN>
You must authenticate using an access token that is associated with the following scope:
- ZohoFiles.files.ALL
Additionally, in the header, pass the following:
Pass the feature param to indicate this API as bulk write job.
feature: bulk-write
Pass the unique ID (Zgid) of your organization obtained through the Organization API.
X-CRM-ORG: zgid
Request parameters
The available request parameters are given below:
Body parameters
file fileRequired
This parameter represents the zip file to be uploaded. It should be included in the request body using the multipart/form-data encoding. Make sure to provide file path and extension for proper file upload.
Sample request
Copiedcurl "https://content.zohoapis.com/bigin/v2/upload" \
-X POST \
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" \
-H "X-CRM-ORG: 56xxxx47" \
-H "feature: bulk-write" \
-F "file=@file.csv.zip"
Possible error codes
The response of this resource includes HTTP status and error codes.
The most common HTTP error codes that occur when you request access to this endpoint are given in the following:
- INVALID_FILE_FORMATHTTP 200
The file you uploaded is not in the zip format.
Resolution: Upload the file only in the zip format. - FILE_TOO_LARGEHTTP 200
The file size is too large to process.
Resolution: The maximum file size is 25MB.
Refer to the Limitations to know the CSV file limits.
Sample response
Copied{
"status": "success",
"code": "FILE_UPLOAD_SUCCESS",
"message": "file uploaded.",
"details": {
"file_id": "111111000001492610",
"created_time": "2018-12-31T12:00:00-12:00"
}
}