Closedloop.ai
API Reference

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.ai

Paths 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

  1. Create an API key in Settings, under Labs, API Keys.
  2. Send it as a Bearer token:
curl https://api.closedloop.ai/me \
  -H "Authorization: Bearer sk_live_your_api_key_here"
  1. Create a PRD in a project. projectId accepts the project's UUID or its PRO- 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

LevelEntityDescription
1ProjectContainer for a product area or initiative.
2DocumentA 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

On this page