Create Bulk Write Job


To create a bulk write job to import records into CRM.


Request Details

Request URL



Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52



Possible module names

leads, accounts, contacts, deals, campaigns, cases, solutions, products, vendors, pricebooks, tasks, and custom

Possible operation types

ALL - Full access to the record
CREATE - Create a bulk write job

Sample request

Copiedcurl ""
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@inputData.json"

Request JSON

  • character_encodingString, optional

    Represents the charset of the uploaded file. It is usually auto-detected, but if specified, then it will be used to read the file.

  • operationString, mandatory

    Represents the type of operation you want to perform on the bulk write job.

    Values are
    • insert - To create CSV records as new records in CRM.
    • update - To update an existing record in CRM(This operation does not allow creation of new records).
    • upsert - To update an existing record in CRM and create new records, if they do not exist already.
  • ignore_emptyBoolean, optional

    True - Ignores the empty values in a column and updates only the fields of a record without empty values
    False or empty - The system updates records in CRM with empty values in the given file column.
    The default value is false.

  • callbackJSON Object, optional

    A valid URL that allows the HTTP POST method. The Bulk Write Job's details are posted to this URL on successful completion or failure of a job. Sample - "callback" : { "url": "", "method": "post" }.
    This JSON Object takes two keys—url and method.

    • url(string) - A valid URL, which should allow HTTP POST method. The Bulk Write Job's details are posted to this URL on successful completion or failure of a job.

    • method(string) - The HTTP method of the callback url. The supported value is post.

  • resourceJSON array, optional

    A JSON array of objects containing the API names of modules that you want to import, their field mappings, and the corresponding file IDs obtained from Upload API.

    • type(string, mandatory) - Represents the type of module that you want to import. The value is data.

    • module(JSON object, mandatory) - The API name of the module that you select for bulk write job.
      For subforms: When you want to bulk-write subform data, you must give the API name of the subform here.

    • file_id(string, mandatory) - The file_id obtained from file upload API.

    • find_by(string, mandatory for update and upsert, optional for insert) - The API name of a unique field or ID of a record. The system uses the value of this field to find the existing records in CRM. When you specify this parameter for insert operation, the system will skip the existing records from the file.

    • field_mappings(JSON array, optional) - When the system processes a CSV file, the first row is treated as the header row. Each header name is treated as the field API name and data from a column are populated into the corresponding field represented by the API name. This parameter helps you to skip auto-mapping and define your own field mapping. Note that if you include this array in the input, data in the CSV will be mapped based only on the index value in this array.

      • api_name(string, mandatory) - The API name of the field present in Zoho module object that you want to import. Refer Fields Meta Data API for the list of fields available in a module. An invalid field API name throws an error.

      • index(number, optional) - The column index of the field you want to map to the CRM field. When you specify a non-existing index value, the system throws an error.

      • find_by(string, mandatory for lookup fields) - The API name of the unique field in the module against which the system checks if there are existing records in CRM. You can also use id, API names of the system-defined unique fields, custom unique fields, lookup fields, and display columns/fields(the results displayed based on a field, that are listed when you search for an associated lookup. For example, Account Name is the display column when you have a look up in Contacts that points to Accounts.) as find_by fields.

      • default_value(JSON object, optional) - Use this key if some of the records do not have a value in a column, and you want to replace it with a default value. Example: {"value": "Trade Show"}.

    For Subforms
    • The field_mappings array must have the following mandatory object, besides the details of the other fields of the subform. This is to map the subform record with the respective parent record.

  • You can bulk-insert records in a specific layout of a module. Note that when you insert records using bulk-write the system ignores the custom layout-specific mandatory fields.

  • To insert the records in a specific layout, you must specify the name of the custom layout in your CSV file. If left unspecified/incorrect value specified, the system inserts the records in the default layout in that module. Also, you must specify the relevant details in the field_mappings key in the input. Refer to sample input for more details.

  • For field-types such as Date and Date/Time, there are default formats. For instance, for Date, the default format is MM/dd/yyyy, and for Date/Time, the default format is MM/dd/yyyy HH:mm:ss. If you specify the value for these fields in any other format in your CSV file, you must specify the format in your input. Refer to sample input for more details. Click here to know the allowed formats for Date, Date/Time, and Number fields.

Sample input to bulk-insert Subform data

 "operation": "insert",
 "ignore_empty": true,
 "callback": {
  "url": "",
  "method": "post"
 "resource": [
   "type": "data",
   "module": { 
       "api_name": "Contact_Sub" 
   "file_id": "111111000000541958",
   "field_mappings": [
     "api_name": "Parent_Id",//The CSV must contain the parent record ID of the contact 
     "find_by": "id",
     "index": 3
     "api_name": "Secondary Phone",
     "index": 1
     "api_name": "Secondary Email",
     "index": 0

Sample input for bulk update

 "operation": "update",
 "ignore_empty": true,
 "callBack": {
  "url": "",
  "method": "post"
 "resource": [
   "type": "data",
  "module": { 
       "api_name": "Contacts" 
   "find_by": "id",
   "file_id": "111111000000541958",
   "field_mappings": [
     "api_name": "Last_Name",
     "index": 0
     "api_name": "id",
     "index": 1
     "api_name": "Account_Lookup",
     "index": 2,
     "find_by": "Account_Name"

Response Structure

  • statusstring

    Specifies the status of the API call. Sample - "status": "success".

  • messagestring

    Specifies the pre-defined comments for the job. Useful in case any errors occur.

  • detailsJSON object

    Contains the following details of the bulk write job.

    • id(string) - Specifies the unique identifier of the bulk write job. Sample - "id": "1000010760002".

    • created_by(JSON object) - Specifies the ID and Name of the user who initiated the bulk write job. Sample - "created_by": { "id": "1000000031045", "name": "Patricia Boyle" }.

Possible Errors


    All the mandatory fields in the module are not mapped.
    Resolution: Map all the mandatory fields in the module.


    Mandatory key or value is not specified in the request body. Example: "message": "Required key find_by is not available".
    Resolution: Include the required key in the input.


    The field API name is invalid.
    Resolution: Specify the correct API name of the field.


    You have entered the date in the wrong format.
    Resolution: Input the date in the correct format.


    The file ID specified is invalid.
    Resolution: Specify the correct file ID you received while uploading the CSV file.


    The number of fields mapped has exceeded the maximum limit of 200.
    Resolution: You can only map up to 200 fields.


    Index is mapped with negative values.
    Resolution: "index" can only take positive integer values.


    The module name specified is invalid.
    Resolution: The API name of the module is either wrong or this module is not supported for a bulk write job. Refer to the "Possible module name" section for the list of supported modules.


    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above.


    Resolution: Client does not have ZohoCRM.bulk.CREATE. Create a new client with valid scope. Refer to scope section above.


    Permission denied to create
    Resolution: The user does not have permission to create a bulk write job. Contact your system administrator.


    Internal Server Error
    Resolution: Unexpected and unhandled exception in Server. Contact support team.


    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.


    User does not have sufficient privilege to create.
    Resolution: The user does not have the permission to create a bulk write job. Contact your system administrator.

Sample response

  "status": "success",
  "code": "SUCCESS",
  "message": "success",
  "details": {
    "id": "111111000000541958",
    "created_by": {
      "id": "111111000000035795",
      "name": "Patricia Boyle "