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. });

      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • 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

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ



                                ご検討中の方

                                  • Recent Topics

                                  • Zoho Desk - Event Calendar View

                                    Hi Desk team, Are there any plans to introduce a calendar or timeline view for Events in Zoho Desk? It would be very helpful if we could see Events visually in a calendar and/or timeline. This is very helpful when desk side support activities need to
                                  • Email notification for followers

                                    Is there a way to enable email notification for followers of a support ticket? ie: Ticket #123 is owned by Agent#1, Agent#2 adds themselves as a follower. Whenever ticket #123 receives an email from the customer, Agent#1 receives an email. Agent#2 would
                                  • Introducing SlyteUI : From Idea to a Working Interface in Minutes

                                    Hello everyone! Are you spending hours building basic UIs? Does even the smallest customization feel like a major task? CRM customization should feel intuitive and straightforward, not time consuming or exhausting. SlyteUI makes this possible by simplifying
                                  • Cross Module Filtering – Use Fields from Lookup modules in Custom Views criteria and Advanced Filters

                                    Hello everyone, Zoho CRM now enables you to achieve deeper filtering of records in a module, using fields of a lookup, thereby enhancing your data management experience manifold. This filtering based on lookup module fields is now available in advanced
                                  • Update to CRM Custom Buttons: Collect Users' Location

                                    Hello everyone! Buttons in Zoho CRM allow you to extend the default CRM capabilities for your bespoke business needs. It provides the flexibility to connect to any third-party application to perform necessary actions. Wouldn't it be better, if those buttons
                                  • Super Admin Logging in as another User

                                    How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
                                  • Can I add Conditional merge tags on my Templates?

                                    Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
                                  • Enable integration of CRM CPQ functionality for ZohoOne customers using Zoho Finance application

                                    Hi there. I can't believe I'm needing to launch this idea as I would have thought this was a little obvious. Following a number of conversations with the technical team it's become evident that the CPQ functionality within CRM cannot integrate with Zoho
                                  • Creating packages according to actual shipping processes

                                    Hi community. I would like to ask a question to see if there's a better method or workflow for the creation of packages in Zoho Inventory. There is a little confusion in some of Zoho's language relating to the use of term Packing Slip when connected to
                                  • Lead Entry Strategy

                                    Hi there. Was wondering if anybody could share their strategy around lead entry into Zoho CRM. One of the challenges with Zoho CRM is a lead requires a last name. We want to capture companies that operate within our addressable market, and we often don't
                                  • Kaizen #78 : How to disable clone record?

                                    Hello everyone! Welcome back to another interesting Kaizen post. In this post, let us discuss a workaround solution for the use case - How to disable clone record for a user. Requirement Consider that you want to disable the clone option for the Deals
                                  • Mail bounces due to bad reputation

                                    Good evening. I'm seeing these errors from both hotmail/outlook and yahoo, as well as hard bounce from Virgin Media and talktalk for some time now. Bounce category: Connection issues Reason: uncategorized-bounce Message: 4.7.650 The mail server [136.143.188.237]
                                  • How to Automate an Unsubscribe based on Scoring

                                    I automatically assign a negative point score to bounced emails and would like to automate unsubscription of these emails from our Campaigns, without losing the contact data. (Oftentimes the lead is no longer at a business, but I want to keep the business
                                  • Set Default Status of Assembly to "Assembled" When Entered in UI

                                    I've just discovered the new "confirmed" status of Assemblies within Inventory. While I understand the intent of this (allowing for manufacturing planning and raw material stock allocation), it was initially confusing to me when manually entering some
                                  • Connection to other user

                                    Zoho Cliq handles sharing of Custom OAuth Connections that require individual user logins.
                                  • Support Bots and Automations in External Channels

                                    Hello Zoho Cliq Team, How are you? We actively use Zoho Cliq for collaboration, including with our external developers. For this purpose, external channels are a key tool since they work seamlessly within the same interface as all of our other channels
                                  • Zoho Inventory / Finance Suite - Extend Visibility of File Names on Attachment Fields

                                    Hi Inventory / Finance Suite team, I noticed recently that when you add an attachment field to a module in Inventory, only the first 8 characters of the file name are visible on the details view. 8 characters is not a useful amount and there is plenty
                                  • Social posts not saving as drafts or posting

                                    Over the past two days, I have written and modified the same post for 5 different channels 4 different times. They will neither save as draft, nor go through and load in the scheduler, nor will they post when I try to push it live now. In every case,
                                  • Add @Mention Notifications in Zoho Cliq for Zoho Project Mentions

                                    Hello Zoho Projects Team, We hope you are doing well. We would like to submit a feature request regarding "Projects Bot" Cliq bot notifications for @mentions inside Zoho Projects comments (Tasks and Issues). Current Behavior: At the moment, when someone
                                  • Related Lists in Email Templates

                                    Hi Zoho team, I would love to see a feature where related list information can easily be added to an email template (instead of mail merge). I have a client who books flights for their customers. They do this through a Flights module so all booked flights
                                  • Looking for other Zoho users in Canada

                                    I would like to find other users in Canada to share ideas and suggestions. To see if you are experiencing same issues re HST/taxes, banking, etc.
                                  • Drop Down Menu - Adding up values

                                    I have a form that has 22 drop down fields each having a value of 0-10 to choose from. Is it possible to have it add up the total value of those selected numbers and have it tally it up in another field at the end? So example: if each of the 22 fields
                                  • Bank Feeds

                                    Since Friday my bank feeds wont work. I have refreshed feeds, deactivate and reactivate and nothing is working
                                  • Zoho Books recurring invoicing link to a Zoho CRM Deal?

                                    With the Zoho CRM Finance Integration setup, normally when creating an invoice via Zoho CRM Finance Integration on a Deal, it creates the invoice in Zoho Books with the CRM Deal *Potential link for that invoice. Alternatively, if you create the invoice
                                  • Calculation on form submit not wokring unless i click F5

                                    I'm using the built in on succesful form submission option and running the code below but when i click submit my form just gets stuck with the blue loading icon and nothing happens until i click F5 and then the page reloads and the calculation does actually
                                  • Bank feeds not working properly

                                    My bank feeds (connected with UK Natwest bank) only refreshes with yesterdyas transactions and not giving me the transactions of today since last week, anoyne with the same problem or solition?
                                  • Error when subscribing to any iCal feed in Group Calendar

                                    When I try to add any iCal URL via Settings → Calendar → Calendars → Group Calendars → Manage → Subscribed by Group, Zoho pops up an ‘Internal Server Error’ and nothing is added in the ‘Subscribed by Group’ list. But - the feed then appears under my personal
                                  • Automatic Email Alerts for Errors in Zoho Creator Logs

                                    Hello, We would like to request a feature enhancement in Zoho Creator regarding error notifications. Currently, Zoho Creator allows users to view logs and errors for each application by navigating to Zoho Creator > Operations > Logs. However, there is
                                  • Feature Request: Estimated Delivery Date Display on Product Pages

                                    Dear Zoho Commerce Support Team I am writing to submit a feature request that I believe would greatly benefit all Zoho Commerce merchants: the ability to display an estimated delivery date directly on the product page. Today's e-commerce customers expect
                                  • Prefered Bin Missing in android APP

                                    Andoroid app dosent show preferred bin in the picklist. The workaround support reccomend is to use the computre to create the picklist. it shuld be information to be shown aas basic for the pciker.
                                  • UPS Label size when generated via Zoho

                                    We've integrated UPS with Zoho inventory. When creating and downloading the shipping labels they are created in a larger paper size. I'd like them to be generated to print on a 4x6 printer. Zoho have told me I need to do this within our UPS portal. UPS
                                  • Sessions

                                    When we close the POS Session the closing balance should be the opening balance of next session. But this auto fetching is not happening. When we do cash out for depositing cash to bank account it is recording as expenses (office supplied) in our zoho
                                  • Re: Application Architecture in Zoho Creator — A Platform-Specific Deep Dive

                                    A recent community post on application architecture made some excellent points about planning architecture early in Zoho Creator projects. The core message is right — Creator applications have a habit of growing organically into maintenance nightmares,
                                  • Marketer's Space: Bookmarks by Zoho Campaigns

                                    Hello Marketers, In this week's Marketer's Space, we'll look at a simple yet powerful feature that makes a big difference in your workflow: Bookmarks. Bookmarks is a built-in feature in Zoho Campaigns that enables you to create a personalized library
                                  • Zoho Commerce in multiple languages

                                    When will you be able to offer Zoho Commerce in more languages? We sell in multiple markets and want to be able to offer a local version of our webshop. What does the roadmap look like?
                                  • Zoho Forms for Vertical Studio Subscriber Organizations

                                    We’re excited to introduce the Zoho Forms integration with Vertical Studio. This allows you to capture data using forms and send it directly to your Vertical Studio modules. With this integration, form submissions can be used to create or update records,
                                  • Option+C shortcut conflict

                                    In the latest Cliq release, you introduced `Option+C` shortcut to start a new audio call. In Polish, `option+C` is used for letter `ć`. I changed this button combo but `Option+C` is still being blocked and doesn't allow me to write letter `ć`.
                                  • Announcing Zoho Sheet desktop app for macOS and Windows (Beta)

                                    Hello Sheet users, We know you’ve been waiting for this one. It has always been the top priority on our roadmap to provide a single native desktop app for macOS and Windows that works both online and offline. Today, we are excited to announce that the
                                  • What's New in Zoho Inventory | January - March 2026

                                    Hello users, The first quarter of 2026 has been dynamic! We’ve shipped a powerful set of updates in Zoho Inventory to enhance item control, improve warehouse efficiency, expand integration and reporting capabilities. From a unified item creation experience
                                  • Issue with Zoho Sheets

                                    Edit: Small Error of Opening doc and losing entire formatting while downloading to *.xlsx format. Also my formulas don't work while opening a document downloaded from Zoho sheets, since the colors aren't matched to the correct data. Even though the data
                                  • Next Page