Talkstack
  • System architecture
  • Getting Started With Talkstack's API
  • Authentication
    • Signup
    • Verify Email
    • Resend email verification code
    • Login
    • Refresh Token
    • Change Password
    • Forgot Password
    • Reset Password
  • User
    • Generate API key
    • Set active Project
    • Get active Project
  • Project
    • Creating a new project
    • Get Project
    • Getting list of projects
    • Update a project
    • Delete Project
    • Webhook
    • Get Active Agent
    • Set Active Agent
    • Remove Active Agent
  • Agent
    • Create a new Agent
    • Get Agent Details
    • Update Agent
    • Delete an agent
    • Get All agents
  • Call
    • Make phone call
    • Get call data
    • Get call history
    • Get call analysis
    • Batch calls
  • Voices
    • List Voices
    • Get Voice data
  • Phone Number
    • Get phone number data
    • Assign Number to Agent
  • Hubspot
    • HubSpot Integration
Powered by GitBook
On this page
  1. Call

Get call analysis

Retrieve details of a specific call

PreviousGet call historyNextBatch calls

Last updated 1 month ago

Post call analysis that includes information such as sentiment, status, summary, and custom defined data to extract. Available after call ends

We would need these two details to fetch call analysis details: Get Questions and SID

Custom call transcript transformation. You can specify the data output structure from each call from as defined post call analysis data section on the dashboard. Can be empty if nothing is specified.

custom_analysis_datastructure

Step 1: Prepare Your Request

  • Endpoint: /call/analysis

  • Method: POST

  • URL: https://api.talkstackai.com/call

  • Headers: Include Content-Type: application/json.

  • Authorization: Bearer token or x-api-key in headers

Step 2: Construct the JSON Body with Dynamic Variables

  • sid: The sid of the call for which you want to fetch details.

  • questions: The questions that you want answers to based on the call transcript.

    • questions is an array of object with each question and the type you want the answer in there

    • type: It is the type in which you want the answer. It can be Boolean, Text, Number or Selector.

      • Boolean will return answer in Yes or No. Use it when you only want answers in yes or no. Eg - "Is the user interesting in butying the product?"

      • Text will return answer in a detailed text format. Use it when you want to know how user responded to a particular question. Eg - "How was the user's experience after using the product?"

      • Number will return answer in numerical format only. Use this type when you have to extract something a numeric value like 2. Eg - "The number of products user wants."

      • In order to use Selector type you also have to pass options. Our AI agent will then analyze the call and pass the most viable option out of the given options. Eg - "What is the reason for user to enroll somewhere else?" Options: ["User got better offers.", "User is not interested anymore.", "User didn't like the curriculum.", "Unknown reason."]

{
    "sid": "CAe87874170863288f1297a4cde04c1d98",
    "questions": [
        {
            "id": 1742985984755,
            "type": "Boolean",
            "name": "Is the user interested in stars?",
            "options": [
        }
    ]
}

Step 3: Send the Request

Use your preferred HTTP client to send the POST request with the above JSON body.

Step 4: Handle the Response

The response will provide detailed information about the call associated with the callSid.

Success Response:

  • Status Code: 200 OK

  • Body: The response includes details like status, from, to, date, recordingUrls, and additional call data.

https://api.talkstackai.com/call/{call_id}

When the agent has a successful call with the user and the call was complete without being cutoff.

call_successful

Indicates if call hits voicemail.

call_invoicemall

High-level call summary.

call_summary

The reason for the disconnection of the call.

call_disconnectionreason

Available options:

user_hangup,agent_hangup,call_transfer,voicemail,inactivity,maxduration,concurrencylimit,invalidpayment,scamdetected,dial_busy,dial_failed,dial_no_answer,error_twilio,error_no_audio_received,error_asr,error_unknownregistered_call_timeout,error_silent,error_vonage.