Skip to main content
The Seed Datasets API provides pre-built dataset packs that populate the platform with realistic sample data. Each pack includes schemas, categories, offers, channels, creatives, decisioning gates, contact policies, algorithm models, decision flows, segments, and synthetic customer/interaction data.
See the Sample Data guide for a walkthrough of using seed datasets.

Base path


List available datasets

Returns all registered dataset packs with their metadata and current load status.

Response 200

Field reference


Load a dataset

Loads a dataset pack into the platform. Creates all entities in correct foreign-key dependency order: schemas, categories, channels, offers, creatives, rules, models, decision flows, segments, synthetic data rows, and interaction history.

Path parameters

Query parameters

Response 202

Loading is asynchronous. The request returns immediately with a 202 Accepted and a pollUrl; the schemas, entities, synthetic rows, and interaction history are created in the background. Poll the status endpoint to track progress and read the final per-entity counts once status is "complete".

Error codes

Response 409 (dataset conflict)


Remove a dataset

Removes all entities belonging to a dataset pack in reverse foreign-key dependency order. Drops associated PostgreSQL tables and segment views.

Path parameters

Response 200

The message is always the literal string "Dataset removed". An optional warnings array is included only when part of the entity cleanup failed.

Error codes


Upload CSV data

Upload a CSV file to replace the data in a specific schema table belonging to a loaded dataset. The existing rows in the target table are truncated before inserting the new data. Each CSV row is transformed into the correct schema format by the dataset pack’s row-mapper.

Path parameters

Request body (multipart/form-data)

Example

Response 200

Error codes


Poll seed progress

Read the current seeding status for an in-flight or completed Load a dataset call. The endpoint reads the per-tenant seed-progress entry from platform settings (keyed by (tenantId, "seed", "seed_progress")) and returns its parsed value. When no progress entry exists the endpoint returns the idle baseline so the UI does not need to handle a missing-row case.

Path Parameters

Response — In flight

When status becomes "complete" the row also carries a counts object (per-entity row counts) and, if any step logged a non-fatal issue, a warnings array.

Response — Idle (no seed in progress, or row missing)

Returned at route.ts:29-33 and route.ts:39-43.
string
State written by the seed orchestrator. The values it emits are "idle" (baseline when no row exists), "loading" (in flight), "complete" (finished), and "error" (failed). The route does not validate the set — whatever the orchestrator wrote into PlatformSetting.value is returned as-is.
string
Human-readable label for the current step. Empty string when idle.
number
Integer 0-100 reflecting per-step progress. Always 0 when idle.

Status codes

Roles

admin, editor, viewer.
Polling cadence is up to the caller. The seed orchestrator updates the row at every step boundary — sub-second polls will see no change between updates. A 1-2 second interval is sufficient for the UI progress bar.

Role requirements

Loading a dataset creates real PostgreSQL tables with synthetic data rows. In a production environment, only use this for testing purposes.