---
title: "Update a dataset"
method: PATCH
path: "/v1/datasets/{id}"
tags: ["Datasets"]
---

# Update a dataset

`PATCH /v1/datasets/{id}`

## Request

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

## Path parameters

- `id` string, required

## Request body

- object
  - `slug` string

## Response `200`

Updated dataset

- Dataset
  - `id` string
  - `slug` string
  - `format` 'text' | 'chat'
  - `ownerId` string
  - `projectId` string

---

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