Closed gulios closed 2 years ago
You have to use the Ticket endpoint for that.
$updateTicket = $client->tickets()->update( $ticketId, [ 'comment' => [ 'body' => 'My comment', ], ... ] );
However, that will create the comment as if your admin user (the user you generated the API token with) would have left it.
To create a new comment on behalf of the user you'd need to send a custom header (X-On-Behalf-Of: user@somewhere.com) which, as far as I can tell right now, is not supported by this SDK.
Nevermind, just discovered https://github.com/zendesk/zendesk_api_client_php/issues/458#issuecomment-709351409 that should help you as well.
great, it works ;) Thank you
Can't find method "add comment" to existing ticket.
// getting all comments for ticket $client->tickets(ID)->comments()->findAll();
Now i want to add comment with attachments to specific ticket. Same thing as agent can do via panel or cx replaying to specific email/ticket.
Is it possible ? How?
Thank you