Files

Overview

Files API allows you to programmatically upload, and download files associated with Bigin records. These files can include documents, images, videos, and any other file types you may need to store and access within the organization. The uploaded files can also be attached to records by using update/create records API.

Endpoints

Upload Files

Files can be added to an organization using the multipart/form-data request. You can upload multiple files in a single request, and each file should not exceed 20 Mb in size. The response object will provide you with the name and encrypted ID of the file. This encrypted ID is necessary when you attach the file to a specific record using create/upload record API.

Request URL

{api-domain}/bigin/v2/files

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.zohoapis.com
  • For EU, https://www.zohoapis.eu
  • For AU, https://www.zohoapis.com.au
  • For IN, https://www.zohoapis.in
  • For CN, https://www.zohoapis.com.cn
  • For JP, https://www.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:

  • ZohoBigin.Files.CREATE

Request parameters

The available request parameters are given below:

Body parameters

file fileRequired

This parameter represents the file to be uploaded. It should be included in the request body using the multipart/form-data encoding. The file size should not exceed 20 Mb. Make sure to provide file path and extension for proper file upload.

Sample request

Copiedcurl "https://www.zohoapis.com/bigin/v2/files" \
-X POST \
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" \
-F "file=@"/path-to-file/connections.txt""

Response object

The response object includes details regarding the encryption ID of the uploaded file, as well as success and status messages.

Possible error codes

The response of this resource includes HTTP status and error codes.

Sample response

Copied{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "name": "connections.txt",
                "id": "2cceafahsjdhsdhc065186"
            },
            "message": "connections.txt uploaded Successfully",
            "status": "success"
        }
   ]
}