Collections API
Create, browse, update, and delete collections. A collection is identified by :owner/:slug.
GET /api/collections
No auth required
Browse public collections with optional search.
Query parameters
q | Search name and description |
limit | Max results (default 50, max 100) |
offset | Pagination offset |
Response 200
[
{
"id": "uuid",
"slug": "pubpub-archive",
"name": "PubPub Archive",
"description": "Full archive of PubPub publications",
"ownerSlug": "knowledge-futures",
"ownerName": "Knowledge Futures",
"createdAt": "2026-01-15T00:00:00.000Z",
"updatedAt": "2026-04-01T00:00:00.000Z"
}
] POST /api/accounts/:owner/collections
Auth: write scope
Create a new collection under an account. You must own the account or be a member of the org.
Request
{
"slug": "my-dataset",
"name": "My Dataset",
"description": "Optional description",
"public": true
} Response 201
{
"id": "uuid",
"owner": "yourname",
"slug": "my-dataset",
"name": "My Dataset"
} GET /api/collections/:owner/:slug
No auth for public collections
Get collection metadata and latest version summary.
Response 200
{
"id": "uuid",
"slug": "pubpub-archive",
"name": "PubPub Archive",
"description": "Full archive of PubPub publications",
"public": true,
"ownerSlug": "knowledge-futures",
"ownerName": "Knowledge Futures",
"ownerType": "org",
"createdAt": "2026-01-15T00:00:00.000Z",
"updatedAt": "2026-04-01T00:00:00.000Z",
"latestVersion": {
"number": 12,
"semver": "v3.2.0",
"recordCount": 4521,
"fileCount": 892,
"totalBytes": 1073741824,
"createdAt": "2026-04-01T00:00:00.000Z",
"message": "April sync"
}
} PATCH /api/collections/:owner/:slug
Auth: write scope
Update collection metadata. Pass only the fields to change.
Request
{
"name": "New Name",
"description": "Updated description",
"public": false
} Response 200
{"ok": true} DELETE /api/collections/:owner/:slug
Auth: admin scope
Delete a collection and all its versions, records, and file references. Files themselves are not deleted (they may be referenced by other collections).
Response 200
{"ok": true} GET /api/accounts/:owner/collections
No auth required
List all collections belonging to an account. Non-owners see only public collections.
Response 200
[
{
"id": "uuid",
"slug": "pubpub-archive",
"name": "PubPub Archive",
"description": "...",
"public": true,
"createdAt": "2026-01-15T00:00:00.000Z",
"updatedAt": "2026-04-01T00:00:00.000Z"
}
]