Skip to contentSkip to page list

Docs

Update a dataset by its slug or id

Update a dataset by its slug or id. New columnTypes re-key every record; send columnRenames to say which existing column each renamed column came from, so a save that deletes one column and renames another moves the right values.

PATCH/api/v1/dataset/{slugOrId}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/dataset/<slugOrId>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,}​response = requests.patch(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "id": "string",  "name": "string",  "slug": "string",  "columnTypes": [    {      "name": "string",      "type": "string"    }  ],  "createdAt": "2026-01-01T00:00:00Z",  "updatedAt": "2026-01-01T00:00:00Z",  "platformUrl": "string"}
api-reference/datasets/update-dataset

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

slugOrIdstringrequired

Request body

application/json

namestring
At least 1 character
columnTypesobject[]
namestringrequired
typestringrequired
One of"string""boolean""number""date""list""json""spans""rag_contexts""chat_messages""annotations""evaluations""image""file"
columnRenamesobject[]

Which existing column each renamed column came from, as { from, to } names. Sent, values move by these renames and by unchanged names only. Omitted, columns left over after matching names pair by position.

fromstringrequired
At least 1 character
tostringrequired
At least 1 character

Responses

200

Success

application/json

idstringrequired
namestringrequired
slugstringrequired
columnTypesobject[]required
namestringrequired
At least 1 character
typestringrequired
One of"string""boolean""number""date""list""json""spans""rag_contexts""chat_messages""annotations""evaluations""image""file"
createdAtstring (date-time)required
updatedAtstring (date-time)required
platformUrlstringrequired

Renaming a dataset keeps its slug, so the old slug still resolves. A new name whose slug another dataset in the project already holds is refused with 409.

New columnTypes re-key every record. To rename a column in the same request that deletes another, send columnRenames with { from, to } for each renamed column, so each value stays with the column it came from. Without it, columns left over after matching names pair by position.

Documentation