Question
How do I set an external ID of a Zendesk Support ticket?
Answer
A Support ticket's external_id attribute is a string that can be used as a reference to third-party system records. To set an external ticket ID, leverage our Support API using the Update Ticket endpoint and include the external_id value in the body of the request:
PUT /api/v2/tickets/{id}.json
The body of the PUT request would look like:
{
"ticket" : {
"external_id": "ABC123"
}
}
Replace {id} with the ID of the ticket to update. Replace ABC123 with the string of the external ID you wish to set for that ticket.
For more information on how to see the update live on your ticket, see this article: Viewing all events of a ticket.