---
title: "Batch create lineage edges"
method: POST
path: "/lineage/batch"
tags: ["lineage"]
---

# Batch create lineage edges

`POST /lineage/batch`

Create lineage edges in batch

## Request body

- LineageEdge[]
  - `id` string
  - `job_mrn` string
  - `last_seen_at` string
  - `observation_count` integer
  - `origin` string
  - `source` string
  - `target` string
  - `type` string

## Response `200`

OK

- BatchLineageResult[]
  - `edge` LineageEdge
    - `id` string
    - `job_mrn` string
    - `last_seen_at` string
    - `observation_count` integer
    - `origin` string
    - `source` string
    - `target` string
    - `type` string
  - `status` string — "created", "duplicate", or "existing"

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/marmotdata/apis/marmot-api.md) · [All operations](https://skmtc.net/marmotdata/apis/marmot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/marmotdata/marmot-api/versions/ba1b1c4be2e7/schema)
