--- title: List Sessions | Luma Agents --- GET /v1/sessions Select code samplecURL (shell:curl) ```js const url = 'https://agents.lumalabs.ai/v1/sessions?limit=25'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```sh curl --request GET \ --url 'https://agents.lumalabs.ai/v1/sessions?limit=25' \ --header 'Authorization: Bearer ' ``` - Productionagents.lumalabs.ai/v1/sessions Keyset-paginated list of the caller's sessions, newest first. Scoped to the token's `(client_id, client_user_id)` pair — the same boundary `get_session_or_404` enforces, so the list returns exactly the sessions this token could already read one by one. Widening it to the whole client would hand one end-user's JWT the session ids and tags of every sibling end-user, which is the cross-user leak the pair-check exists to close. `?metadata.=` may repeat; the filters AND together and are matched by JSONB containment, so a session carrying extra tags still matches. ## Authorizations - **[BearerAuth](/api/agents/index.md#bearerauth)** ## Parameters ### Query Parameters **scope\_id** Any of: - [string](#tab-panel-0-0) - [null](#tab-panel-0-1) string null Restrict to one scope. **state** Any of: - [SessionState](#tab-panel-1-0) - [null](#tab-panel-1-1) *SessionState* string Allowed values: active closing suspended error completed expired null Restrict to one lifecycle state. **limit** *Limit* integer default: 25 >= 1 <= 100 **cursor** Any of: - [string](#tab-panel-2-0) - [null](#tab-panel-2-1) string null Opaque token from a previous page's next\_cursor. ## Responses ### 200 Successful Response Media typeapplication/json *ListSessionsResponse* Keyset-paginated session list (GET /v1/sessions). See `ListScopesResponse`. object **data** required *Data* Array\ *SessionListItem* One row of GET /v1/sessions — the cheap fields only. Deliberately not a `SessionSnapshotResponse`: a list must not pay for the per-row message peek `turn_running` needs, and a partner scanning pages does not want every plan artifact inlined. Fetch `GET /v1/sessions/{id}` for the live view of one session. object **created\_at** required *Created At* string format: date-time **expires\_at** Any of: - [string](#tab-panel-3-0) - [null](#tab-panel-3-1) string format: date-time null **metadata** *Metadata* object ***key*** additional properties string **scope\_id** required *Scope Id* string **session\_id** required *Session Id* string **state** required *SessionState* string Allowed values: active closing suspended error completed expired **updated\_at** required *Updated At* string format: date-time **has\_more** required *Has More* boolean **next\_cursor** Any of: - [string](#tab-panel-4-0) - [null](#tab-panel-4-1) string null ##### Example ```json { "data": [ { "state": "active" } ] } ``` ### 422 Validation Error Media typeapplication/json *HTTPValidationError* object **detail** *Detail* Array\ *ValidationError* object **ctx** *Context* object **input** *Input* **loc** required *Location* Array **msg** required *Message* string **type** required *Error Type* string ##### Examplegenerated ```json { "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ] } ```