API Documentation
Integrate Spec Stack into your workflows, CI/CD pipelines, and AI agents.
Authentication
All API requests must be authenticated using an API Key. You can generate an API Key in your Settings.
Authorization Header
Authorization: Bearer sk_...
GET
/api/v1/meVerifies your API key and returns your user ID.
Base URL
All endpoints are prefixed with /api/v1.
Projects
GET
/api/v1/projectsList all projects.
POST
/api/v1/projectsCreate a new project.
Request Body
{
"name": "My Project",
"description": "Optional description"
}POST
/api/v1/projects/from-templateCreate a new project from a template.
Request Body
{
"name": "My Marketing Site",
"templateId": "marketing-site"
}Collections
GET
/api/v1/collectionsList all collections. Optionally filter by projectId.
Query Parameters
projectId(optional): Filter by project ID
POST
/api/v1/collectionsCreate a new collection.
Request Body
{
"projectId": "uuid...",
"name": "Design Assets",
"description": "Optional description"
}GET
/api/v1/collections/:id/contextGet a formatted text dump of the collection and all its assets, suitable for LLM context injection.
Assets
GET
/api/v1/assetsList all assets. Optionally filter by collectionId.
Query Parameters
collectionId(optional): Filter by collection ID
POST
/api/v1/assetsCreate a new asset.
For creating markdown, link, or json assets.
{
"title": "My Spec",
"type": "markdown", // or "link", "json"
"content": "# Markdown content...",
"collectionId": "optional-uuid",
"isPublic": false
}GET
/api/v1/assets/:idGet a specific asset.
PUT
/api/v1/assets/:idUpdate an asset.
DELETE
/api/v1/assets/:idDelete an asset.
Generation
POST
/api/v1/generateTrigger an AI generator to create new content from existing assets.
Request Body
{
"generatorId": "summary",
"collectionId": "uuid...",
"parameters": {}
}API Keys
GET
/api/v1/api-keysList your API keys (hashes only).
POST
/api/v1/api-keysCreate a new API key.
Request Body
{
"label": "My Key"
}