Delete an audio recording (API)

API > API articles > Delete an audio recording (API)

This article explains how to delete an audio recording using API.

In this article

Overview

When a queue is enabled to record audio, or when a user manually turns on audio recording on an interaction, the platform creates an audio recording file that it stores for future playback and reference. The Avaya.cx platform keeps the file in storage indefinitely, ensuring that users with adequate permissions can reference it at any time.

The platform can record audio from phone calls for playback and coaching.

The API platform also gives you the ability to delete audio recordings. A user with adequate permissions can likewise locate and delete an audio recording by using our API.


Continue reading this guide to learn how to use the API Platform to delete audio recording files from our storage.

Prerequisites

User permissions

Your user needs a couple of user permissions enabled before you can delete audio files with our API:


The API and Call Recordings permissions need to be enabled on the user who will execute the API request. Navigate to Console > Account > Users > [User] > User Permissions.

An administrator can add these permissions to your user account by logging into Console.

Postman

Postman is the most common tool for using our API. To learn how to set up Avaya.cx API in Postman, you can watch this tutorial video or check out our API documentation at apidocs.avaya.cx.

For documentation on the Delete Recording API route, see: Delete Recording - Avaya.cx API Docs.

Part 1: Locate the recording you want to delete 

The Delete Recording route requires you provide an identifier for the file you want to delete. It accepts two types of identifiers:


Locate recording by interactionId

If you know that the audio recording was generated during an interaction, you can provide the interactionId to find and delete the recording.

The interactionId is a string beginning with 004. When viewing an interaction, it appears in the URL bar of Google Chrome.

A common way of finding an interaction ID is in the URL bar. The ID is a string beginning in 004.

See the links below for additional methods on locating a particular interactionId:


Locate recording by workflowSessionId

If you know that the audio recording was generated from a particular workflow session, you can provide the workflowSessionId to find and delete the recording. The workflowSessionId is a string beginning with 028

With a workflow session report, you can track down workflow sessions that resulted in audio recordings.

Part 2: Running the request in Postman

Before running the request in Postman, make sure you’ve set up Postman as described in the Prerequisites section above.

2. In the Value column of the Path Variables section, provide the unique identifier collected in Part 1. This should be either a:

3. Click Send.

4. Check the Response section to see if the request succeeded or failed.

Success: When deleting the recording is successful, the response returns the interaction identifier.

Failure: If you get a message saying the user doesn’t have permission to delete the recording, check to make sure that the user executing the API request has the Recordings permission. Check the User permissions section above for more info.

Failure: If you get a message saying recording not found, it could mean that the recording has already been deleted. It could also mean that the resource provided doesn’t have a recording, or that an incorrect value has been provided. Double-check to make sure that the provided value is correct.

Read more