---
title: "List Shared Data Conversation Turns"
method: GET
path: "/api/admin/shared-data/users/{user_id}/conversation/turns"
tags: ["admin"]
---

# List Shared Data Conversation Turns

`GET /api/admin/shared-data/users/{user_id}/conversation/turns`

Return the user's conversation as turn-grouped, redacted records.

Pulls every message in the user's single conversation (capped at
``limit`` rows so a runaway transcript does not OOM the response),
groups them into turns via :func:`_group_turns`, and returns each
turn with its user message, agent reply, and the tool calls fired
during the turn. Each tool call is redacted at the leaves: ``args``
is walked recursively and ``result`` is string-redacted, so a
query like ``qb_query("...WHERE customer_name='John Smith'")``
does not surface the customer name even when the conversation is
opened.

The consent gate is re-checked server-side, so a user revoking
consent mid-investigation immediately starts returning 403.

## Path parameters

- `user_id` string, required

## Query parameters

- `limit` integer

## Response `200`

Successful Response

- SharedDataConversationTurnsResponse
  - `session_id` string, required
  - `user_id` string, required
  - `consent_at` string, nullable, required
  - `turns` SharedDataTurn[], required
    - `turn_index` integer, required
    - `user_message` SharedDataMessageItem — One message inside a consenting user's conversation, PII-redacted. ``body`` has been passed through :func:`pii_redaction.redact_pii` before serialization. The original plaintext is never returned by this endpoint. ``thinking`` carries the LLM's extended-thinking output for outbound messages (see OSS migration 033); it is empty for inbound messages and for outbound rows persisted before the capture path was wired up. ``thinking`` runs through the same shape-based redaction as ``body`` (emails, phones, cards, tokens masked by regex). Names and other free-form identifiers are not masked because the redactor has no shape to match them against, same caveat as ``body``.
      - `seq` integer, required
      - `direction` string, required
      - `body` string, required
      - `thinking` string
      - `timestamp` string, nullable, required
    - `agent_reply` SharedDataMessageItem — One message inside a consenting user's conversation, PII-redacted. ``body`` has been passed through :func:`pii_redaction.redact_pii` before serialization. The original plaintext is never returned by this endpoint. ``thinking`` carries the LLM's extended-thinking output for outbound messages (see OSS migration 033); it is empty for inbound messages and for outbound rows persisted before the capture path was wired up. ``thinking`` runs through the same shape-based redaction as ``body`` (emails, phones, cards, tokens masked by regex). Names and other free-form identifiers are not masked because the redactor has no shape to match them against, same caveat as ``body``.
      - `seq` integer, required
      - `direction` string, required
      - `body` string, required
      - `thinking` string
      - `timestamp` string, nullable, required
    - `tool_calls` SharedDataToolCall[]
      - `tool_call_id` string, required
      - `name` string, required
      - `args` object
      - `result` string
      - `is_error` boolean
      - `receipt` SharedDataReceipt — Tool receipt redacted for admin display. Mirrors ``StoredToolReceipt`` from ``backend/app/agent/context.py`` but each string field is passed through :func:`pii_redaction.redact_pii` before serialization.
        - `action` string
        - `target` string
        - `url` string, nullable
    - `started_at` string, nullable
    - `finished_at` string, nullable
  - `total` integer, required
  - `last_trim_seq` integer, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/clawbolt.md) · [All operations](https://skmtc.net/mozilla-ai/apis/clawbolt/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/clawbolt/revisions/0e52fe5f8d33/schema)
