curl --request PUT \
--url https://api.trata.ai/v1/conversations/{conversation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "device12345",
"sourceType": "BROWSER",
"agentId": "aia.1719914136.zl2fxvXB",
"timestampStart": "2023-11-07T05:31:56Z",
"transcriptText": "http://example.com/transcript",
"transcriptSummary": "The conversation was about resolving billing issues.",
"transcriptRecordingUrl": "http://example.com/recording",
"timestampEnd": "2023-11-07T05:31:56Z",
"conversationAnalytics": {
"summary": "<string>",
"action_items": [
"<string>"
],
"is_audio_consent_given": true,
"email_address_of_caller": "<string>",
"name_of_caller": "<string>",
"phone_number_of_caller": "<string>",
"address_of_caller": "<string>",
"sentiment_of_caller": "positive",
"prospectStatus": "NEW"
},
"adminComments": [
{
"comment": "good",
"rating": 5
}
]
}
'{
"orgId": "org.1726902940.GZChqlpU",
"prospectId": "pro.1731301754.OZSMSU1S",
"source": "35.191.28.74",
"sourceType": "BROWSER",
"aiAgentId": "aia.1726903132.obUuT7vM",
"transcriptText": [
{
"speaker": "AI",
"message": "Hi, thanks for calling the Restaurant. I am Sophia, the Restaurant manager powered by AI, how may I assist you today?",
"timestamp": "2024-11-11T05:06:21.049339",
"message_id": "dia.1731301581.gTtTGu8J"
},
{
"speaker": "USER",
"message": "Hey.",
"timestamp": "2024-11-11T05:06:31.737515",
"message_id": "Hey."
},
{
"speaker": "USER",
"message": "What do you actually do?",
"timestamp": "2024-11-11T05:06:33.756877",
"message_id": "What do you actually do?"
},
{
"speaker": "AI",
"message": "Hi there! I'm Sophia, your virtual receptionist at Cote Korean Steak House. I'm here to help with table reservations, taking food orders for pickup or delivery, and providing information about our restaurant. How can I assist you today?",
"timestamp": "2024-11-11T05:06:45.615287",
"message_id": "dia.1731301593.fT6cGFVG"
},
{
"speaker": "USER",
"message": "Okay. So I want to book an order.",
"timestamp": "2024-11-11T05:06:51.225919",
"message_id": "Okay. So I want to book an order."
},
{
"speaker": "USER",
"message": "Can you help me with your many options?",
"timestamp": "2024-11-11T05:06:53.730469",
"message_id": "Can you help me with your many options?"
},
{
"speaker": "AI",
"message": "Of course! Let's get started with your order. Could you please tell me which dishes you're interested in ordering from our menu today? This will help me suggest more options or confirm your choices.",
"timestamp": "2024-11-11T05:06:59.973358",
"message_id": "dia.1731301613.bsgHIXmI"
},
{
"speaker": "USER",
"message": "Okay. Can you tell me, like,",
"timestamp": "2024-11-11T05:07:07.064393",
"message_id": "Okay. Can you tell me, like,"
},
{
"speaker": "USER",
"message": "are the menu options you have?",
"timestamp": "2024-11-11T05:07:08.017518",
"message_id": "are the menu options you have?"
},
{
"speaker": "AI",
"message": "Certainly! At Cote Korean Steak House, we offer a variety of delicious Korean-inspired dishes. Could you let me know if you're looking for something specific, or would you like a recommendation?",
"timestamp": "2024-11-11T05:07:14.763742",
"message_id": "dia.1731301627.GvyyOv8z"
},
{
"speaker": "USER",
"message": "Yeah. So recommendation would be helpful, and it has to be, like,",
"timestamp": "2024-11-11T05:07:23.723846",
"message_id": "Yeah. So recommendation would be helpful, and it has to be, like,"
},
{
"speaker": "AI",
"message": "Certainly! At Cote Korean Steak House, we offer a variety of delicious Korean-inspired dishes. Could you let me know if you're looking for something specific, or would you like a recommendation?",
"timestamp": "2024-11-11T05:07:14.763742",
"message_id": "dia.1731301627.GvyyOv8z"
},
{
"speaker": "USER",
"message": "Yeah. So recommendation would be helpful, and it has to be, like,",
"timestamp": "2024-11-11T05:07:23.723846",
"message_id": "Yeah. So recommendation would be helpful, and it has to be, like,"
},
{
"speaker": "USER",
"message": "spicy.",
"timestamp": "2024-11-11T05:07:24.471512",
"message_id": "spicy."
},
{
"speaker": "AI",
"message": "I'd recommend trying our Spicy Beef Bulgogi or the Spicy Korean Chicken Wings. Both dishes pack a punch and are quite popular. Would you like to place an order for either of these spicy options?",
"timestamp": "2024-11-11T05:07:31.442200",
"message_id": "dia.1731301644.Ez3q1ui5"
},
{
"speaker": "USER",
"message": "Oh, yeah. So, spicy chicken wings that you mentioned.",
"timestamp": "2024-11-11T05:07:40.424171",
"message_id": "Oh, yeah. So, spicy chicken wings that you mentioned."
},
{
"speaker": "AI",
"message": "Great choice! Our Spicy Korean Chicken Wings are a customer favorite. Would you like to go ahead and place an order for those wings?",
"timestamp": "2024-11-11T05:07:45.458102",
"message_id": "dia.1731301660.pkrs8vlF"
},
{
"speaker": "USER",
"message": "Yes. That's right. Go ahead and place the order.",
"timestamp": "2024-11-11T05:07:51.744204",
"message_id": "Yes. That's right. Go ahead and place the order."
},
{
"speaker": "AI",
"message": "Great! I'll place the order for our Spicy Korean Chicken Wings. Could you please provide your name, phone number, and whether this is for pickup or delivery?",
"timestamp": "2024-11-11T05:07:57.954998",
"message_id": "dia.1731301671.xmruoj53"
},
{
"speaker": "USER",
"message": "Yes. So I'll pick it up. My phone number is",
"timestamp": "2024-11-11T05:08:05.574647",
"message_id": "Yes. So I'll pick it up. My phone number is"
},
{
"speaker": "USER",
"message": "96260",
"timestamp": "2024-11-11T05:08:07.455466",
"message_id": "96260"
},
{
"speaker": "USER",
"message": "12778.",
"timestamp": "2024-11-11T05:08:08.983412",
"message_id": "12778."
},
{
"speaker": "USER",
"message": "And my name is Hari.",
"timestamp": "2024-11-11T05:08:10.966606",
"message_id": "And my name is Hari."
},
{
"speaker": "USER",
"message": "And my name is Hari.",
"timestamp": "2024-11-11T05:08:10.966606",
"message_id": "And my name is Hari."
},
{
"speaker": "AI",
"message": "Thank you, Hari! Your order for our Spicy Korean Chicken Wings is confirmed for pickup. It will be ready in the next 30-45 minutes. You will receive a confirmation text shortly. Is there anything else you'd like to add to your order?",
"timestamp": "2024-11-11T05:08:19.965214",
"message_id": "dia.1731301690.DkHamrVu"
},
{
"speaker": "USER",
"message": "Nothing. All good. Thank you.",
"timestamp": "2024-11-11T05:08:28.021255",
"message_id": "Nothing. All good. Thank you."
},
{
"speaker": "AI",
"message": "Thanks for calling us, you have a great one! Bye",
"timestamp": "2024-11-11T05:08:29.093613",
"message_id": "dia.1731301709.wcahGaIm"
}
],
"transcriptSummary": "The caller, Hari, called to place an order at Cote Korean Steak House. He requested recommendations for spicy menu items and chose the Spicy Korean Chicken Wings for pick-up. His phone number is 96260-12778. The order is confirmed for pickup within 30-45 minutes.",
"transcriptRecordingUrl": "https://storage.googleapis.com/trata-staging-recordings-storage/org.1726902940.GZChqlpU/fil.1731301754.8FQUmNBJ.mp3",
"timestampStart": "2024-11-11T05:06:20.733912",
"timestampEnd": "2024-11-11T05:08:41.585099",
"conversationAnalytics": {
"summary": "The caller, Hari, called to place an order at Cote Korean Steak House. He requested recommendations for spicy menu items and chose the Spicy Korean Chicken Wings for pick-up. His phone number is 96260-12778. The order is confirmed for pickup within 30-45 minutes.",
"action_items": [
"Confirm the order for Hari and prepare the Spicy Korean Chicken Wings for pickup.",
"Send a confirmation text to Hari about his order."
],
"is_audio_consent_given": false,
"email_address_of_caller": "[email protected]",
"name_of_caller": "Hari",
"phone_number_of_caller": "96260-12778",
"address_of_caller": "123, Main Street, New York, NY, 10001",
"sentiment_of_caller": "positive",
"prospectStatus": "SERVICE_ORDER_PLACED"
},
"status": "active",
"createdBy": "trata-system",
"createdAt": "2024-12-06T19:23:38.618331",
"updatedBy": "trata-system",
"updatedAt": "2024-12-06T19:23:38.618332"
}Update a Specific Conversation by ID
curl --request PUT \
--url https://api.trata.ai/v1/conversations/{conversation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "device12345",
"sourceType": "BROWSER",
"agentId": "aia.1719914136.zl2fxvXB",
"timestampStart": "2023-11-07T05:31:56Z",
"transcriptText": "http://example.com/transcript",
"transcriptSummary": "The conversation was about resolving billing issues.",
"transcriptRecordingUrl": "http://example.com/recording",
"timestampEnd": "2023-11-07T05:31:56Z",
"conversationAnalytics": {
"summary": "<string>",
"action_items": [
"<string>"
],
"is_audio_consent_given": true,
"email_address_of_caller": "<string>",
"name_of_caller": "<string>",
"phone_number_of_caller": "<string>",
"address_of_caller": "<string>",
"sentiment_of_caller": "positive",
"prospectStatus": "NEW"
},
"adminComments": [
{
"comment": "good",
"rating": 5
}
]
}
'{
"orgId": "org.1726902940.GZChqlpU",
"prospectId": "pro.1731301754.OZSMSU1S",
"source": "35.191.28.74",
"sourceType": "BROWSER",
"aiAgentId": "aia.1726903132.obUuT7vM",
"transcriptText": [
{
"speaker": "AI",
"message": "Hi, thanks for calling the Restaurant. I am Sophia, the Restaurant manager powered by AI, how may I assist you today?",
"timestamp": "2024-11-11T05:06:21.049339",
"message_id": "dia.1731301581.gTtTGu8J"
},
{
"speaker": "USER",
"message": "Hey.",
"timestamp": "2024-11-11T05:06:31.737515",
"message_id": "Hey."
},
{
"speaker": "USER",
"message": "What do you actually do?",
"timestamp": "2024-11-11T05:06:33.756877",
"message_id": "What do you actually do?"
},
{
"speaker": "AI",
"message": "Hi there! I'm Sophia, your virtual receptionist at Cote Korean Steak House. I'm here to help with table reservations, taking food orders for pickup or delivery, and providing information about our restaurant. How can I assist you today?",
"timestamp": "2024-11-11T05:06:45.615287",
"message_id": "dia.1731301593.fT6cGFVG"
},
{
"speaker": "USER",
"message": "Okay. So I want to book an order.",
"timestamp": "2024-11-11T05:06:51.225919",
"message_id": "Okay. So I want to book an order."
},
{
"speaker": "USER",
"message": "Can you help me with your many options?",
"timestamp": "2024-11-11T05:06:53.730469",
"message_id": "Can you help me with your many options?"
},
{
"speaker": "AI",
"message": "Of course! Let's get started with your order. Could you please tell me which dishes you're interested in ordering from our menu today? This will help me suggest more options or confirm your choices.",
"timestamp": "2024-11-11T05:06:59.973358",
"message_id": "dia.1731301613.bsgHIXmI"
},
{
"speaker": "USER",
"message": "Okay. Can you tell me, like,",
"timestamp": "2024-11-11T05:07:07.064393",
"message_id": "Okay. Can you tell me, like,"
},
{
"speaker": "USER",
"message": "are the menu options you have?",
"timestamp": "2024-11-11T05:07:08.017518",
"message_id": "are the menu options you have?"
},
{
"speaker": "AI",
"message": "Certainly! At Cote Korean Steak House, we offer a variety of delicious Korean-inspired dishes. Could you let me know if you're looking for something specific, or would you like a recommendation?",
"timestamp": "2024-11-11T05:07:14.763742",
"message_id": "dia.1731301627.GvyyOv8z"
},
{
"speaker": "USER",
"message": "Yeah. So recommendation would be helpful, and it has to be, like,",
"timestamp": "2024-11-11T05:07:23.723846",
"message_id": "Yeah. So recommendation would be helpful, and it has to be, like,"
},
{
"speaker": "AI",
"message": "Certainly! At Cote Korean Steak House, we offer a variety of delicious Korean-inspired dishes. Could you let me know if you're looking for something specific, or would you like a recommendation?",
"timestamp": "2024-11-11T05:07:14.763742",
"message_id": "dia.1731301627.GvyyOv8z"
},
{
"speaker": "USER",
"message": "Yeah. So recommendation would be helpful, and it has to be, like,",
"timestamp": "2024-11-11T05:07:23.723846",
"message_id": "Yeah. So recommendation would be helpful, and it has to be, like,"
},
{
"speaker": "USER",
"message": "spicy.",
"timestamp": "2024-11-11T05:07:24.471512",
"message_id": "spicy."
},
{
"speaker": "AI",
"message": "I'd recommend trying our Spicy Beef Bulgogi or the Spicy Korean Chicken Wings. Both dishes pack a punch and are quite popular. Would you like to place an order for either of these spicy options?",
"timestamp": "2024-11-11T05:07:31.442200",
"message_id": "dia.1731301644.Ez3q1ui5"
},
{
"speaker": "USER",
"message": "Oh, yeah. So, spicy chicken wings that you mentioned.",
"timestamp": "2024-11-11T05:07:40.424171",
"message_id": "Oh, yeah. So, spicy chicken wings that you mentioned."
},
{
"speaker": "AI",
"message": "Great choice! Our Spicy Korean Chicken Wings are a customer favorite. Would you like to go ahead and place an order for those wings?",
"timestamp": "2024-11-11T05:07:45.458102",
"message_id": "dia.1731301660.pkrs8vlF"
},
{
"speaker": "USER",
"message": "Yes. That's right. Go ahead and place the order.",
"timestamp": "2024-11-11T05:07:51.744204",
"message_id": "Yes. That's right. Go ahead and place the order."
},
{
"speaker": "AI",
"message": "Great! I'll place the order for our Spicy Korean Chicken Wings. Could you please provide your name, phone number, and whether this is for pickup or delivery?",
"timestamp": "2024-11-11T05:07:57.954998",
"message_id": "dia.1731301671.xmruoj53"
},
{
"speaker": "USER",
"message": "Yes. So I'll pick it up. My phone number is",
"timestamp": "2024-11-11T05:08:05.574647",
"message_id": "Yes. So I'll pick it up. My phone number is"
},
{
"speaker": "USER",
"message": "96260",
"timestamp": "2024-11-11T05:08:07.455466",
"message_id": "96260"
},
{
"speaker": "USER",
"message": "12778.",
"timestamp": "2024-11-11T05:08:08.983412",
"message_id": "12778."
},
{
"speaker": "USER",
"message": "And my name is Hari.",
"timestamp": "2024-11-11T05:08:10.966606",
"message_id": "And my name is Hari."
},
{
"speaker": "USER",
"message": "And my name is Hari.",
"timestamp": "2024-11-11T05:08:10.966606",
"message_id": "And my name is Hari."
},
{
"speaker": "AI",
"message": "Thank you, Hari! Your order for our Spicy Korean Chicken Wings is confirmed for pickup. It will be ready in the next 30-45 minutes. You will receive a confirmation text shortly. Is there anything else you'd like to add to your order?",
"timestamp": "2024-11-11T05:08:19.965214",
"message_id": "dia.1731301690.DkHamrVu"
},
{
"speaker": "USER",
"message": "Nothing. All good. Thank you.",
"timestamp": "2024-11-11T05:08:28.021255",
"message_id": "Nothing. All good. Thank you."
},
{
"speaker": "AI",
"message": "Thanks for calling us, you have a great one! Bye",
"timestamp": "2024-11-11T05:08:29.093613",
"message_id": "dia.1731301709.wcahGaIm"
}
],
"transcriptSummary": "The caller, Hari, called to place an order at Cote Korean Steak House. He requested recommendations for spicy menu items and chose the Spicy Korean Chicken Wings for pick-up. His phone number is 96260-12778. The order is confirmed for pickup within 30-45 minutes.",
"transcriptRecordingUrl": "https://storage.googleapis.com/trata-staging-recordings-storage/org.1726902940.GZChqlpU/fil.1731301754.8FQUmNBJ.mp3",
"timestampStart": "2024-11-11T05:06:20.733912",
"timestampEnd": "2024-11-11T05:08:41.585099",
"conversationAnalytics": {
"summary": "The caller, Hari, called to place an order at Cote Korean Steak House. He requested recommendations for spicy menu items and chose the Spicy Korean Chicken Wings for pick-up. His phone number is 96260-12778. The order is confirmed for pickup within 30-45 minutes.",
"action_items": [
"Confirm the order for Hari and prepare the Spicy Korean Chicken Wings for pickup.",
"Send a confirmation text to Hari about his order."
],
"is_audio_consent_given": false,
"email_address_of_caller": "[email protected]",
"name_of_caller": "Hari",
"phone_number_of_caller": "96260-12778",
"address_of_caller": "123, Main Street, New York, NY, 10001",
"sentiment_of_caller": "positive",
"prospectStatus": "SERVICE_ORDER_PLACED"
},
"status": "active",
"createdBy": "trata-system",
"createdAt": "2024-12-06T19:23:38.618331",
"updatedBy": "trata-system",
"updatedAt": "2024-12-06T19:23:38.618332"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the conversation
Source from where the conversation originated. This can be device id, phone number, etc.
1 - 512"device12345"
Type of the conversation source
BROWSER, TWILIO, PLIVO AI agent which handled the conversation
1 - 512"aia.1719914136.zl2fxvXB"
Start time of the conversation
URL to the full transcript of the conversation
1 - 512 elements"http://example.com/transcript"
Summary of the conversation
1 - 2048"The conversation was about resolving billing issues."
URL to the recording of the conversation
1 - 512"http://example.com/recording"
End time of the conversation
Analytics of the conversation
Show child attributes
Summary of the conversation happened with important details on the conversation. The summary should be concise and to the point. It should contain the important details of the conversation like name, phone number, email, address and any other details shared by the user.
List of action items and the next steps to be performed from the conversation details.
If the user has given consent to store the audio of the conversation. Unless the user explicitly says yes, this should be false.
Extracted email address of the caller from the conversation details. Email should be a valid email address format
Extracted name of the caller from the conversation details.
Extracted phone number of the caller from the conversation details.
Extracted address of the caller from the conversation details.
Sentiment of the caller based on the conversation details.
positive, negative, neutral Status of the prospect after this conversation.
NEW, GENERAL_ENQUIRY, SCHEDULED_CALLBACK_WITH_BOT, SCHEDULED_APPOINTMENT_WITH_PERSON, SCHEDULED_APPOINTMENT_FOR_SERVICE, NOT_INTERESTED, PRODUCT_ORDER_PLACED, SERVICE_ORDER_PLACED Conversation updated successfully
Any conversation happening between the end user and assistant is stored in this table
Analytics of the conversation
Show child attributes
Summary of the conversation happened with important details on the conversation. The summary should be concise and to the point. It should contain the important details of the conversation like name, phone number, email, address and any other details shared by the user.
List of action items and the next steps to be performed from the conversation details.
If the user has given consent to store the audio of the conversation. Unless the user explicitly says yes, this should be false.
Extracted email address of the caller from the conversation details. Email should be a valid email address format
Extracted name of the caller from the conversation details.
Extracted phone number of the caller from the conversation details.
Extracted address of the caller from the conversation details.
Sentiment of the caller based on the conversation details.
positive, negative, neutral Status of the prospect after this conversation.
NEW, GENERAL_ENQUIRY, SCHEDULED_CALLBACK_WITH_BOT, SCHEDULED_APPOINTMENT_WITH_PERSON, SCHEDULED_APPOINTMENT_FOR_SERVICE, NOT_INTERESTED, PRODUCT_ORDER_PLACED, SERVICE_ORDER_PLACED