Skip to main content
GET
/
v1
/
analysis
/
{id}
curl https://api.kallglot.com/v1/analysis/ana_01HDEF456789012 \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "id": "ana_01HDEF456789012",
  "object": "analysis",
  "session_id": "sess_01HXYZ123456789",
  "status": "complete",
  "results": {
    "sentiment": {
      "overall": 0.72,
      "label": "positive",
      "trend": "improving",
      "segments": [
        { "id": "seg_001", "score": 0.1, "label": "neutral" },
        { "id": "seg_002", "score": -0.3, "label": "negative" },
        { "id": "seg_003", "score": 0.8, "label": "positive" },
        { "id": "seg_004", "score": 0.9, "label": "positive" }
      ],
      "key_moments": [
        { "segment_id": "seg_003", "type": "positive_peak", "description": "Issue resolved" }
      ]
    },
    "summary": {
      "brief": "Customer inquired about order status. Agent located the order and confirmed delivery date.",
      "key_points": [
        "Customer asked about order #12345",
        "Order was delayed due to shipping",
        "New delivery date confirmed for March 28"
      ],
      "outcome": "resolved"
    },
    "action_items": [
      {
        "description": "Send tracking number to customer",
        "assignee": "agent",
        "due_date": null,
        "priority": "high"
      },
      {
        "description": "Call back if package doesn't arrive by March 28",
        "assignee": "customer",
        "due_date": "2026-03-28",
        "priority": "medium"
      }
    ],
    "quality": {
      "score": 85,
      "talk_ratio": {
        "agent": 55,
        "customer": 45
      },
      "interruptions": 1,
      "average_response_time": 1.2,
      "hold_time": 0,
      "dead_air_instances": 0
    },
    "topics": [
      { "name": "order_status", "confidence": 0.95 },
      { "name": "shipping", "confidence": 0.88 },
      { "name": "delivery_date", "confidence": 0.82 }
    ]
  },
  "created_at": "2026-03-26T11:10:00Z",
  "completed_at": "2026-03-26T11:10:25Z"
}
Retrieve the results of a session analysis by its ID.

Path Parameters

id
string
required
The unique analysis identifier (e.g., ana_01HDEF456789012).

Response

id
string
Unique analysis identifier.
object
string
Always analysis.
session_id
string
The session that was analyzed.
status
string
Analysis status: queued, processing, complete, or failed.
results
object
Analysis results (when status is complete).
created_at
string
Analysis request timestamp (ISO 8601).
completed_at
string
Analysis completion timestamp (ISO 8601).
curl https://api.kallglot.com/v1/analysis/ana_01HDEF456789012 \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "id": "ana_01HDEF456789012",
  "object": "analysis",
  "session_id": "sess_01HXYZ123456789",
  "status": "complete",
  "results": {
    "sentiment": {
      "overall": 0.72,
      "label": "positive",
      "trend": "improving",
      "segments": [
        { "id": "seg_001", "score": 0.1, "label": "neutral" },
        { "id": "seg_002", "score": -0.3, "label": "negative" },
        { "id": "seg_003", "score": 0.8, "label": "positive" },
        { "id": "seg_004", "score": 0.9, "label": "positive" }
      ],
      "key_moments": [
        { "segment_id": "seg_003", "type": "positive_peak", "description": "Issue resolved" }
      ]
    },
    "summary": {
      "brief": "Customer inquired about order status. Agent located the order and confirmed delivery date.",
      "key_points": [
        "Customer asked about order #12345",
        "Order was delayed due to shipping",
        "New delivery date confirmed for March 28"
      ],
      "outcome": "resolved"
    },
    "action_items": [
      {
        "description": "Send tracking number to customer",
        "assignee": "agent",
        "due_date": null,
        "priority": "high"
      },
      {
        "description": "Call back if package doesn't arrive by March 28",
        "assignee": "customer",
        "due_date": "2026-03-28",
        "priority": "medium"
      }
    ],
    "quality": {
      "score": 85,
      "talk_ratio": {
        "agent": 55,
        "customer": 45
      },
      "interruptions": 1,
      "average_response_time": 1.2,
      "hold_time": 0,
      "dead_air_instances": 0
    },
    "topics": [
      { "name": "order_status", "confidence": 0.95 },
      { "name": "shipping", "confidence": 0.88 },
      { "name": "delivery_date", "confidence": 0.82 }
    ]
  },
  "created_at": "2026-03-26T11:10:00Z",
  "completed_at": "2026-03-26T11:10:25Z"
}

Polling for Results

If you don’t use webhooks, poll the analysis endpoint until status is complete:
async function waitForAnalysis(analysisId, maxWait = 120000) {
  const startTime = Date.now();

  while (Date.now() - startTime < maxWait) {
    const response = await fetch(`https://api.kallglot.com/v1/analysis/${analysisId}`, {
      headers: {
        'Authorization': 'Bearer sk_live_your_api_key'
      }
    });
    const analysis = await response.json();

    if (analysis.status === 'complete') {
      return analysis;
    }

    if (analysis.status === 'failed') {
      throw new Error(analysis.error.message);
    }

    // Wait 2 seconds before polling again
    await new Promise(resolve => setTimeout(resolve, 2000));
  }

  throw new Error('Analysis timed out');
}

Notes

Analysis results are stored for 90 days. After that, you’ll need to re-request analysis.