---
title: "POST /api/v1/datasets/{datasetId}/addDatapoint"
method: POST
path: "/api/v1/datasets/{datasetId}/addDatapoint"
tags: ["Datasets"]
---

# POST /api/v1/datasets/{datasetId}/addDatapoint

`POST /api/v1/datasets/{datasetId}/addDatapoint`

Add a single datapoint to a dataset.

## Path parameters

- `datasetId` string, uuid, required

## Request body

- object
  - `messages` object[], required
    - `role` 'user' | 'assistant' | 'system', required
    - `content` string, required
  - `bucket` 'uncategorized' | 'training' | 'validation'

## Response `200`

success response

- object
  - `message` string, required
  - `id` string, uuid, required

## Other responses

- `400` — bad request
- `401` — unauthenticated
- `403` — unauthorized
- `404` — not found
- `409` — conflict
- `500` — internal server error

## Changes

- **2025-11-12** `d71329d1d771` — 1 info
  - added the non-success response with the status `500`
- **2025-09-04** `6fce808cc14e` — 5 info
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `409`
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - …1 more
- **2025-08-20** `4ba54de0b707` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/premai-io/apis/prem-studio-api/changes/api/v1/datasets/:datasetId/addDatapoint/post.md)

---

[API](https://skmtc.dev/premai-io/apis/prem-studio-api.md) · [All operations](https://skmtc.dev/premai-io/apis/prem-studio-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/premai-io/prem-studio-api/revisions/2cb1f5df1b89/schema)
