Import dataset
POST /datasets
Create an immutable snapshot from a JSON sample. Maximum body size: 1 MiB. Reject duplicate IDs and unresolved item references. A successful job returns the validated dataset.
Use the variables supplied at onboarding.
curl --fail-with-body -X POST "$JEAN_BASE_URL/datasets" \
-H "Authorization: Bearer $JEAN_API_KEY" \
-H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"store-sample","items":[{"item_id":"sku_42","text":"Merino hiking socks"},{"item_id":"sku_43","text":"Wool trail socks"},{"item_id":"sku_44","text":"Light running socks"}],"events":[{"event_id":"evt_1","person_id":"person_7","item_id":"sku_42","kind":"purchase","timestamp":"2026-09-01T12:00:00Z","value":1}]}'
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | |
items | object[] | yes | 1–1000 entries. |
events | object[] | no | 0–5000 entries. |
Response · 202
{
"id": "job_demo",
"kind": "dataset_import",
"status": "queued",
"request_id": "req_demo"
}
Poll Get job with the returned id. Errors and retries · Complete schemas