> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agntix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Session

> Retrieve a single session by ID, including telephony metadata, echoed session variables, and the full post-call analysis block.

<Note>
  Every endpoint on this page requires either a Clerk-issued JWT (`Authorization: Bearer <token>`) or
  an organization API key (`x-api-key: pk_…`). Anonymous calls return `401 Unauthorized`. See
  [Authentication](/authentication) for the full setup.
</Note>

Returns session-level fields (durations, telephony metadata, recording URL) plus the same `analysis` block that ships with the [`session.ended`](/webhooks/events) webhook — useful when you need to pull on demand instead of waiting for the webhook.

For the turn-by-turn transcript, see [List Messages](/api-reference/chat/messages/list).

## Code examples

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.agntix.ai/api/v1/chat/sessions/$SESSION_ID \
    -H "x-api-key: $AGNTIX_API_KEY" \
    -H "Accept: application/json"
  ```

  ```javascript Node.js theme={null}
  const sessionId = "4981804c-2658-4893-84ff-9c2fa90fb3c2";

  const session = await fetch(
    `https://api.agntix.ai/api/v1/chat/sessions/${sessionId}`,
    { headers: { "x-api-key": process.env.AGNTIX_API_KEY } },
  ).then((r) => r.json());

  console.log("State:", session.state);
  console.log("Resolution:", session.analysis?.resolution?.classification);
  ```

  ```python Python theme={null}
  import os, requests

  session_id = "4981804c-2658-4893-84ff-9c2fa90fb3c2"

  session = requests.get(
      f"https://api.agntix.ai/api/v1/chat/sessions/{session_id}",
      headers={"x-api-key": os.environ["AGNTIX_API_KEY"]},
  ).json()

  print("State:", session["state"])
  print("Resolution:", session.get("analysis", {}).get("resolution", {}).get("classification"))
  ```
</CodeGroup>

## Sample response

```json theme={null}
{
  "id": "4981804c-2658-4893-84ff-9c2fa90fb3c2",
  "type": "VOICE",
  "platform": "PHONE",
  "direction": "OUTBOUND",
  "state": "CLOSED",
  "agentId": "40235145-aa3d-443e-9d0c-841dd0716a2f",
  "createdAt": "2026-04-08T05:00:01.130Z",
  "lastActivityAt": "2026-04-08T05:00:01.130Z",
  "endedAt": "2026-04-08T05:00:10.546Z",
  "updatedAt": "2026-04-08T05:00:01.130Z",
  "metadata": {
    "customerPhoneNumber": "+971501234567",
    "roomName": "outbound_sip_40235145-aa3d-443e-9d0c-841dd0716a2f^__^7yoamyb",
    "sessionVariables": {
      "crmContactId": "CRM-7728",
      "customerName": "Alex Morgan"
    }
  },
  "analysis": {
    "summary": "Customer confirmed delivery slot for Wednesday afternoon.",
    "intent": {
      "conversation": {
        "intent": "Slot-Confirmed",
        "confidence": 0.92,
        "explanation": "Customer agreed to Wednesday afternoon delivery."
      },
      "message": { "intent": null, "confidence": 0, "explanation": "…" }
    },
    "resolution": {
      "classification": "RESOLVED",
      "confidenceScore": 0.88,
      "status": "Completed",
      "satisfiedChecklistItems": ["delivery_slot_agreed"],
      "evidence": ["Customer: yes Wednesday afternoon works."],
      "explanation": "Customer agreed to a specific slot."
    },
    "sentiment": {
      "conversation": {
        "sentiment": "POSITIVE",
        "score": 0.4,
        "detectedLanguage": "en",
        "explanation": "Customer was cooperative throughout."
      },
      "message": { "sentiment": null, "score": 0, "detectedLanguage": "N/A", "explanation": "…" }
    },
    "extractedData": {
      "slotConfirmed": true,
      "preferredDay": "Wednesday",
      "preferredTimeWindow": "Afternoon",
      "callbackRequested": false,
      "callOutcome": "Confirmed"
    }
  },
  "recordingUrl": "https://app.agntix.ai/en/logs-history?opened=4981804c-2658-4893-84ff-9c2fa90fb3c2"
}
```

See [Post-call analysis](/guides/post-call-analysis) for the meaning of each field in the `analysis` block.
