---
title: "Create dataset"
method: POST
path: "/datahub/v1/datasets"
tags: ["DataHub"]
---

# Create dataset

`POST /datahub/v1/datasets`

Creates a new DataHub dataset. A dataset is a logical grouping of events that share the same provider name. Creating a dataset allows you to define metadata such as name and description before ingesting events.

## Request body

- object
  - `name` string, required — The name of the dataset. Allowed characters: alphanumeric (0-9,a-z,A-Z), underscore (_), dash (-), and spaces between words.
  - `description` string — An optional description for the dataset.

## Response `201`

Created - Dataset created successfully.

- object
  - `name` string — The name of the dataset.
  - `description` string — The description of the dataset.
  - `records` integer, nullable — The number of records in the dataset.
  - `updatedBy` string — The email of the user who last updated the dataset.
  - `lastUpdated` string — The timestamp of the last update.

## Other responses

- `400` — Bad Request - The server cannot process the request, often due to a malformed request.
- `401` — Unauthorized - Invalid API key.
- `403` — Forbidden - The client is not authorized to perform the request.
- `500` — Internal Server Error - Something went wrong with the DoiT API server.

---

[API](https://skmtc.net/doit/apis/doit-cloud-intelligence.md) · [All operations](https://skmtc.net/doit/apis/doit-cloud-intelligence/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/doit/doit-cloud-intelligence/versions/9416402fc119/schema)
