Talk API: Using the Delete Recording endpoint
You can use the Delete Recording endpoint in the Talk API to programmatically delete call recordings from any of your tickets. This tutorial shows you how to use the the Delete Recording endpoint to delete a call recording.
Make sure you’re authorized to use the API in your Zendesk Support account. To learn more about getting access to the API, see Enabling password or token access in the Support Help Center. If you're not a Support admin, ask one to give you access to the API.
Once you have your authorization credentials (either email and password or an API token), you can start making API requests.
This tutorial uses Postman to make API requests. If you don't use Postman, you can download the free app for Windows or macOS from the Postman website.
Make sure to specify your Zendesk authorization credentials for your requests in Postman. See Authorization in the Postman docs.
Disclaimer: Zendesk can't provide support for third-party technologies such as Postman.
Deleting a call recording consists in identifying the ticket comment that contains the recording, identifying the recording in the comment, then deleting the recording.
Identify a ticket in your account that contains a recording. It should appear as a voice comment in the ticket. Example:
Note the ticket id from the ticket URL in the web browser address:
Use the ticket id to retrieve the ticket comments.
In Postman, make a GET request to the List Comments endpoint:
In the example, the ticket id, 23213427, is specified as a path variable.
The endpoint returns JSON data containing all the comment metadata related to this ticket, including the
call_idproperty that identifies the recording:
In the example,
Note the value of
call_idin the comment that contains the recording.
Use the call id with the Delete Recording endpoint to delete the recording.
To do this, select the DELETE method in Postman and ping the Delete Recording endpoint:
Replace the subdomain and call id with your own values.
Make sure to select DELETE from the method dropdown on the left side.
After clicking Send, you’ll get a confirmation in the Response window in Postman that the message has been deleted.
For more information, see Delete Recording in the Talk API reference docs.
A call can have two recordings associated with it. The two recordings will have different types that you can retrieve from the voice comments payload and then use to delete one of the comments.
To delete a call recording by type
Follow steps 1-3 from the previous section. A voice comment should contain a
recording_typeproperty along with the
Note: Voice comments created before January 10, 2020, won't have a
recording_typeproperty. For those comments, follow the approach in the previous section, "Deleting a call recording".
Note the value of
recording_typein the comment that contains the recording.
Make a request to the Delete Recording endpoint using the
In Postman, select the DELETE method and paste the Delete Recording endpoint into the address field. Example:
Replace the subdomain, call_id, and recording_type with your own values.
After clicking Send, you’ll get a confirmation in the Response window that the message was deleted.