---
title: "Link Session To Dataset"
method: POST
path: "/v1/synthesis-log/session/{session_id}/link"
tags: ["synthesis-log"]
---

# Link Session To Dataset

`POST /v1/synthesis-log/session/{session_id}/link`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/synthesis-log/session/{session_id}/link`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/synthesis-log/session/:session_id/link/post.ts> (a function with typed inputs; its response is checked against the schema)

Link all entries in a synthesis session to a dataset.

Called after a synthesized dataset is created so the history is
accessible from the dataset detail page.

Args:
    session_id: UUID of the synthesis session.
    request: Contains the dataset_id to link.
    auth: Authentication result.

Returns:
    Success indicator.

Raises:
    HTTPException: If the link operation fails.

## Path parameters

- `session_id` string, uuid, required

## Request body

- SynthesisLogLinkRequest: Request body for linking a synthesis session to a dataset.
  - `dataset_id` string, required: Dataset UUID to associate with every entry in the session

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/synthesis-log/session/:session_id/link/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
