Skip to main content
POST
Legacy Dataset, Evaluation, and Report endpoints are deprecated for new workflows. Use the Tables API for new dataset import, evaluation, scoring, recalculation, and reporting workflows.
Create a mutable draft dataset version for a dataset group. Drafts use version_number = -1 until they are saved as a published version.

Behavior Notes

  • Only one draft can exist per dataset group at a time; creating another draft returns 409.
  • Without source_dataset_id, PromptLayer creates an empty draft and returns 201.
  • With source_dataset_id, rows are copied from the source dataset asynchronously and the endpoint returns 202.
  • The source dataset must belong to the same dataset group.

Authorizations

X-API-KEY
string
header
required

Body

application/json
dataset_group_id
integer
required

ID of the dataset group to create a draft version for.

Required range: x >= 1
source_dataset_id
integer | null

Optional existing dataset version to copy rows from. Must belong to the same dataset group.

Required range: x >= 1

Response

Empty draft created.

success
enum<boolean>
required
Available options:
true
message
string
required
draft_dataset_id
integer
required

ID of the draft dataset.