POST
/
api
/
public
/
v2
/
dataset-groups
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/dataset-groups \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "name": "<string>",
  "workspace_id": 2
}'
{
  "success": true,
  "message": "<string>",
  "dataset_group": {
    "id": 123,
    "name": "<string>",
    "workspace_id": 123,
    "is_deleted": true
  },
  "dataset": {
    "id": 123,
    "dataset_group_id": 123,
    "version_number": 123,
    "column_names": [
      "<string>"
    ],
    "filter_params": {},
    "is_deleted": true,
    "user_id": 123,
    "dataset_group": {
      "id": 123,
      "name": "<string>",
      "workspace_id": 123,
      "is_deleted": true
    }
  }
}

Create a new dataset group within a workspace. When a dataset group is created, an initial draft dataset (version_number = -1) is automatically created. Dataset group names must be unique within a workspace. Supports both JWT and API key authentication.

Authentication

This endpoint requires JWT or API key authentication.

Headers

X-API-KEY
string
required

API key or JWT token for authentication. Use 'X-API-KEY' header for API key or 'Authorization: Bearer' header for JWT.

Body

application/json

Response

201
application/json

Dataset group created successfully

The response is of type object.