---
title: "Import Recorded Session"
method: POST
path: "/v1/admin/sessions/import-recorded"
tags: ["admin"]
---

# Import Recorded Session

`POST /v1/admin/sessions/import-recorded`

Import an externally-recorded conversation into the product as a closed session.

Creates: persons row → interviews row (imported_from set, status='completed')
→ sessions row (status='completed', transcript populated) → session_frames
rows (S3-backed, source='imported').

Returns the created interview_id and session_id so the caller can deep-link
to /dashboard/interviews/<interview_id>.

## Request body

- ImportRecordedSession — Request body for POST /v1/admin/sessions/import-recorded. Frames are uploaded inline as base64 for v1 — fine up to a few hundred frames per recording. If we need to import recordings with thousands of frames later, add a pre-upload step (presigned PUTs) and pass URLs here.
  - `template_id` string, required — Template the imported conversation should be scoped to.
  - `imported_from` string, required — Free-form provenance key, e.g. 'video:<job-slug>'. Required — this is what marks the conversation as imported.
  - `person_name` string — Display name for the person row this interview hangs off.
  - `person_email` string, nullable
  - `leader_name` string, nullable — Human label for the speaker mapped to the assistant lane (the one the AI would replicate). Stored on interview.context.
  - `transcript` ImportedTurn[], required
    - `role` string, required — 'user' or 'assistant'.
    - `text` string, required
    - `speaker_name` string, nullable — Original speaker name from the recording (preserved for multi-party calls).
    - `speaker_role` string, nullable — Original speaker role label (e.g. 'onboarder', 'customer').
    - `start_ms` integer, nullable
    - `end_ms` integer, nullable
    - `real_user_turn_index` integer, nullable
    - `responding_to_user_turn_index` integer, nullable
  - `frames` ImportedFrame[]
    - `captured_at` number, required — Seconds offset from recording start; matches transcript turn timing.
    - `data_b64` string, required — Base64 of the full-resolution image bytes.
    - `thumb_b64` string, nullable — Optional base64 of a small thumbnail.
    - `content_type` string — MIME type of data_b64.
    - `width` integer, nullable
    - `height` integer, nullable
    - `motion_score` number, nullable
    - `user_turn_index` integer, nullable — Coarse real-user-turn id; matches transcript turns when present.
  - `started_at` string, nullable — ISO timestamp of when the original recording was made.
  - `duration_seconds` integer, nullable
  - `metadata` object — Arbitrary metadata stored on interview.context.imported.

## 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)
