---
title: "Query Records"
method: POST
path: "/sessions/records/query"
tags: ["Sessions"]
---

# Query Records

`POST /sessions/records/query`

## Request body

- SessionRecordQueryRequest
  - `session_id` string, required

## Response `200`

Successful Response

- SessionRecordsQueryResponse
  - `count` integer, required
  - `records` SessionRecord[], required
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `record_id` string, uuid, required
    - `session_id` string, required
    - `project_id` string, uuid, required
    - `record_index` integer, nullable
    - `timestamp` string, date-time, nullable
    - `record_type` string, nullable
    - `record_source` string, nullable
    - `attributes` object, nullable
    - `turn_id` string, nullable
    - `span_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/d43a05d98a9b/schema)
