Skip to content

API Reference

The TailTrace API provides cloud-based design system configuration and drift analytics.

https://api.tailtrace.dev

All API requests require a Bearer token:

Terminal window
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.tailtrace.dev/api/workspaces

Get your API token from the dashboard.

GET /api/workspaces

Returns all workspaces you have access to.

Response:

{
"workspaces": [
{
"id": "ws_abc123",
"name": "My Team",
"slug": "my-team",
"role": "owner"
}
]
}
POST /api/workspaces

Request:

{
"name": "New Workspace",
"slug": "new-workspace"
}

GET /api/configs?workspace_id=ws_abc123

Response:

{
"configs": [
{
"id": "cfg_xyz789",
"name": "Production",
"config": { "colors": {...} },
"updated_at": "2024-01-15T10:30:00Z"
}
]
}
GET /api/configs/:id

Use this endpoint in your extensions to fetch cloud-synced configuration.

POST /api/configs

Request:

{
"workspace_id": "ws_abc123",
"name": "Production",
"config": {
"colors": {
"primary": "#3b82f6"
},
"deltaEThreshold": 2.3
}
}
PUT /api/configs/:id

POST /api/drift

Request:

{
"workspace_id": "ws_abc123",
"config_id": "cfg_xyz789",
"url": "https://example.com/page",
"stats": {
"total": 24,
"exact": 18,
"fuzzy": 4,
"none": 2,
"processingTime": 12.5
}
}
GET /api/drift/summary?workspace_id=ws_abc123

Returns aggregated drift statistics for the last 30 days.

Response:

{
"summary": {
"totalReports": 156,
"totalStyles": 3744,
"exactMatches": 3200,
"fuzzyMatches": 400,
"noMatches": 144,
"complianceRate": 96
}
}

TierRequests/minute
Free60
Pro600
EnterpriseUnlimited
{
"error": "Unauthorized"
}
StatusMeaning
400Bad request
401Unauthorized (invalid token)
403Forbidden (requires Pro)
404Not found
429Rate limited
500Server error

Coming soon:

  • @tailtrace/sdk - JavaScript/TypeScript
  • tailtrace-py - Python