---
title: "Get Active Session For Segment"
method: GET
path: "/api/agent-chat/sessions/active"
tags: ["Agent Chat"]
---

# Get Active Session For Segment

`GET /api/agent-chat/sessions/active`

Return the latest non-terminal session for ``segment_id``, or null.

The frontend calls this on mount of the segment workspace so that
refreshing the page reconnects to an in-flight agent session instead
of showing the IDLE state. Ownership is verified via segment→project→org.

## Query parameters

- `segment_id` string, required

## Cookies

- `ex_access` string, nullable
- `ex_org` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/explee/apis/explee-api.md) · [All operations](https://skmtc.dev/explee/apis/explee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/explee/explee-api/revisions/f169bc6e9447/schema)
