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.


      • Sticky Posts

      • Kaizen #197: Frequently Asked Questions on GraphQL APIs

        🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
      • Kaizen #198: Using Client Script for Custom Validation in Blueprint

        Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
      • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

        Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
      • Kaizen #193: Creating different fields in Zoho CRM through API

        🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
      • Client Script | Update - Introducing Commands in Client Script!

        Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands