---
title: "Create a user dataset"
method: POST
path: "/user-datasets"
tags: ["User Datasets"]
---

# Create a user dataset

`POST /user-datasets`

## Query parameters

- `dry_run` boolean

## Request body

- object
  - `name` string, required — Display name for the dataset.
  - `description` string — Optional human-readable description of the dataset.
  - `data` object, required
    - `observation` string[], required — VegBank observation codes to include in the dataset.

## Response `200`

Successful dataset creation. When `dry_run=false` (default), returns a summary of what was inserted. When `dry_run=true`, the same summary is nested under `dry_run_data` and the dataset is not actually created in VegBank.

- union
  - UploadSummary — Counts of inserted records per entity type, plus the uploaded and VegBank-assigned identifiers for each record. Entity type keys (e.g. `pl`, `ob`, `rf`, `ds`) vary depending on what was uploaded. `ds` always appears and represents the internal dataset record created to log the upload.
    - `counts` object
    - `resources` object
  - object — Returned when `dry_run=true`. Transaction is rolled back.
    - `dry_run_data` UploadSummary — Counts of inserted records per entity type, plus the uploaded and VegBank-assigned identifiers for each record. Entity type keys (e.g. `pl`, `ob`, `rf`, `ds`) vary depending on what was uploaded. `ds` always appears and represents the internal dataset record created to log the upload.
      - `counts` object
      - `resources` object
    - `message` string

## Other responses

- `403` — Uploads not allowed
- `500` — Invalid data upload

---

[API](https://skmtc.net/nceas/apis/vegbankapi.md) · [All operations](https://skmtc.net/nceas/apis/vegbankapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nceas/vegbankapi/revisions/852fd165e202/schema)
