---
title: "Update a dataset (new version)"
method: PUT
path: "/v1/datasets/{datasetId}"
tags: ["Datasets"]
---

# Update a dataset (new version)

`PUT /v1/datasets/{datasetId}`

## Request

- Base URL: `https://api.terranode.co`
- URL: `https://api.terranode.co/v1/datasets/{datasetId}`
- Auth: API key in header `x-api-key`

Replace dataset metadata and receive a new upload URL for a new version. Upload the updated file to trigger reprocessing.

## Path parameters

- `datasetId` string, uuid, required

## Request body

- UpdateDatasetRequest
  - `name` string, required
  - `filename` string, required: Original filename. Format is detected from the extension. Accepted: `.zip` (shapefile), `.geojson`, `.json`, `.kml`, `.kmz`, `.csv`, `.gpkg` (GeoPackage). Geometries must already be in WGS84 / EPSG:4326; reproject upstream before upload.
  - `description` string
  - `summary` string
  - `slug` string
  - `source` DatasetSource
    - `authority` string, required: Who published this data (e.g., "US Census Bureau").
    - `updateCycle` string: How often the source is updated (e.g., "annual").
    - `url` string: Source URL.
    - `license` string: License or terms.
  - `fieldDescriptions` object

## Response `200`

Dataset updated. Upload your file to the returned URL.

- CreateDatasetResponse
  - `datasetId` string, uuid, required
  - `uploadUrl` string, uri, required: Presigned S3 URL. Upload your file here via HTTP PUT.
  - `expiresIn` integer, required: Seconds until the upload URL expires (900).

## Other responses

- `400`: Invalid request parameters or body.
- `401`: Missing or invalid API key.
- `404`: Resource not found.
- `409`: Resource conflict (e.g., duplicate slug).
- `500`: Internal server error.

---

[API](https://skmtc.dev/terranode/apis/terranode-geospatial-api.md) · [All operations](https://skmtc.dev/terranode/apis/terranode-geospatial-api/llms.txt) · [OpenAPI document](https://skmtc.dev/terranode/apis/terranode-geospatial-api/revisions/bdd80613bc7a?raw)
