Activate dataset
/v1/datasets/{datasetId}/activateSets a dataset's status to active, making it eligible for search, chat,
outfit generation and the widget. Any number of datasets can be active at
the same time.
When the dataset was not already active, related records are brought back with it:
- data sources that were switched off by an archive are set back to
active, so scheduled syncs resume; - items that were archived are set back to
active.
Calling this on a dataset that is already active is harmless — the
response has alreadyActive: true and nothing else changes.
Good to know
- Queue rows that were archived are not re-queued by activation. Re-upload those items if you need them processed.
archivedOthersCountis always0; it remains for compatibility with an earlier behaviour that archived sibling datasets.- The returned
datasetis the stored record as-is and additionally carries the database's_idand__vbookkeeping fields. Ignore them.
Path parameters
1The dataset to activate.
Response
Always true on success.
true when the dataset was already active and no cascade ran.
Always 0. Kept for compatibility with an earlier single-active-dataset behaviour.
The full stored dataset record. Returned by *Update dataset*, *Activate
dataset* and *Archive dataset*. List and retrieve responses project a
subset — see DatasetSummary and DatasetDetail.
Internal _id and __v fields are stripped by *Update dataset* but are
still present on the activate and archive responses; ignore them.
Unique id of the dataset. Use it as the datasetId path parameter.
Id of the organization that owns the dataset — the one behind your API key.
Lifecycle state of a dataset.
- draft — newly created; not visible to search, chat or the widget.
- active — live. Any number of datasets can be active at once.
- archived — parked. Data is kept, items and sources are switched off.
draftactivearchivedDisplay name. Trimmed on create; cut to 200 characters on update.
Free-text description. Defaults to an empty string; cut to 2000 characters on update.
Arbitrary JSON you attach to the dataset. Omitted when never set. Replaced wholesale by *Update dataset*.
Store details attached to a dataset. Set on create, editable field-by-field on update.
Whether newly processed items go live automatically. Set on create; true unless explicitly false.
When the dataset was created.
When the dataset record was last written.
Errors
20Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
Organization '<organizationId>' not found.The organization that owns the key no longer exists.
Dataset '<datasetId>' not found for organization '<organizationId>'.No dataset with that id belongs to your organization.
Invalid 'datasetId': expected a non-empty string.datasetId is empty.
curl -X PATCH "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID/activate" \
-H "Authorization: Bearer $STYLOR_API_KEY"{
"activated": true,
"alreadyActive": false,
"archivedOthersCount": 0,
"dataset": {
"datasetId": "c9b3c6c0-9b0f-4f42-bf3f-2b7a6b1b9d31",
"organizationId": "0a2c1f4e-5b6d-7e8f-9012-3456789abcde",
"status": "active",
"name": "Spring 2026",
"description": "Women's spring drop",
"config": {
"storeUrl": "https://example-boutique.com",
"storeId": "58712345678",
"storeDomain": "example-boutique.com",
"storeName": "Example Boutique",
"currency": "USD",
"targetGender": "womens"
},
"autoPublish": true,
"createdAt": "2026-03-02T09:14:31.208Z",
"updatedAt": "2026-09-12T10:05:12.402Z"
}
}