Get AI Call Transcript

Retrieve the AI call transcript of the specified CDR.

Note: This interface is only available in API version 2.0.

Request URL

GET {base_url}/{api_path}/cdr/getaicontext?access_token={access_token}

Request parameters

Parameter Required Type Description
cdr_ids Yes String The ID(s) of call leg(s) from the desired CDR.
Note:
limit No Integer Maximum number of records per page.
Note: This parameter must be used together with offset to take effect.
offset No Integer Page number (starting from 1).
Note: This parameter must be used together with limit to take effect.
search_value No String Keyword to filter the transcript content.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
data Object<Context> An object that contains the transcription records, grouped by call leg (e.g. leg_1, leg_2). Each call leg contains a context array storing the transcription record.
offset Integer Next page number.
Note: A return value of -1 indicates that all data has been retrieved.
Context
Parameter Type Description
id string The ID of the transcription record.
content String The transcribed text content.
created_at integer The timestamp (in seconds) when the transcription record was created.
timestamp integer The timestamp (in milliseconds) of the original event that generated this transcription record (i.e., when a sentence was spoken).
duration integer The length of the original speech that this transcription record corresponds to (in seconds).
source_number string The number of the user who spoke the original content of this record.
type string Type of transcription record.
  • speak: Voice transcription record.
avatar string The file path or URL to user's avatar image.
name string The display name of the user.

Example

Request example

GET /openapi/v2.0/cdr/getaicontext?access_token=Pjl6qkTPVSqPI2TqUHSJjhzTskh0R0gt&cdr_ids=20260513222941-586E2,20260513223234-3EE9E HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response example

{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": {
        "leg_1": {
            "context": [
                {
                    "id": "7000:1778682581785:1",
                    "content": "Hi",
                    "created_at": 1778682836,
                    "timestamp": 1778682581785,
                    "duration": 0,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:2",
                    "content": "Hi. Hi, I got an urgent problem. Could you please help me as soon as possible?",
                    "created_at": 1778682836,
                    "timestamp": 1778682581785,
                    "duration": 0,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:3",
                    "content": "Of course, I will help as quickly as I can. Please briefly describe the main issue in a few words, for example “login not working” or “payment failed.” Also, approximately how many users are affected by this urgent problem?",
                    "created_at": 1778682836,
                    "timestamp": 1778682588785,
                    "duration": 7,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:4",
                    "content": "A login problem.",
                    "created_at": 1778682836,
                    "timestamp": 1778682603785,
                    "duration": 22,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:5",
                    "content": "Thank you. I noted the issue keyword as login problem, with high urgency. Approximately how many users are affected, for example one person, your whole team, or the entire company? Also, when did this login problem first start, for example just now, earlier today, or yesterday?",
                    "created_at": 1778682836,
                    "timestamp": 1778682608785,
                    "duration": 27,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:6",
                    "content": "Please answer the question one by one.",
                    "created_at": 1778682836,
                    "timestamp": 1778682624785,
                    "duration": 43,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:7",
                    "content": "Understood, I will ask one question at a time. First question only now: Approximately how many users are affected by this login problem? For example, just you, your team, or everyone in the company.",
                    "created_at": 1778682836,
                    "timestamp": 1778682628785,
                    "duration": 47,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:8",
                    "content": "60%.",
                    "created_at": 1778682836,
                    "timestamp": 1778682642785,
                    "duration": 61,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:9",
                    "content": "Thank you, I have noted that as more than half of your users affected. Next question: When did this login problem first start? For example, just now, about one hour ago, this morning, or yesterday.",
                    "created_at": 1778682836,
                    "timestamp": 1778682646785,
                    "duration": 65,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:10",
                    "content": "At nine o'clock in this morning.",
                    "created_at": 1778682836,
                    "timestamp": 1778682660785,
                    "duration": 79,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:11",
                    "content": "Got it, first reported around nine o'clock this morning. Next question: Is there any temporary way people can still work, for example using a different system, guest access, or manual steps, or is everyone completely blocked from logging in?",
                    "created_at": 1778682836,
                    "timestamp": 1778682664785,
                    "duration": 83,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:12",
                    "content": "There's not any work arounds",
                    "created_at": 1778682836,
                    "timestamp": 1778682672785,
                    "duration": 91,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:13",
                    "content": "Thank you, I understand there is no temporary solution. Please wait while I check that for you.  \n\nCould you now describe what exactly happens when users try to log in? For example, do they see an error message, a blank page, or does nothing happen after they enter their username and password?",
                    "created_at": 1778682836,
                    "timestamp": 1778682676785,
                    "duration": 95,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:14",
                    "content": "No idea what you were saying.",
                    "created_at": 1778682836,
                    "timestamp": 1778682693785,
                    "duration": 112,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:15",
                    "content": "No problem, I will keep it simpler. When people try to log in, what do they see? For example, do they see an error message, or does the page just stay the same and not move?",
                    "created_at": 1778682836,
                    "timestamp": 1778682696785,
                    "duration": 115,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:16",
                    "content": "An error message",
                    "created_at": 1778682836,
                    "timestamp": 1778682707785,
                    "duration": 126,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:17",
                    "content": "Thank you. What exact words are shown in the error message, as closely as you can remember?  \n\nAlso, is this happening for all users who try to log in, or only some of them?",
                    "created_at": 1778682836,
                    "timestamp": 1778682710785,
                    "duration": 129,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:18",
                    "content": "60% of my users",
                    "created_at": 1778682836,
                    "timestamp": 1778682721785,
                    "duration": 140,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "7000:1778682581785:19",
                    "content": "Thank you, so about sixty percent of users see an error message. Please tell me the exact words of that error message, as close as you can.  \n\nAfter that, I will know whether I should transfer you to the right technical person to handle this urgent login problem.",
                    "created_at": 1778682836,
                    "timestamp": 1778682726785,
                    "duration": 145,
                    "source_number": "7000",
                    "type": "speak",
                    "avatar": "https://linkus-cdn-hz.oss-cn-hangzhou.aliyuncs.com/aireceptionist/west-female-07.png",
                    "name": "Customer Service - AI Agent"
                },
                {
                    "id": "3200:1778682581785:20",
                    "content": "Just transfer me to an e-Human agent.",
                    "created_at": 1778682836,
                    "timestamp": 1778682741785,
                    "duration": 160,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                }
            ]
        },
        "leg_2": {
            "context": [
                {
                    "id": "3202:1778682764808:3",
                    "content": "Hello, this is the human agent. How can I assist you?",
                    "created_at": 1778682821,
                    "timestamp": 1778682764808,
                    "duration": 0,
                    "source_number": "3202",
                    "type": "speak",
                    "avatar": "",
                    "name": "Human Agent"
                },
                {
                    "id": "3200:1778682764808:6",
                    "content": "Finally, a real person. I've been struggling with this login issue for hours.",
                    "created_at": 1778682821,
                    "timestamp": 1778682764808,
                    "duration": 0,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3200:1778682764808:0",
                    "content": "About 60% of our users can't log in.",
                    "created_at": 1778682771,
                    "timestamp": 1778682772478,
                    "duration": 0,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3200:1778682764808:1",
                    "content": "They keep seeing an error message.",
                    "created_at": 1778682772,
                    "timestamp": 1778682773248,
                    "duration": 0,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3200:1778682764808:2",
                    "content": "But I don't know the exact wording.",
                    "created_at": 1778682778,
                    "timestamp": 1778682778008,
                    "duration": 1,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3202:1778682764808:0",
                    "content": "That's okay. Can you describe what happens after entering the password?",
                    "created_at": 1778682777,
                    "timestamp": 1778682778168,
                    "duration": 0,
                    "source_number": "3202",
                    "type": "speak",
                    "avatar": "",
                    "name": "Human Agent"
                },
                {
                    "id": "3200:1778682764808:3",
                    "content": "The page just refreshes and asks for the password again.",
                    "created_at": 1778682781,
                    "timestamp": 1778682782088,
                    "duration": 1,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3200:1778682764808:4",
                    "content": "No error code, no helpful message.",
                    "created_at": 1778682805,
                    "timestamp": 1778682805208,
                    "duration": 1,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3202:1778682764808:1",
                    "content": "I see. Let me check the server logs for you.",
                    "created_at": 1778682805,
                    "timestamp": 1778682805328,
                    "duration": 1,
                    "source_number": "3202",
                    "type": "speak",
                    "avatar": "",
                    "name": "Human Agent"
                },
                {
                    "id": "3200:1778682764808:5",
                    "content": "Please do. And can you give me an estimated time for a fix?",
                    "created_at": 1778682807,
                    "timestamp": 1778682807578,
                    "duration": 1,
                    "source_number": "3200",
                    "type": "speak",
                    "avatar": "",
                    "name": "Kristin Hale"
                },
                {
                    "id": "3202:1778682764808:2",
                    "content": "I'll escalate this to our engineering team right away.",
                    "created_at": 1778682807,
                    "timestamp": 1778682807678,
                    "duration": 0,
                    "source_number": "3202",
                    "type": "speak",
                    "avatar": "",
                    "name": "Human Agent"
                }
            ]
        }
    },
    "offset": -1
}