---
title: "Add question to dataset"
method: POST
path: "/datasets/{dataset_id}"
tags: ["Evaluation Datasets"]
---

# Add question to dataset

`POST /datasets/{dataset_id}`

Adds a new question-answer pair to an existing dataset

## Path parameters

- `dataset_id` string, required

## Request body

- EvalDatasetQuestionRequest — Request body for adding or updating a question in a dataset
  - `question` string, required — The question text
  - `answer` string, required — The expected answer

## Response `200`

Question successfully added

- EvalDatasetMessageResponse — Simple message response for dataset operations
  - `message` string, required — Response message

## Other responses

- `400` — Invalid request - Missing required fields
- `401` — Unauthorized - Invalid or missing authentication
- `404` — Dataset not found

---

[API](https://skmtc.net/smartly/apis/smartly-ai-apis.md) · [All operations](https://skmtc.net/smartly/apis/smartly-ai-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smartly/smartly-ai-apis/revisions/1e26909d86c9/schema)
