---
title: "Record Learning"
method: POST
path: "/v1/templates/{template_id}/learnings/record"
tags: ["templates"]
---

# Record Learning

`POST /v1/templates/{template_id}/learnings/record`

Record a learning observation from a manual test (data source or webhook).

Fires the same background synthesis tasks as session-end learnings, but with
min_failures_for_synthesis=1 — a single intentional test failure is enough signal
to synthesize a don't rule. Use this after test_data_source or test_output to
build up the knowledge base during template setup, not just after live interviews.

## Path parameters

- `template_id` string, required

## Request body

- LearningRecordRequest
  - `type` string, required
  - `source_name` string, nullable
  - `phrase` string, nullable
  - `success` boolean
  - `result` object, nullable
  - `queries_tried` unknown[], nullable
    - unknown
  - `output_index` integer, nullable
  - `url` string, nullable
  - `status_code` integer, nullable
  - `payload` object, nullable
  - `response_preview` 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)
