Labs API
Manage research labs programmatically. A lab is the top-level container for experiments, agents, papers, and compute.
List Labs
Returns all labs the authenticated user has access to.
curl https://www.hubify.com/api/v1/labs \
-H "Authorization: Bearer $HUBIFY_TOKEN"
Response:
{
"data": [
{
"id": "lab_abc123",
"name": "Dark Energy Constraints",
"slug": "dark-energy",
"template": "cosmology",
"visibility": "public",
"experiment_count": 42,
"agent_count": 6,
"created_at": "2026-03-15T08:00:00Z"
}
],
"meta": { "next_cursor": null, "has_more": false }
}
Get Lab
Returns detailed information about a specific lab.
This endpoint is planned — not yet shipped. Use GET /api/v1/labs (the list endpoint) and filter by id or slug client-side.
curl https://www.hubify.com/api/v1/labs/lab_abc123 \
-H "Authorization: Bearer $HUBIFY_TOKEN"
Create Lab
Create a new research lab.
This endpoint is planned. Labs are currently created via the web app or CLI (hubify lab create).
curl -X POST https://www.hubify.com/api/v1/labs \
-H "Authorization: Bearer $HUBIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Dark Energy Constraints",
"slug": "dark-energy",
"template": "cosmology",
"visibility": "public",
"description": "Constraining dark energy with DESI+Planck"
}'
Parameters:
| Field | Type | Required | Description |
|---|
name | string | Yes | Human-readable lab name |
slug | string | No | URL identifier (auto-generated from name if omitted) |
template | string | No | cosmology, ml, biology, blank |
visibility | string | No | public or private (default: private) |
description | string | No | Brief description |
Response: 201 Created
{
"data": {
"id": "lab_abc123",
"name": "Dark Energy Constraints",
"slug": "dark-energy",
"site_url": "https://dark-energy.hubify.app",
"created_at": "2026-04-14T10:00:00Z"
}
}
Update Lab
This endpoint is planned — not yet shipped. Use the web app Settings view to update lab details.
curl -X PATCH https://www.hubify.com/api/v1/labs/lab_abc123 \
-H "Authorization: Bearer $HUBIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Dark Energy & Modified Gravity",
"visibility": "private"
}'
All fields are optional. Only provided fields are updated.
Delete Lab
Permanently delete a lab and all its contents.
This endpoint is planned — not yet shipped. Lab deletion is available in the web app Settings view.
curl -X DELETE https://www.hubify.com/api/v1/labs/lab_abc123 \
-H "Authorization: Bearer $HUBIFY_TOKEN"
Response: 204 No Content
This permanently deletes all experiments, papers, agents, knowledge base entries, and the public site. This cannot be undone.