---
title: "Dataset Sources Link"
method: POST
path: "/dataset_sources/link"
tags: ["Dataset Sources"]
---

# Dataset Sources Link

`POST /dataset_sources/link`

## Request

- Base URL: `https://trace.wandb.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://trace.wandb.ai/dataset_sources/link`
- Auth: none declared

Link source calls/spans to dataset rows (batch, idempotent).

## Request body

- DatasetSourcesLinkReq: Request to link dataset rows to their provenance sources.
  - `project_id` string, required
  - `dataset_object_id` string, required
  - `dataset_digest` string, required
  - `links` DatasetSourceLinkPayload[], required
    - `row_digest` string, required
    - `sources` SourceRef[], required
      - `source_kind` 'call' | 'span' | 'conversation', required
      - `source_id` string, required
      - `source_trace_id` string, required
    - `link_metadata` object, nullable
  - `include_created_status` boolean
  - `wb_user_id` string, nullable: Do not set directly. Server will automatically populate this field.

## Response `200`

Successful Response

- DatasetSourcesLinkRes: Response from linking dataset rows to sources. One entry per flattened (row_digest, source) tuple, in input order.
  - `entries` DatasetSourcesLinkResEntry[], required
    - `link_id` string, required
    - `created` boolean, nullable, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `dd89fadfe4e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/wandb/apis/fastapi/changes/dataset_sources/link/post.md)

---

[API](https://skmtc.dev/wandb/apis/fastapi.md) - [All operations](https://skmtc.dev/wandb/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/wandb/apis/fastapi/revisions/f7643c49bf2e?raw)
