API Reference
The Closedloop REST API — manage projects, documents, threads, and links over HTTPS.
The Closedloop REST API lets you manage projects, documents, artifact links, tags, comment threads, and agent sessions programmatically. The endpoint pages in the sidebar are generated from the OpenAPI specification, which you can also feed to a client generator.
Base URL
All requests go to:
https://api.closedloop.aiPaths are unversioned, so a request is https://api.closedloop.ai/documents,
with no version segment. See
Batch operations and versioning for the
/v2 endpoints.
Quick start
- Create an API key in Settings, under Labs, API Keys.
- Send it as a Bearer token:
curl https://api.closedloop.ai/me \
-H "Authorization: Bearer sk_live_your_api_key_here"- Create a PRD in a project.
projectIdaccepts the project's UUID or itsPRO-slug:
curl -X POST https://api.closedloop.ai/documents \
-H "Authorization: Bearer sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"type": "PRD",
"title": "Checkout Redesign",
"projectId": "PRO-25",
"content": "## Overview\n\nThis PRD describes the checkout redesign initiative..."
}'Every response uses the same envelope: { "success": true, "data": ... } on
success and { "success": false, "error": "..." } on failure.
Entity hierarchy
| Level | Entity | Description |
|---|---|---|
| 1 | Project | Container for a product area or initiative. |
| 2 | Document | A typed artifact in a project: PRD, implementation plan, or issue. Organization-level documents (DOC) need no project. |
Artifact links connect documents and other artifacts, and tags group documents across projects.
Guides
Authentication
API keys, the Bearer header, and scopes
Responses and errors
The envelope, body limits, status codes, and rate limits
Pagination
Offset pages, totals, and cursors
Slugs and IDs
Addressing records by UUID or slug
Batch operations and versioning
The /v2 batch endpoints and per-item results
MCP server
Reach the same data from an AI agent