---
title: "Create a Dataset"
method: POST
path: "/api/{org_id}/datasets"
tags: ["Datasets"]
---

# Create a Dataset

`POST /api/{org_id}/datasets`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/datasets`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/datasets/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `org_id` string, required

## Request body

- object
  - `description` string, nullable
  - `name` string, required
  - `tags` string[]

## Response `200`

- object
  - `createdAt` integer, required
  - `createdBy` string, required
  - `description` string, nullable
  - `globalVersion` integer, required: Per-row MVCC counter: the value an Experiment pins and a Snapshot reads.
  - `id` string, required
  - `itemCount` integer, required: Live (non-deleted) Items, counted once per logical Item rather than once per stored revision.
  - `name` string, required
  - `orgId` string, required
  - `sources` DatasetSourceCountsResponseBody, required: Live-Item counts by origin. Buckets can sum to less than `itemCount` if an Item carries a source this response shape does not name yet.
    - `annotation` integer, required
    - `manual` integer, required
    - `trace` integer, required
  - `tags` string[], required
  - `updatedAt` integer, required
  - `updatedBy` string, required
  - `writeVersion` integer, required: The Dataset version to display: one per write request.

## Other responses

- `400`: Bad Request
- `409`: Conflict

---

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