---
title: "Upload Examples"
method: POST
path: "/api/v1/platform/datasets/{dataset_id}/examples"
tags: ["examples"]
---

# Upload Examples

`POST /api/v1/platform/datasets/{dataset_id}/examples`

## Request

- Base URL: `https://api.smith.langchain.com`
- URL: `https://api.smith.langchain.com/api/v1/platform/datasets/{dataset_id}/examples`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `X-Tenant-Id`
  - HTTP bearer

This endpoint allows clients to upload examples to a specified dataset by sending a multipart/form-data POST request.
Each form part contains either JSON-encoded data or binary attachment files associated with an example.

## Path parameters

- `dataset_id` string, uuid, required

## Request body `multipart/form-data`

- object
  - `{example_id}` string, binary, required: The Example info as JSON. Can have fields 'metadata', 'split', 'use_source_run_io', 'source_run_id', 'created_at', 'modified_at'
  - `{example_id}.inputs` string, binary, required: The Example inputs as JSON
  - `{example_id}.outputs` string, binary: THe Example outputs as JSON
  - `{example_id}.attachments.{name}` string, binary: File attachment named {name}

## Response `201`

Created

- ExamplesExamplesCreatedResponse
  - `as_of` string
  - `count` integer
  - `example_ids` string[]

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `409`: Conflict
- `422`: Unprocessable Entity

## Changes

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

[Operation history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/api/v1/platform/datasets/:dataset_id/examples/post.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) - [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) - [OpenAPI document](https://skmtc.dev/langchain-ai/apis/langsmith/revisions/7a01c01f75e8?raw)
