Question
How can I add a comment to a ticket using the API?
Answer
To add a comment to a ticket using the API use the Update Ticket endpoint, instead of using the Ticket Comments endpoint.
Recent searches
No recent searches
Edited Jan 22, 2024
How can I add a comment to a ticket using the API?
To add a comment to a ticket using the API use the Update Ticket endpoint, instead of using the Ticket Comments endpoint.
2
Zendesk uses web cookies to collect information about you when you visit our Site. This information might be about you, your preferences, or your device. At Zendesk, we may use this information for purposes that include ensuring basic functionality of our Sites; remembering user preferences, including your cookie preferences; measuring the effectiveness of our Sites, marketing campaigns, and email communications; and personalizing online content.
Please review the different category headings below to learn more and adjust the cookie settings on your current device. Please note that you will need to ensure that each web browser is adjusted to reflect your preferences if you use different computers or mobile devices.
For more information about how Zendesk uses web cookies, please see our Cookie Notice.
Essential cookies enable core site functionality. These cookies are necessary for the Site to function and cannot be switched off in our systems. You may set your browser to block or alert you about these cookies, but parts of the website may not function properly.
Functional cookies enable the Site to provide enhanced functionality and personalization. These cookies may be set by us or by third-party providers whose services we have added to our Site.
Analytics cookies allow us to count visits and traffic sources so we can measure and improve the performance of our Site. These cookies help us to know which pages are the most and least popular and see how visitors move around the Site.
Targeting cookies, such as social media cookies, may be set through our Site by our advertising service providers, third-party advertisers, ad networks, or data exchange partners. These cookies may be used to show you relevant advertising on other third-party sites.
18 comments
Chris Green
Madison Hoffman - I am using the Tickets API to import tickets from a legacy ticketing system. I can successfully import and create all tickets, but then I'd like to import Notes/comments for the tickets. I'm trying to use the Tickets API using a PUT (see below), but no luck.
0
Dave Dyson
You'll want to use the Ticket Bulk Import API endpoint for this, which will allow you to add comments and set the comment dates as part of the API call -- see Ticket Import in our API docs for more details.
0
Chris Green
@... - perfect, thank you! Works like a charm!
0
Dave Dyson
0
Vaibhav Agarwal (Vibs)
@...
I'm stuck at this issue from quite some time. Pl help!
I'm unable to create a public comment when I specify property author_id. When I specify `author_id` then only private ticket is created. if I'm remove `author_id` property completly then the comment is being posted from the user name from which I created bearer token (i.e admin).
Detailed screenshots are given https://support.zendesk.com/hc/en-us/community/posts/4930070400794-Unable-to-create-a-public-comment-in-a-zendesk-ticket-with-specified-author-id
0
Christopher Kennedy
Double check the author's role permissions. The agent may not have permission to add a public comment to the ticket. This is also expected behavior if the author is a light agent.
0
Vaibhav Agarwal (Vibs)
Thanks Christopher Kennedy it was really helpful. However rather than absorbing this error ideally zendesk should raise exception as `true` property is not allowed for lite-agents.
0
BI CX
Hi!
i'm trying to update a ticket with a public commentary with this:
{
"ticket": {
"comment": {
"body": "Oi, tudo bem?\nSou do time de Atendimento de Contestações da Kovi e estamos aqui para dar seguimento referente à sua dúvida de contestação em andamento conosco.\nPodemos prosseguir por aqui?",
"public": true
}
}
}
It's working if i send it by e-mail channel, but it didn't work with Messaging channel. How can i update a message's ticket with a public commentary?
Thanks!
2
Dane
It seems that you have already submitted for this concern. Please continue to work with our Support Team regarding this matter.
Cheers!
0
John
Hello experts! I have a ShipStation API to pull order info. In the response I had to add the extremely long USPS URL with the orderID variable. It pulls the tracking number but with all the url info. Is it possible to just have the tracking number only displayed as a hyperlink?
Thank you!
0
Dane
The update endpoint will just use whatever value is in the payload from ShipStation API. Due to this, it's not directly possible.
0
siddusidharthar
hi ,
how to tag or mention someone in internal comments of a ticket,while making a comment through api?
thanks
1
Noly Maron Unson
Hi Rahul,
The agent then needs to manually select which agent they wish to use from the @mention auto-complete menu. I'm afraid it currently isn't possible to use this feature within API. I feel like this would be good to point out to our developers in our Product Feedback forums as a feature request that you would like to see in the future!
Hope this helps.
0
Srinivas Gundeti
ticket created in zendesk with normal body, after ticket creation I am updating same ticket with html body, some data is erased from ticket. like address information. please can some one help. this is my java code.
StringBuffer downMsgHtml = new StringBuffer();
Comment commentHtml = new Comment();
if (siteDownList != null && siteDownList.size() > 0) {
OutageHistoryTicketsTable(downMsgHtml, siteDownList.get(0), urlMap);
if (downMsgHtml != null && downMsgHtml.length() > 0) {
commentHtml.setHtmlBody(downMsgHtml.toString());
commentHtml.setPublic(false);
createdTicket.setComment(commentHtml);
zd.updateTicket(createdTicket);
}
}
0
Juan Manuel Giannini
Hi. I'm interested in knowing how to make this work on messaging channels:
I'm trying to update a ticket with a public commentary with this:
{
"ticket": {
"comment": {
"body": "Oi, tudo bem?\nSou do time de Atendimento de Contestações da Kovi e estamos aqui para dar seguimento referente à sua dúvida de contestação em andamento conosco.\nPodemos prosseguir por aqui?",
"public": true
}
}
}
It's working if i send it by e-mail channel, but it didn't work with Messaging channel. How can i update a message's ticket with a public commentary?
I'm experiencing the same issue.
0
Noly Maron Unson
Hi Juanma,
You're correct that the Ticket update API will work for email channel but not for messaging. You will need to have Sunshine Conversation and leverage the Sunshine Conversation API.
Hope this helps.
1
Juan Manuel Giannini
Hi Noly! Thank you. Could you elaborate? I think we have Sunco integrated, but I'm not sure. And what would leverage Sunco Api mean? Thanks!
0
Paolo
Sunshine Conversation API is the API used for Messaging conversations. This has a different subscription and to better understand this, please refer to this link and proceed with the Free Trial. If you have an Account Executive, you may reach out to them as well.
Best,
Paolo | Technical Support Engineer | Zendesk
0