Submit an Interaction

Declare a Transcript

// Overview

The first step in processing any interaction is to declare the interaction.

When the POST request successfully executes, an HTTP status is returned to indicate the request was successful, along with a JSON response containing the interactionIdentifier.

Sample API Response


It is important you store the interactionIdentifier as it will serve as a required parameter for all other ElevateAI endpoints, enabling you to POST, GET, and/or DELETE information associated with this interaction.

If an error occurs when requesting to declare the interaction, a standard HTTP response code is retuned to indicate the request was unsuccessful, along with a JSON response containing additional details to assist in troubleshooting.

All interactions successfully declared will count towards your monthly request quota, irrespective of file upload status or processing outcome.



Only interactions successfully processed are eligible for billing. Once declared, you are able to confirm the processing status of the interaction as well as track impacts to usage and spend.



// Request Parameters & Code Examples

Details on CX AI features supported by language can be found on the overview page.

POST
Request
Header Parameters
X-API-Token
required
String
Valid API key associated with your account for authentication and usage tracking
Content-Type
required
String
Will be 'application/JSON'
Body Parameters
type
required
String
Type of interaction to be processed, will be "transcript"
languageTag
required
String
Primary language of transcript, will be "en-us" (for North American English), "en" (for International English), or "es-419" (for North American Spanish)
vertical
required
String
Vertical associated with interaction, will be "default"
transcript
required
Object
transcript text to be analyzed (see below)
Curl
Node.js
JS
Python
Responses
201
400
401
429



// Formatting a Transcript for Processing

Transcript files will be formatted according to the schema below, and included as a body parameter when declaring the transcript for processing.

Sample Transcription Format

Sample Transcription Format


Schema

Element

Type

Description

{participant}

object

Top level for speaker label, will be "allParticipants", or "participantOne", or "participantTwo"

{participant}/phrases

array of strings

Ordered list of each unique phase spoken by {participant} in the interaction

{participant}/phraseSegments

array of objects

List of details associated with each phrase in transcript for the {participant}

{participant}/phraseSegments/startTimeOffset

number

Start time of phrase (in milliseconds)

{participant}/phraseSegments/endTimeOffset

number

End time of phrase (in milliseconds)

{participant}/phraseSegments/phraseIndex

number

Index of phrase in {participant}/phrases

{participant}/phraseSegments/score

float

Confidence score, if not available should be 1

Pro tip: allParticpants is a required object when providing a transcript for analysis. While participantOne and participantTwo objects are not required, they are highly recommended.