Zoho Desk API : Update an articles returns Unsupported Media Type error

Zoho Desk API : Update an articles returns Unsupported Media Type error

Hi,

Our domain name recently changed and unfortunately we cannot create a 301 redirect to our new domain. 
This results in us having to update our domain name references in our ~500 Zoho Desk articles and ticket answers. 

Since doing a bulk search and replace is not an option in Zoho Desk and updating 500 articles by hand would be very tedious, I'm trying to use the Zoho Desk API to: 

1. Retreive the articles (done!)
2. Update the articles (done!)
3. Update the articles using the 'Update an article' function of the Zoho Desk API.

My problem is with #3, using the Zoho Desk API to update the article. (https://desk.zoho.com/DeskAPIDocument#Articles#Articles_Updateanarticle)

I wrote the following code: 

// Consts
orgId = "20065186XXX";
articleId = "17121000023114XXX"; // ArticleId for testing purposes

// Headers
headerMap = Map();
headerMap.put("Content-Type","application/json");

// Parameters
paramMap = Map();
paramMap.put("title","Hello");
paramMap.put("answer","World");
info paramMap;

// Request URL
requestUrl = "https://desk.zoho.eu/api/v1/articles/" + articleId + "?orgId=" + orgId;

// Update Article
updateArticle = invokeurl
[
url :requestUrl
type :PATCH
headers :headerMap
parameters :paramMap 
connection :"deskarticles"
];

return updateArticle;

To me, it would seem that this code should work. However, when I try to run this I'm receiving the following error: 

{"errorCode":"UNSUPPORTED_MEDIA_TYPE","message":"The given content type is not supported. Please provide the input Content-Type as application/json"}

Some help in how to fix this would be very much appreciated.

      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 WorkDrive Resources



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





                                                                            Design. Discuss. Deliver.

                                                                            Create visually engaging stories with Zoho Show.

                                                                            Get Started Now