Updates to Threads APIs and the List All Attachments API

Updates to Threads APIs and the List All Attachments API

At Zoho Desk, we believe that convenience and consistency are key factors in delivering a good user experience, be it for the end-users of Zoho Desk or the developers who build upon Desk's features and functionalities. As an extension of this belief, we have now updated a payload parameter pertaining to the APIs for ticket threads and a query parameter pertaining to a ticket attachments API. 


Here is more information on these two updates:


1. Replacing uploads with attachmentIds in Threads APIs

Currently, the APIs related to threads use the uploads key to refer to thread attachments. When this key is used, all attachments are always appended to the thread; there is no provision to remove existing attachments from the thread.


Therefore, to overcome this issue, we are deprecating the uploads key and introducing the attachmentIds key, which will retain only the attachments included in the payload. Like uploadsattachmentIds also accepts a JSON array of IDs. 


Listed below are the different ways in which you can use the attachmentIds key:

  • To include an attachment while creating a draft thread, use the following payload: 

POST https://desk.zoho.com/api/v1/tickets/{ticketId}/draftReply

{

"channel" : "EMAIL",

"content" : "Thread content",

"fromEmailAddress":"example@example.com",

"to":"example@example.com",

"attachmentIds":["1000000001","10000000002"]

}

  • To remove an attachment from a thread, exclude the ID of the attachment in the payload's attachmentIds key value. To append a new attachment to a thread, send the ID of the attachment along with the other IDs in the attachmentIds key value.
  • To remove all existing attachments from a thread, send an empty array in the payload's attachmentIds key value.

Note: If the attachmentIds key is not present in the payload, all existing attachments in the thread will be retained.



2. Replacing range with limit

The List all attachments API under the Ticket Attachments module currently uses the range query parameter to specify the number of attachments to retrieve. All other Zoho Desk APIs use the limit parameter to perform the same action. Therefore, the range parameter is also deprecated and replaced with the limit parameter in this API. 


We request you to implement these changes wherever you have used thread APIs and the List all attachments API in your tools. However, to ensure a smooth transition, we will be supporting the old keys too, until the 18th of February, 2018.

    Access your files securely from anywhere

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