Reference
API reference
The API protocol package is the source of truth for hosted API routes and schemas.
Package: @fabricorg/experiments-api-protocol
The hosted API is defined through a zod-backed endpoint registry. The API client consumes the same protocol definitions.
Important route families:
- tenants:
/api/v1/tenants/me - organization helpers:
/api/v1/organizations/generate-slug,/api/v1/organizations/resolve - experiments:
/api/v1/orgs/{orgId}/experiments - manifests:
/api/v1/orgs/{orgId}/manifests - aggregate:
/api/v1/orgs/{orgId}/experiments/{experimentId}/aggregate - API keys:
/api/v1/orgs/{orgId}/api-keys - internal workers:
/internal/audit-export/*,/internal/audit-forward/*
Authentication
Browser callers use Better Auth session cookies.
CLI and automation callers can use org API keys:
Authorization: Bearer fx_key_...Create API keys in Studio at /app/{orgSlug}/settings.
API key endpoints
List keys
GET /api/v1/orgs/{orgId}/api-keysReturns active keys with id, name, prefix, createdAt, and lastUsedAt.
Create key
POST /api/v1/orgs/{orgId}/api-keys
Content-Type: application/json
{
"name": "CLI push from laptop",
"expiresAt": null
}Returns the same summary fields plus key. The plaintext key is returned once.
Revoke key
DELETE /api/v1/orgs/{orgId}/api-keys/{keyId}Returns { "ok": true } when revoked.