PUT
/
v1
/
conversations
/
{conversation_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",
  "transcriptText": "http://example.com/transcript",
  "transcriptSummary": "The conversation was about resolving billing issues.",
  "transcriptRecordingUrl": "http://example.com/recording",
  "timestampStart": "2023-11-07T05:31:56Z",
  "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": "hari@gmail.com",
    "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"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

conversation_id
string
required

ID of the conversation

Body

application/json

Response

200
application/json

Conversation updated successfully

Any conversation happening between the end user and assistant is stored in this table