Adding contact role to a specific deal js sdk malfunctioning

Adding contact role to a specific deal js sdk malfunctioning

i was trying to add the contact role to a specific deal contact but repeatedly i am getting this error:
{
    "code": "SUCCESS",
    "details": {
        "statusMessage": {
            "code": "INVALID_DATA",
            "details": {
                "expected_data_type": "jsonobject"
            },
            "message": "body",
            "status": "error"
        },
        "status": "true"
    },
    "message": "Connection invoked successfully",
    "status": "success",
    "$responseHeaders": {
        "x-ratelimit-remaining": null,
        "x-ratelimit-limit": null,
        "x-ratelimit-reset": null
    }
}

My code:

   const payload = {
      data: [
        {
          Contact_Role: {
            id: roleId,
          },
        },
      ],
    };

    const response = await ZOHO.CRM.CONNECTION.invoke("crm_connection", {
      method: "PUT",
      headers: { "Content-Type": "application/json" },

      body: JSON.stringify(payload),
    });

    console.log("Zoho CRM Response:", response);

Struggling a lot, no matter how i do this, i am getting the same result.

    Access your files securely from anywhere

        All-in-one knowledge management and training platform for your employees and customers.






                              Zoho Developer Community




                                                    • Desk Community Learning Series


                                                    • Digest


                                                    • Functions


                                                    • Meetups


                                                    • Kbase


                                                    • Resources


                                                    • Glossary


                                                    • Desk Marketplace


                                                    • MVP Corner


                                                    • Word of the Day


                                                    • Ask the Experts



                                                              • Sticky Posts

                                                              • 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.
                                                              • Kaizen #226: Using ZRC in Client Script

                                                                Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
                                                              • Kaizen #222 - Client Script Support for Notes Related List

                                                                Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
                                                              • Kaizen #217 - Actions APIs : Tasks

                                                                Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
                                                              • Kaizen #216 - Actions APIs : Email Notifications

                                                                Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are


                                                              Manage your brands on social media



                                                                    Zoho TeamInbox Resources



                                                                        Zoho CRM Plus Resources

                                                                          Zoho Books Resources


                                                                            Zoho Subscriptions Resources

                                                                              Zoho Projects Resources


                                                                                Zoho Sprints Resources


                                                                                  Qntrl Resources


                                                                                    Zoho Creator 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


                                                                                              Zoho Show Resources

                                                                                                Zoho Writer

                                                                                                Get Started. Write Away!

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

                                                                                                  Zoho CRM コンテンツ



                                                                                                    Nederlandse Hulpbronnen


                                                                                                        ご検討中の方




                                                                                                                • Recent Topics

                                                                                                                • Standardize your booking forms with Centralized Customer Form

                                                                                                                  We’re excited to introduce Centralized Customer Form, a new way to manage and standardize how customer information is collected across your event types. With this feature, you can define a common set of booking form fields once and apply them across your
                                                                                                                • Zoho Creator In-App Notification

                                                                                                                  Hi Team, I have implemented an in-app notification using code, as it required some customization. I followed the example in the link below: https://www.zoho.com/deluge/help/pushnotify-using-deluge.html#Example I have a couple of questions regarding this
                                                                                                                • Add Flexible Recurrence Options for Meeting Scheduling in Zoho Cliq (e.g., Every 2 Weeks)

                                                                                                                  Hello Zoho Cliq Team, We hope you are doing well. Currently, when scheduling a meeting inside Zoho Cliq, the recurrence options are limited to Daily, Weekly, Monthly, and Yearly. There is no ability to set a meeting to occur every X weeks — for example,
                                                                                                                • 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
                                                                                                                • In App Auto Refresh/Update Features

                                                                                                                  Hi,    I am trying to use Zoho Creator for Restaurant management. While using the android apps, I reliased the apps would not auto refresh if there is new entries i.e new kitchen order ticket (KOT) from other users.   The apps does received notification but would not auto refresh, users required to refresh the apps manually in order to see the new KOT in the apps.    I am wondering why this features is not implemented? Or is this feature being considered to be implemented in the future? With the
                                                                                                                • Unable to Log In to FSM Mobile App

                                                                                                                  Hello FSM Team, We are encountering an issue when logging in to the FSM mobile app. When entering the user email, the system shows the error: “This account does not exist.” However, the same user is able to log in successfully via web (fsm.zoho.com).
                                                                                                                • Clarification on “Change Owner” vs Dispatcher Role in Work Orders

                                                                                                                  Hi Mr. Abid, Good day! We would like to understand the purpose and correct usage of the “Change Owner” option in the Work Order module. As we noticed, there is an option to Change Owner in the Work Order. At the same time, there is also a separate field/role
                                                                                                                • Workflows being applied and the Large unwanted popup

                                                                                                                  When a workflow is being applied do to an action, then the Agent is left with a large Window asking if they would like the see the changes this workflow did. Is there any way to disable this prompt from appearing?
                                                                                                                • New Income Tax Act 2025 and Rules 2026 for India (Effective 1 April 2026)

                                                                                                                  Hello everyone, The Income Tax Act 2025 came into effect from 1 April 2026. This new law replaces the old Income Tax Act of 1961. Along with the new Act, the Income Tax Rules 2026 have also been released by the government. These updates bring practical
                                                                                                                • Facturation électronique 2026 - obligation dès le 1er septembre 2026

                                                                                                                  Bonjour, Je me permets de réagir à divers posts publiés ici et là concernant le projet de E-Invoicing, dans le cadre de la facturation électronique prévue très prochainement. Dans le cadre du passage à la facturation électronique pour les entreprises,
                                                                                                                • How can I delete a user profile created ?

                                                                                                                  I can't delete custom profiles created. Why ?
                                                                                                                • Search API filter/sort ignores comment-triggered modifiedTime updates

                                                                                                                  Summary When a comment is added to a Call or Account, the parent record's modifiedTime is correctly bumped. This bumped value is visible in: GET /api/v1/calls/{id} ✅ GET /api/v1/calls/search without a filter ✅ — the record's response body shows the new
                                                                                                                • ZOHO Cadence

                                                                                                                  Can you edit when a cadence is set to enroll? For instance, I currently have it set up to enroll three days after a new record is created that fits the custom view criteria; however, I would like to change it to enroll immediately. I do not see where
                                                                                                                • Automate the file import step

                                                                                                                  Hello everyone, I have a Sales - 'Account' category, and currently import the file to update it as follows: Import Accounts - From File - Update existing Accounts only - select and match the field the CRM. Since we have been using Microsoft 365 SharePoint.
                                                                                                                • 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
                                                                                                                • What's New in Zoho Billing | March 2026

                                                                                                                  March is here with a fresh wave of updates to Zoho Billing. From making compliance easier, reporting more flexible, to making day-to-day workflows smoother across the board. Here's everything that's new this month. Introducing Usage-Based Billing Reports
                                                                                                                • Dynamic Multi-Staff Selection for Ad-Hoc Bookings

                                                                                                                  Summary Allow customers or internal schedulers to select specific staff members at the time of booking, with Zoho Bookings automatically surfacing only the time slots where all selected members are simultaneously available. Current Behaviour Zoho Bookings
                                                                                                                • How Can I Clear Deleted Members and Free Up Their Storage?

                                                                                                                  Can we remove these deleted members and free up their storage?
                                                                                                                • Zoho Form not synching with Zoho CRM in CRM email template

                                                                                                                  I have in the past successfully created an email template that has access to a Zoho Form in the url link to Forms in the email template. I am in the Contact Module of the CRM and I have created a Form for contacts and mapped the two. I am using the upsert
                                                                                                                • Zoho Books Create Invoice API

                                                                                                                  I am creating zoho invoices via the API.  Now that zoho has released sub-accounts, i'd like to create invoices and link them to sub-accounts within "sales" account.   For example; my chart of accounts looks like this; Sales ->Website Sales    ->Campaign Sales ->Offline Sales However, when I try to pass these accounts to the API, I receive an error that only Bank accounts can be passed with the create invoice.  
                                                                                                                • Multiselect lookup in subform

                                                                                                                  It would be SO SO useful if subforms could support a multiselect look up field! Is this in the works??
                                                                                                                • Ability to Set Text Direction for Individual Cells in Zoho Sheet

                                                                                                                  Dear Zoho Sheet Team, We hope you are doing well. We would like to request an enhancement in Zoho Sheet that allows users to set the text direction (right-to-left or left-to-right) for individual cells, similar to what is available in Google Sheets. Use
                                                                                                                • Contact not saved after editing

                                                                                                                  Hi. I discovered a couple of problems with Zoho contact. (1) BUG. Contact is not saved after editing. If you edit an existing contact by putting a bracket in one of the fields you get the message "Contact updated successfully" but nothing is saved. All updates (including the other fields) are lost. Steps to reproduce. Go to an existing contact and change the first name to "Robert (Bob)". (2) In the phone number fields you can only save numeric data (0 to 9). This seems an unneccessary restriction.
                                                                                                                • Zoho Mail Android app update: UI revamp

                                                                                                                  Hello everyone! We are excited to share that the first phase of the Zoho Mail Android UI revamp is now live. In this update, we have redesigned navigation bar at the bottom to quickly access the Email, Calendar, Contacts, and Settings modules. Also, the
                                                                                                                • Opt-out from mailing list means can't email at all??

                                                                                                                  It seems that if a contact unsubscribes from a mailing list the only way to email them is to uncheck the email opt-out box first, then re-check after the email has been sent. I've been through a chat with support and they confirmed this. This seems bizarre.
                                                                                                                • Email Opt Out Question

                                                                                                                  Has the problem where if a customer is emailed opt out prevents you sending standard emails? For me this feature is simply to stop any email marketing and should not block people from receiving emails via Zoho mobile, which makes no sense.
                                                                                                                • Items Landed Cost and Profit?

                                                                                                                  Hello, we recently went live with Zoho Inventory, and I have a question about the Landed Cost feature. The FAQ reads: "Tracking the landed cost helps determine the overall cost incurred in procuring the product. This, in turn, helps you to decide the
                                                                                                                • Bank Feeds

                                                                                                                  Since Friday my bank feeds wont work. I have refreshed feeds, deactivate and reactivate and nothing is working
                                                                                                                • Show backordered items on packing slip

                                                                                                                  Is it possible to show a column on the Packing Slip that shows number of backordered items when a PO is only partially filled? I would also like to see the Backordered column appear on POs after you receive items if you didn't get ALL of the items or partial amounts of items. And lastly, it would be nice to have the option of turning on the Backordered column for invoices if you only invoice for a partial order. -Tom
                                                                                                                • Users I've shared the sheet with cannot use the Custom Functions

                                                                                                                  Hi, I have a Zoho Sheet worksheet that I shared to 2 colleagues, giving them full access: In that worksheet, I created a button with a custom Deluge function and it works flawlessly for me: For those I shared the worksheet to, when they click the button,
                                                                                                                • Introducing parent-child ticketing in Zoho Desk [Early access]

                                                                                                                  Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
                                                                                                                • Newby Questions

                                                                                                                  Q1. The top bar of Zoho Books has a "Search in Banking (/) " field. What is the proper use of this text box? - Searching for Amazon for example has no results but there are transactions. - Is the search case sensitive? - Are regular expressions allowed?
                                                                                                                • Add Custom Fields only in Customer module and not on supplier module!? Is not there a way to do that!?

                                                                                                                  I am trying to create custom fields on clients module but it also gets created on suppliers module; which of course does not make sense at all as a lot of custom fields are client or supplier specific but never both. I am missing something? This seems
                                                                                                                • Inventory "Bulk Actions" button - add more fields to "Bulk Update > Select a field"

                                                                                                                  Can we not get a lot more actions that are commonly used by customers into the "More Actions" button on the Inventory list? More fields listed in the Bulk Update > Select A Field? Possible Bulk update Fields Preferred Supplier ( to quickly move items
                                                                                                                • Using Email Triggers on Zoho Flow

                                                                                                                  Hello, I'm sending the email to create the variables as this article says: https://help.zoho.com/portal/en/kb/flow/user-guide/create-a-flow/articles/email-trigger#How_email_trigger_works But the collection of the variables only seems to work when the
                                                                                                                • Zoho Bookings - Provide Appointment System ID in Zoho Flow Variable

                                                                                                                  Hi Bookings Team, It would be great if you could provide the system record ID for appointments as a variable in Zoho Flow trigger outputs and Fetch Appointments action. This would allow us to create a dymanic URL which can be clicked by a staff user to
                                                                                                                • Tip #7: Customize the appointment confirmation page

                                                                                                                  A confirmation page plays a crucial role in creating the first impression, as that's where customers land when booking with you. It shows your brand identity, engages your audience, and drives more conversions. Yet, this section is often overlooked when
                                                                                                                • WhatsApp Calling Integration via Zoho Desk

                                                                                                                  Dear Zoho Desk Team, I would like to request a feature that allows users to call WhatsApp numbers directly via Zoho Desk. This integration would enable sending and receiving calls to and from WhatsApp numbers over the internet, without the need for traditional
                                                                                                                • Show backordered items on packing slip

                                                                                                                  We send out a lot of large orders, and often there are one or two things backordered. How can I fix the packing slips to show quantity ordered  & quantity packed There should also be the ability to "ship" 0 of an item so the receiver knows that things
                                                                                                                • How do you create an event/meeting in a different time zone?

                                                                                                                  Does anyone know how do you create an event/meeting in a different time zone? 
                                                                                                                • Next Page