---
title: "Create a new dataset"
method: POST
path: "/datasets"
tags: ["Evaluation Datasets"]
---

# Create a new dataset

`POST /datasets`

Creates a new dataset with questions and answers for evaluations

## Request body

- EvalCreateDatasetRequest — Request body for creating a new dataset
  - `name` string, required — Name of the dataset
  - `data` object[], required — Array of question-answer pairs
    - `question` string, required
    - `answer` string, required

## Response `200`

Dataset successfully created

- EvalCreateDatasetResponse — Response after creating a dataset
  - `dataset` EvalDatasetFull, required — Complete dataset object with all questions and answers
    - `_id` string, required — Unique identifier for the dataset
    - `updatedAt` string, date-time, required — Timestamp of the last update
    - `createdAt` string, date-time, required — Timestamp of creation
    - `name` string, required — Name of the dataset
    - `user_id` string, required — ID of the user who created the dataset
    - `data` EvalDatasetQuestion[], required — Array of question-answer pairs
      - `_id` string, required — Unique identifier for the question
      - `question` string, required — The question text
      - `answer` string, required — The expected answer
    - `__v` integer — Version key
  - `message` string, required — Success message

## Other responses

- `400` — Invalid request - Missing required fields
- `401` — Unauthorized - Invalid or missing authentication
- `500` — Internal server error

---

[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)
