---
title: "Create dataset"
method: POST
path: "/v1/projects/{projectSlug}/datasets"
tags: ["Datasets"]
---

# Create dataset

`POST /v1/projects/{projectSlug}/datasets`

Creates an empty dataset in the project. The slug is derived from `name`.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)

## Request body

- CreateDatasetBody
  - `name` string, required — Human-readable name. Used to derive the slug.
  - `description` string — Free-form description. Defaults to `null` when omitted or empty.

## Response `201`

Created dataset

- Dataset
  - `id` string, required — Stable dataset identifier.
  - `organizationId` string, required — Organization that owns this dataset.
  - `projectId` string, required — Project this dataset belongs to.
  - `slug` string, required — URL-safe slug derived from `name`. Unique within the project.
  - `name` string, required — Human-readable name.
  - `description` string, nullable, required — Free-form description, or `null` when not set.
  - `columns` DatasetColumn[], nullable, required — Ordered column schema (built-in + custom). `null` means the default schema: the four built-in fields, all visible.
    - `identifier` string, required — Stable, immutable column id. The key under which custom values are stored on each row.
    - `name` string, required — Display name. Editable; the identifier never changes.
    - `source` union, required — Where the column's values come from.
      - object
        - `kind` 'builtin', required — A built-in field (`input`, `output`, `expectedOutput`, or `metadata`).
        - `field` 'input' | 'output' | 'expectedOutput' | 'metadata', required — Which built-in field this column projects.
      - object
        - `kind` 'custom', required — A user-added column; its values live under the row's `custom` store.
    - `removed` boolean — `true` for soft-removed columns (only returned when listing with `includeRemoved`). Removed columns are excluded from rows and the default schema, but keep their data and can be restored.
  - `version` integer, required — Current dataset version.
  - `createdAt` string, required — ISO-8601 timestamp of creation.
  - `updatedAt` string, required — ISO-8601 timestamp of the last update.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/latitude-dev/apis/latitude.md) · [All operations](https://skmtc.net/latitude-dev/apis/latitude/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/latitude-dev/latitude/versions/6a8789c59a5c/schema)
