I would like to update a ticket with a private note and a public reply. This can be accomplished via macro, so I'm curious if it can also be handled via the PUT update ticket end point. Something to the effect of:
{
"ticket": {
"comment": {
"body": "Did you try turning it off and back on again?",
"public": true
},
"comment": {
"body": "This customer can't keep from setting their printer on fire",
"public": false
}
}
}
Thank you for contacting the Zendesk Support Advocacy team. My name is Ryan and I'll be assisting you today. I understand that you want to include a public and private comment in a single API. Is this correct?If that is the case, you are unable to include both a public and a private comment in one API call using the PUT /api/v2/tickets/{id}.json endpoint in Zendesk.
Why?
Zendesk's API expects only one comment per request, and it must be provided in a single comment object. You cannot include multiple comment objects in the same payload — doing so would overwrite the earlier one (because JSON keys must be unique).
If you want to post both a public reply and a private note, you need to do two separate API calls, like so:
Kindly inform me if the information provided was useful.
Please note, the ticket will be resolved automatically after a few days if we don't hear back from you, but you can always reply which will either reopen your ticket or create a follow-up.