FILE_NOT_SUPPORTED Error making Bulk Write request

FILE_NOT_SUPPORTED Error making Bulk Write request

Hello, I am trying to perform a Bulk Write request to the Leads module of Zoho CRM. I am able to successfully upload a zipped CSV file but I get the following error when I initiate the bulk write job:
  1. 400 - {"status":"error","code":"FILE_NOT_SUPPORTED","message":"File not supported for bulk write","details":{}}


Here is the CSV data:
  1. Email,First_Name,Last_Name
  2. admin@mydomain.com,john,doe
And here is the request I am using to upload the zipped CSV

  1. curl "https://content.zohoapis.com/crm/v5/upload" \
  2. -X POST \
  3. -H "Authorization: Zoho-oauthtoken 1000.xxx.xxx" \
  4. -H "X-CRM-ORG: 64990321" \
  5. -H "feature: bulk-write" \
  6. -F "file=@leads.zip"

I received a file ID from this upload request and make this bulk write request

  1. curl "https://www.zohoapis.com/crm/bulk/v5/write" 
  2. -X POST 
  3. -H "Authorization: Zoho-oauthtoken 1000.my-token.xxx" 
  4. -H "Content-Type: application/json" 
  5. -d "@app/services/zoho/payload.json"
And here is the payload.json
  1. {
  2.   "character_encoding": "UTF-8",
  3.   "operation": "insert",
  4.   "ignore_empty": true,
  5.   "resource": [
  6.     {
  7.       "type": "data",
  8.       "module": { "api_name": "Leads" },
  9.       "file_id": "1767869000159543001"
  10.     }
  11.   ]
  12. }

Can you please tell me why I get the error "File not supported for bulk write"

I know that uploaded files cannot be reused multiple times, this error happens the first time I attempt to import an uploaded file.

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now