Zoho Mail API - Upload Attachment

Zoho Mail API - Upload Attachment


I followed the steps from the API documentation and wrote a backend in JavaScript to send emails. Normal emails are sent without any problems. However, I can’t send emails with attachments.

As the documentation says, I first try to upload the file, but I get the following output:


  1. {"errorCode":"UPLOAD_RULE_NOT_CONFIGURED","status":{"code":404,"description":"Invalid Input"}}

I researched for hours and checked the documentation many times, but I can’t understand what the problem is. Why am I getting this error? Here is how I make the request:

  1. const formData = new FormData();
  2. formData.append("file", opts.file, opts.file.name || "attachment");

  3. const uploadRes = await fetch(`${baseUrl}/messages/attachments?uploadType=multipart`, {
  4. method: "POST",
  5. headers: {
  6.   Authorization: `Zoho-oauthtoken ${accessToken}`,
  7. },
  8. body: formData,
  9. });
    • Sticky Posts

    • Pocket from Mozilla is closing shop. Don’t lose your favorites . Move them to Zoho Mail Bookmarks now! 📥🔖

      The end of Pocket shouldn't mean the end of your important links and content. Easily import them into Zoho Mail's Bookmarks and continue right where you left off. You can bring over your entire Saves, Collections, and tags just the way they are. Bookmarks
    • Zoho Mail POP & IMAP Server Details

      Hello all! We have been receiving a number of requests regarding the errors while configuring or using Zoho Mail account in POP/ IMAP clients. The server details vary based on your account type and the Datacenter in which your account is setup. Ensure
    • Workplace - Zoholics Europe Customer Awards

      Dear Zoho Mail Community! 📣 We're excited to announce that at this year's Zoholics events across Europe, we're holding customer awards for the first time ever! Workplace - Zoholics Europe Customer Awards This is your chance to shout about the amazing
    • Important update on Group Management | Zoho Mail

      Dear Zoho Mail Community, This post is to inform you all of the following updates on the Group Management in Zoho Mail. Group Member Addition: If a group member is added to an organization group in a Zoho Application, the member will be automatically
    • Mastering email etiquette and best practices to follow in Zoho Mail

      Hello Zoho Mail Community, We’re thrilled to invite you all to our upcoming webinar: Mastering email etiquette and best practices to follow in Zoho Mail. Join our live webinar for expert etiquette tips to enhance your professionalism and elevate your