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

# Get a session

> Retrieve a Forward session by ID.

`GET /api/v1/forward/sessions/{session_id}`

Returns stable Forward session fields. Runtime-private fields are not exposed by default.

## Headers

| Header          | Required | Description    |
| --------------- | -------- | -------------- |
| `Authorization` | Yes      | `Bearer <PAT>` |

## Path parameters

| Parameter    | Type   | Required | Description |
| ------------ | ------ | -------- | ----------- |
| `session_id` | string | Yes      | Session ID. |

## Example request

```bash theme={null}
curl -s -X GET 'https://api.qoder.com/api/v1/forward/sessions/sess_xxx' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "sess_xxx",
  "type": "session",
  "identity_id": "idn_xxx",
  "template": {
    "id": "tmpl_support",
    "type": "template",
    "name": "Support assistant",
    "model": "ultimate",
    "version": 3
  },
  "source_type": "api",
  "status": "running",
  "title": "Customer support session",
  "incremental_streaming_enabled": true,
  "metadata": {
    "source": "web"
  },
  "config": {
    "environment_variables": {
      "API_KEY": "sk-xxx"
    }
  },
  "stats": {
    "active_seconds": 30,
    "duration_seconds": 3600
  },
  "usage": {
    "credits": 12.5
  },
  "archived_at": null,
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T11:00:00Z"
}
```

## Response fields

Returns the Session object.

## Errors

| HTTP | Type                   | Code                      | Trigger                                                 |
| ---- | ---------------------- | ------------------------- | ------------------------------------------------------- |
| 401  | `authentication_error` | `authentication_required` | PAT invalid or expired.                                 |
| 404  | `not_found_error`      | `session_not_found`       | Session does not exist or is not visible to the caller. |

## Notes

* Forward validates account and Template ownership before reading runtime facts.
* If the underlying runtime session is missing, Forward returns `404 session_not_found`.

## Related

<CardGroup cols={2}>
  <Card title="Update a session" icon="pencil" href="/cloud-agents/api/forward/sessions/update" />

  <Card title="List session events" icon="list" href="/cloud-agents/api/forward/sessions/list-events" />
</CardGroup>
