---
title: "Create dataset version snapshot"
method: POST
path: "/v1/datasets-v2/{datasetId}/versions"
tags: ["Datasets v2"]
---

# Create dataset version snapshot

`POST /v1/datasets-v2/{datasetId}/versions`

## Request

- Base URL: `https://api.lunary.ai`
- URL: `https://api.lunary.ai/v1/datasets-v2/{datasetId}/versions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lunary/apis/lunary-api/docs/v1/datasets-v2/:datasetId/versions/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `datasetId` string, uuid, required

## Response `201`

Created dataset version

- object
  - `version` DatasetV2Version
    - `id` string, uuid
    - `datasetId` string, uuid
    - `versionNumber` integer
    - `createdAt` string, date-time
    - `createdBy` string, uuid, nullable
    - `restoredFromVersionId` string, uuid, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `itemCount` integer
  - `dataset` DatasetV2
    - `id` string, uuid
    - `projectId` string, uuid
    - `ownerId` string, uuid, nullable
    - `ownerName` string, nullable
    - `ownerEmail` string, nullable
    - `name` string
    - `description` string, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `itemCount` integer
    - `currentVersionId` string, uuid, nullable
    - `currentVersionNumber` integer
    - `currentVersionCreatedAt` string, date-time, nullable
    - `currentVersionCreatedBy` string, uuid, nullable
    - `currentVersionRestoredFromVersionId` string, uuid, nullable
    - `evaluatorSlot1Id` string, uuid, nullable
    - `evaluatorSlot2Id` string, uuid, nullable
    - `evaluatorSlot3Id` string, uuid, nullable
    - `evaluatorSlot4Id` string, uuid, nullable
    - `evaluatorSlot5Id` string, uuid, nullable

---

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