Adding voice comments to tickets
Instead of adding a written comment to a ticket, you can add a voice recording as a comment. In the agent interface, the voice comment includes controls to play or stop the voice recording:

You must provide a url to a hosted voice recording. Zendesk doesn't store the recording file: it stores a link to the file. The audio file must be a MP3 or WAV file.
A Talk account is not necessary to add voice comments to tickets.
Adding a voice comment
Add a ticket voice comment to a ticket by including a voice_comment object in the ticket object when creating or updating the ticket. Example:
curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json \-d '{"ticket": {"voice_comment": { ... }}}' \-H "Content-Type: application/json" \-v -u {email_address}/token:{api_token} -X PUT
See Voice comment object below for details about the voice_comment object.
Comments are normally added using the Tickets API, not the Ticket Comments API. See the following endpoints in the Tickets API docs:
Voice comments can also be added to tickets with the Create a Voice Comment on a Ticket endpoint in the Talk Partner Edition. See Creating a voice comment in a ticket in the Talk Partner Edition developer guide.
Adding a voice comment to a ticket is logged as a voice comment event in ticket audit logs.
Voice comment object
A voice comment is represented as a JSON object with the following properties:
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| from | string | yes | Incoming phone number |
| to | string | yes | Dialed phone number |
| recording_url | string | yes | URL of the recording. The audio file must be a MP3 or WAV file |
| started_at | date | yes | Timestamp of the call as a ISO 8601 string. Example: 2019-04-16T09:14:57Z |
| call_duration | integer | yes | Duration in seconds of the call |
| answered_by_id | integer | no | The agent who answered the call |
| transcription_text | string | no | Transcription of the call |
| location | string | no | Location of the caller |
Example
data.json file
{"ticket": {"voice_comment": {"from": "+16617480240","to": "+16617480123","recording_url": "http://yourdomain.com/recordings/1.mp3","started_at": "2019-04-16T09:14:57Z","call_duration": 42,"answered_by_id": 28765,"transcription_text": "The transcription of the call","location": "Topeka, Kansas"}}}
curl request
curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json \-d @data.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST