Prompts API

Overview

Prompts is a centralized assistant platform that allows you to manage audio prompts independently of Studio flows. This means that you can replace, rename, and delete existing audio file prompts without having to change multiple voice components in a Studio flow. The Prompts API provides the ability to manage audio prompts:

  • Create an audio prompt: create a new prompt with a name and description, request an upload link, and upload the audio file (MP3 or WAV format and a maximum size of 10 MB). Once the prompt is created, it is available to be used when setting up the audio component. E.g.,: “Play audio”, “Input IVR” (among other components in the Studio Preferences tab > Audio file upload > Search the prompt created in the Audio file field).
  • Consult audio prompts: list audio prompts, with filters and pagination, and get the detail and the audio file of each prompt. You can also get the audio prompt usage and the list of flows using the prompt.
  • Update an audio prompt: delete an audio prompt, update the name, and description, and/or replace an audio. All components that use that prompt will play the new audio on runtime.

Business Context

What Can You Achieve with the Prompts API?

The Prompts API allows customers to build automations to manage audio prompts without the need to access the user interface.

Business Problems the Prompts API Solves

The Prompts API lets you bring audio prompts from external systems into your Talkdesk account. You can use this API to create a script that generates upload links and imports the audio files. Conversely, you can also export audio prompts from Talkdesk by using a script to get a list of the prompts and download each file.

What the Prompts API doesn't Support

The Prompts API doesn’t provide built-in bulk operations. The Prompts API can be used by customers to develop scripts to implement their own bulk operations.

📘

Use Cases

Use Case 1
As a real life example, consider the scenario where a contact center admin wants to import all the audio files from an external platform into Talkdesk. The Prompts API can be used by a customer script that creates a prompt for each of the audio files. This script must include the API request to create a prompt, generate an upload link and/or upload a file.

Use Case 2
As a real life example, consider the scenario where a contact center admin wants to export all the audio files from a Talkdesk instance into a new Talkdesk instance. The Prompts API can be used to download all the audio files from an old Talkdesk instance, and be used by a customer script to create the prompt on the new Talkdesk instance.

Use Case 3
As a real life example, consider the scenario where a contact center admin wants to back up all the audio prompts. The Prompts API can be used to download all those audio files.

Use Case 4
As a real life example, consider the scenario where a contact center admin wants to get a list of all flows using audio prompts. The Prompts API can be used to get the list of those audio prompts, and all the flows that are using them.

Use Case 5
As a real life example, consider the scenario where a contact center admin wants to set a new IVR message in an Incoming Call flow. With the Prompts API, it is possible to update the file associated with a prompt. In order to do this, please follow these steps:

  • Generate an upload link using the Prompts Request Link (to Upload Audio File) API request. This will provide an id and a link to upload the audio file.
  • Upload the file using a PUT request to the generated upload link.
    Get the Prompts Detail by its ID in order to retrieve the recently updated file name and description, if needed.
  • Using the Prompts request id and the original prompt name and description, use the update Prompt (PUT) endpoint to change the prompt file. It is necessary to pass the id of the "prompts-request", a filename (which will be used as a template to generate the filename on the storage provider) as well as the name and the description of the prompt.

👍

Access and Registration

Authentication

Usage

📘

Supported Regions and Base URLs

👍

API Availability

The Prompts API has been in General Availability since July 2023.

Troubleshooting

If you have questions or technical issues, please open a ticket using this form.