Skip to main content
POST
/
api
/
public
/
v2
/
dataset-versions
/
save-draft
Save Draft Dataset Version
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/dataset-versions/save-draft \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "dataset_group_id": 123
}
'
{
  "success": true,
  "message": "Dataset save job queued",
  "draft_dataset_id": 789
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt

Use this file to discover all available pages before exploring further.

Publish a draft dataset version by assigning it the next real version number. PromptLayer queues the save operation and returns immediately.

Behavior Notes

  • The draft’s version_number changes from -1 to the next sequential version number when the background job completes.
  • If no draft exists for the dataset group, the endpoint returns 404.

Authorizations

X-API-KEY
string
header
required

Body

application/json
dataset_group_id
integer
required

ID of the dataset group containing the draft to save.

Required range: x >= 1

Response

Dataset save job queued.

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

ID of the draft dataset.