Create data collection
Endpoint: POST /data-collections
Description
Creates a data collection. Optional dataset_ids attaches your non-proprietary datasets that are not already in another collection; linked runs for those datasets move to this collection too.
Sharing rules
The new collection is always owned by you (your account is the individual owner). Sharing isn't accepted directly on this endpoint — the collection's visibility is derived from the datasets you attach. Collections created here are never org-only (org-only resources have no individual owner and can only be produced through admin flows).
- No
dataset_ids(or all selected datasets are private and none are visible to your organization) → the collection is created private (org_id = null). - Every selected dataset is already shared with your organization (
org_id == your org) → the collection is created shared with that sameorg_id. - Mixed selection (private + org-shared datasets) and you belong to an organization → your own private datasets in the selection are auto-promoted to your
org_id(and your runs on them inherit thatorg_id), so the whole selection becomes org-visible and the collection is created shared. If any selected datasets you don't own can't be promoted (they stay private), the request fails with400. - You're not in an organization and any selected dataset is org-visible →
400.
Parameters
- Body —
application/json:
{
"name": "string",
"dataset_ids": "integer[] | null"
}
Error responses
401— Authentication failed.422— Invalid body.400— Emptyname; duplicate name for your account or organization;dataset_idsinvalid, proprietary, or already assigned elsewhere; org-visible datasets selected without an organization; mixed selection where non-owner private datasets cannot be auto-promoted.404— Referenced dataset ids not found (or treated as invalid for this operation).500— Server error creating the collection.
Responses
201— collection object with the same JSON shape as one element ofitemsfrom Get data collections (paginated list).
Example response (201)
{
"id": 14,
"user": { "id": 7, "email": "analyst@acme.com" },
"name": "My bundle",
"org_id": null,
"author_email": "analyst@acme.com",
"datasets": [
{
"id": 1,
"name": "Support QA - March",
"user": { "id": 7, "email": "analyst@acme.com" },
"org_id": null,
"author_email": "analyst@acme.com",
"created_at": "2026-03-30T10:00:00Z",
"updated_at": null
},
{
"id": 2,
"name": "Support QA - April",
"user": { "id": 7, "email": "analyst@acme.com" },
"org_id": null,
"author_email": "analyst@acme.com",
"created_at": "2026-03-31T10:00:00Z",
"updated_at": null
}
],
"runs": [],
"created_at": "2026-04-01T09:20:00Z",
"updated_at": "2026-04-01T09:20:00Z"
}
curl
curl -X POST "https://api.aegisevals.ai/api/v1/data-collections" \
-H "Authorization: Bearer sk_00000000000000000000000000000000" \
-H "Content-Type: application/json" \
-d '{"name":"My bundle","dataset_ids":[1,2]}'