---
title: "Internal Lookup Documents"
method: POST
path: "/v1/documents/internal/lookup"
tags: ["documents"]
---

# Internal Lookup Documents

`POST /v1/documents/internal/lookup`

Agent-facing lookup endpoint, authorized via internal-secret header.

Resolves the session's attachments via the interview→template chain and
calls the same retrieval engine the public route uses.

The agent passes its own `self._session_id`, which is the LiveKit room
name (not a Postgres UUID). We resolve via `_resolve_session_id` — the
same helper /v1/sessions/internal/trace uses — so either form works.

## Request body

- InternalLookupBody
  - `session_id` string, required
  - `query` string, required
  - `section_hint` string, nullable
  - `top_k` integer
  - `turn_no` integer, nullable
  - `attachment_ids` string[]
  - `template_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/roxels/apis/interviewer.md) · [All operations](https://skmtc.dev/roxels/apis/interviewer/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/roxels/interviewer/revisions/4ef48ed226e1/schema)
