---
title: "Preview enrichment output for sample records"
method: POST
path: "/v1/feeds/{fid}/enrich/preview"
tags: ["Enrichments"]
---

# Preview enrichment output for sample records

`POST /v1/feeds/{fid}/enrich/preview`

## Request

- Base URL: `https://api.banksync.io`
- URL: `https://api.banksync.io/v1/feeds/{fid}/enrich/preview`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Run the full enrichment pipeline (staged: memory fill, then rules, then alerts/observers) on up to 50 sample records without persisting anything. Returns each record with its original values, enriched values, and a list of changed fields. Also returns a per-enrichment match count summary (one entry per enrichment, tagged with its type). Useful for testing rule configs and seeing what Memory has learned before running a full sync.

## Path parameters

- `fid` string, required: Feed ID

## Headers

- `Idempotency-Key` string: Makes a retry safe: the same key with the same request replays the first answer for 24 hours instead of running twice, and the same key with a different request is a 409 `IDEMPOTENCY_KEY_REUSED`. Refusals a retry can outlive — 408, 409, 423, 425, 429 and every 5xx — are never replayed, so retrying with the same key after the cause clears runs the request.

## Request body

- object
  - `records` object[], required: Sample records to enrich (max 50)

## Response `200`

Enrichment preview

- object
  - `success` true, required
  - `data` object, required
    - `records` object[], required
      - `original` object, required: Record as it came in
      - `enriched` object, required: Record after all enrichments applied
      - `changedFields` string[], required: Fields modified by enrichment
    - `summary` object, required
      - `totalRecords` number, required
      - `enrichedCount` number, required
      - `entries` object[], required
        - `enrichmentId` string, required
        - `enrichmentName` string, required
        - `type` string, required: Enrichment type id (e.g. 'rule', 'alert') — open set as types grow
        - `matchCount` number, required
        - `errors` number: Non-fatal errors this enrichment hit (bad regex, handler throw, ...)
        - `errorMessage` string: First error detail (≤200 chars). Present whenever `errors` is set
        - `skipReason` string: Set when the enrichment did not execute at all (e.g. unknown type)
        - `suppressedCount` number: Records a guard enrichment excluded from the sync
        - `splitCount` number: Records replaced by split children
        - `pairCount` number: Transfer/link pairs formed
        - `aiPatternsResolved` number: Unique patterns an AI-fill enrichment resolved this run
      - `memory` object
        - `patternsApplied` number, required
        - `fieldsAutoFilled` number, required

## Other responses

- `400`: Invalid request body
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Feed not found

---

[API](https://skmtc.dev/banksync/apis/banksync-api.md) · [All operations](https://skmtc.dev/banksync/apis/banksync-api/llms.txt) · [OpenAPI document](https://skmtc.dev/banksync/apis/banksync-api/revisions/94465f5ee922?raw)
