Skip to main content
POST
/
v1
/
datasets
Create Dataset
curl --request POST \
  --url https://api.cuadra.ai/v1/datasets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "High-quality customer support question-answer pairs",
  "consentForTraining": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "Q&A pairs for support",
  "items": [
    "<unknown>"
  ],
  "snapshots": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

JWT token from Stytch B2B authentication (magic link, SSO, or M2M)

Headers

Idempotency-Key
string | null

Body

application/json

Request schema for creating a dataset.

name
string
required

Dataset display name

Required string length: 1 - 200
Example:

"Customer Support QA"

description
string | null

Optional description

Maximum string length: 2000
Example:

"High-quality customer support question-answer pairs"

Indicates end-user/org consent for using data in model training.

Example:

true

Response

Successful Response

Response schema for a dataset.

id
string
required

Dataset ID

Example:

"ds_abc123"

name
string
required

Dataset display name

Example:

"Customer Support QA"

createdAt
string<date-time>
required

Creation timestamp (UTC ISO8601)

Example:

"2024-01-15T10:30:00Z"

updatedAt
string<date-time>
required

Last update timestamp (UTC ISO8601)

Example:

"2024-01-15T14:45:00Z"

description
string | null

Optional description

Example:

"Q&A pairs for support"

items
any[] | null

Dataset items (files). Only included when expand[]=items is specified.

snapshots
any[] | null

Dataset snapshots. Only included when expand[]=snapshots is specified.