# Get call analysis

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

<figure><img src="/files/5uduiHddGCT9RYeQvMbq" alt=""><figcaption></figcaption></figure>

**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.**&#x20;
    * **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."]

<pre class="language-json"><code class="lang-json">{
    "sid": "CAe87874170863288f1297a4cde04c1d98",
    "questions": [
        {
            "id": 1742985984755,
            "type": "Boolean",
            "name": "Is the user interested in stars?",
            "options": [<a data-footnote-ref href="#user-content-fn-1">]</a>
        }
    ]
}
</code></pre>

<br>

**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. &#x20;

call\_summary

The reason for the disconnection of the call.

call\_disconnectionreason

Available options:&#x20;

`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.`&#x20;

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.talkstack.ai/call/get-call-analysis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
