> For AI agents: the documentation index is at https://platform.detectif.ai/llms.txt. Every page is also available as Markdown by adding `.md` to its path.

# Get a call session

`GET /v1/detect/sessions/{session_id}`

Returns one of your calls or file analyses by session id (from the stream token or the socket's ready message). During a call: `status` `active`, the latest classification (`latest`), the audio seconds received so far and the timestamps. After it: the final answer (`label`, `category`, `confidence`, `decided`, `timeline`). A token's session not started yet is `waiting`. Sessions of other accounts return 404. Details are kept for 30 days; after that the session keeps its times, seconds and final answer only. Requires scope `noesis:read`.

## Authentication

Send your API key as `Authorization: Bearer <your API key>`.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `Authorization` | string | yes | `Bearer <your API key>`. Keys are created in the dashboard; see [Authentication](https://platform.detectif.ai/docs/noesis/authentication/). |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `session_id` | string | yes | The session id from the stream token or the socket's ready message. |

## Response

`200`: Success.

| Field | Type | Required | Description |
|---|---|---|---|
| `request_id` | string or null | no |  |
| `type` | string | no | (default `"session"`; always `"session"`) |
| `object` | string | no | (default `"noesis.session"`; always `"noesis.session"`) |
| `session_id` | string | yes |  |
| `stream_session_id` | string or null | no | The session id in the socket's ready message (same as session_id or an alias of it; both work for lookups). |
| `operation_id` | string or null | no |  |
| `status` | string | yes | waiting: the stream token was created but not used yet; active: the call is running; completed / interrupted / failed: the call ended. (one of `waiting`, `expired`, `active`, `completed`, `interrupted`, `failed`) |
| `closed` | boolean | yes |  |
| `call_id` | string or null | no | Your call id, or the provider's (Twilio callSid, Plivo callUuid). |
| `transport` | string or null | no | (one of `websocket`, `file`) |
| `orchestration` | string or null | no | binary, json, twilio, plivo or file. |
| `encoding` | string or null | no |  |
| `sample_rate` | integer or null | no |  |
| `channels` | integer or null | no |  |
| `record` | boolean | yes |  |
| `started_at` | string or null | no |  |
| `ready_at` | string or null | no |  |
| `ended_at` | string or null | no |  |
| `end_reason` | string or null | no |  |
| `audio_seconds` | number | yes | Seconds of the called person's audio received so far. |
| `billed_seconds` | number or null | no |  |
| `credits_charged` | integer or null | no |  |
| `latest` | object or null | no | The latest classification event (live during the call). |
| `events` | array of object | no | Classification events, oldest first. |
| `error` | string or null | no |  |
| `label` | string or null | no | The answer: the final one after the call, the latest during it. |
| `category` | string or null | no |  |
| `confidence` | number or null | no |  |
| `decided` | boolean or null | no |  |
| `timeline` | array of object or null | no |  |

### Example response

```json
{
  "request_id": "req_8f14e45fceea167a5a36dedd",
  "type": "session",
  "object": "noesis.session",
  "session_id": "5b2f0c9e8d7a4b6c9e1f2a3b4c5d6e7f",
  "stream_session_id": "5b2f0c9e8d7a4b6c9e1f2a3b4c5d6e7f",
  "operation_id": "op_6f1ed002ab5595859014ebf0951522d9",
  "status": "completed",
  "closed": true,
  "call_id": "CA0123456789abcdef0123456789abcdef",
  "transport": "websocket",
  "orchestration": "twilio",
  "encoding": "mulaw",
  "sample_rate": 8000,
  "channels": 1,
  "record": true,
  "started_at": "2026-10-19T09:30:00Z",
  "ready_at": "2026-10-19T09:30:00Z",
  "ended_at": "2026-10-19T09:31:12Z",
  "end_reason": "client_end",
  "audio_seconds": 71.4,
  "billed_seconds": 71.4,
  "latest": {
    "type": "classification",
    "seq": 1,
    "version": 1,
    "t": 4.2,
    "label": "human",
    "category": "human",
    "confidence": 0.93,
    "change": "initial",
    "trigger": "speech",
    "reason": "A person answered and greeted the caller."
  },
  "events": [
    {
      "type": "classification",
      "seq": 1,
      "version": 1,
      "t": 4.2,
      "label": "human",
      "category": "human",
      "confidence": 0.93,
      "change": "initial",
      "trigger": "speech",
      "reason": "A person answered and greeted the caller."
    }
  ],
  "label": "human",
  "category": "human",
  "confidence": 0.93,
  "decided": true,
  "timeline": [
    {
      "type": "classification",
      "seq": 1,
      "version": 1,
      "t": 4.2,
      "label": "human",
      "category": "human",
      "confidence": 0.93,
      "change": "initial",
      "trigger": "speech",
      "reason": "A person answered and greeted the caller."
    }
  ]
}
```

## Errors

| Status | Meaning |
|---|---|
| `400` | The request is invalid, for example an API key in the URL or an unsupported parameter. |
| `401` | The API key is missing, invalid or revoked. |
| `403` | The key lacks the required scope, the e-mail address is not verified, or the account is suspended. |
| `404` | No session with this id exists in your account. |
| `429` | Too many requests, or too many calls and file analyses at the same time. Wait for Retry-After seconds. |
| `500` | Something went wrong on our side. |

Error bodies use the shape described in [Errors](https://platform.detectif.ai/docs/noesis/errors/), with a stable `error.code`.

## Code samples

```bash
curl "https://api.noesis.detectif.ai/v1/detect/sessions/5b2f0c9e8d7a4b6c9e1f2a3b4c5d6e7f" \
  -H "Authorization: Bearer $DETECTIF_API_KEY"
```

```python
import os

import requests

resp = requests.get(
    "https://api.noesis.detectif.ai/v1/detect/sessions/5b2f0c9e8d7a4b6c9e1f2a3b4c5d6e7f",
    headers={"Authorization": f"Bearer {os.environ['DETECTIF_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.json())
```

```javascript
const res = await fetch("https://api.noesis.detectif.ai/v1/detect/sessions/5b2f0c9e8d7a4b6c9e1f2a3b4c5d6e7f", {
  headers: {
    Authorization: `Bearer ${process.env.DETECTIF_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```
