---
title: "Query Interactions"
method: POST
path: "/sessions/interactions/query"
tags: ["Sessions"]
---

# Query Interactions

`POST /sessions/interactions/query`

## Request body

- SessionInteractionQueryRequest
  - `query` SessionInteractionQuery
    - `session_id` string, nullable
    - `turn_id` string, nullable
    - `kind` 'user_approval' | 'user_input' | 'client_tool'
    - `status` 'pending' | 'responded' | 'resolved' | 'cancelled'
    - `flags` SessionInteractionQueryFlags
      - `delivered_in_band` boolean, nullable
      - `delivered_webhook` boolean, nullable
    - `actionable_only` boolean
  - `windowing` Windowing
    - `newest` string, date-time, nullable
    - `oldest` string, date-time, nullable
    - `next` string, uuid, nullable
    - `limit` integer, nullable
    - `order` 'ascending' | 'descending', nullable
    - `interval` integer, nullable
    - `rate` number, nullable

## Response `200`

Successful Response

- SessionInteractionsResponse
  - `count` integer
  - `interactions` SessionInteraction[]
    - `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
    - `id` string, uuid, nullable
    - `project_id` string, uuid, nullable
    - `session_id` string, required
    - `turn_id` string, nullable
    - `token` string, required
    - `kind` 'user_approval' | 'user_input' | 'client_tool', required
    - `status` 'pending' | 'responded' | 'resolved' | 'cancelled'
    - `data` SessionInteractionData
      - `request` SessionInteractionRequest
        - `tool` string, nullable
        - `args` unknown
        - `tool_call_id` string, nullable
      - `references` object, nullable
      - `selector` Selector — Selector for extracting specific data from entities. Placed alongside Reference for data extraction from referenced entities. Fields: - **key**: For environment revisions only. Navigates to data.references.<key>, follows the entity pointer found there (e.g. workflow_revision), fetches that entity, then applies path against its data. - **path**: Dot notation path into the resolved entity's data. If key is set, path applies to the secondary entity's data. If key is not set, path applies directly to the referenced entity's data.
        - `key` string, nullable
        - `path` string, nullable
      - `resolution` object, nullable
      - `parameters` object, nullable
    - `flags` SessionInteractionFlags
      - `delivered_in_band` boolean
      - `delivered_webhook` boolean
    - `tags` object, nullable
    - `meta` object, nullable

## Other responses

- `422` — Validation Error

## Changes

> 359 revisions in range; 4 could not be searched.

- **2026-08-09** `ea6421d829f1` — 1 info
  - added the optional property `interactions/items/data/anyOf[subschema #1: SessionInteractionData]/parameters` to the response with the `200` status
- **2026-08-03** `fc532d6dc820` — 3 breaking, 2 info
  - the `interactions/items/created_at/anyOf[subschema #1]/` response's property type/format changed from ``/`` to `string`/`date-time` for status `200`
  - the `interactions/items/deleted_at/anyOf[subschema #1]/` response's property type/format changed from ``/`` to `string`/`date-time` for status `200`
  - the `interactions/items/updated_at/anyOf[subschema #1]/` response's property type/format changed from ``/`` to `string`/`date-time` for status `200`
  - added `#/components/schemas/SessionInteractionRequest` to the `interactions/items/data/anyOf[subschema #1: SessionInteractionData]/request` response property `anyOf` list for the response status `200`
  - …1 more
- **2026-07-25** `5a14788d939f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/sessions/interactions/query/post.md)

---

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