{
  "slug": "reference/api",
  "title": "API reference",
  "description": "HTTP endpoints exposed by the Cuitty portal beyond the ingest path.",
  "url": "https://cuitty.com/docs/reference/api",
  "markdown_url": "https://cuitty.com/docs/reference/api.md",
  "json_url": "https://cuitty.com/docs/reference/api.json",
  "frontmatter": {
    "title": "API reference",
    "description": "HTTP endpoints exposed by the Cuitty portal beyond the ingest path.",
    "order": 2,
    "section": "Reference",
    "updatedAt": "2026-04-27"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "api-reference",
      "text": "API reference"
    },
    {
      "depth": 2,
      "slug": "health",
      "text": "Health"
    },
    {
      "depth": 2,
      "slug": "projects",
      "text": "Projects"
    },
    {
      "depth": 2,
      "slug": "api-keys",
      "text": "API keys"
    },
    {
      "depth": 2,
      "slug": "module-specific-reads",
      "text": "Module-specific reads"
    },
    {
      "depth": 2,
      "slug": "openapi",
      "text": "OpenAPI"
    }
  ],
  "body_markdown": "# API reference\n\nThe Cuitty portal exposes a small REST surface beyond `/api/ingest` for project metadata, health, and module-specific reads. Every endpoint requires a bearer token unless explicitly noted.\n\n## Health\n\n```\nGET /api/health\n```\n\nReturns `200 { \"status\": \"ok\" }` when the portal can reach Postgres and SpiceDB. Used by load balancers and the SDK during connection probes. Public — no auth required.\n\n## Projects\n\n```\nGET    /api/projects                  List projects in the org\nPOST   /api/projects                  Create a project\nGET    /api/projects/{id}             Read a project\nPATCH  /api/projects/{id}             Update a project\nDELETE /api/projects/{id}             Soft-delete a project\n```\n\n## API keys\n\n```\nGET    /api/projects/{id}/keys        List API keys\nPOST   /api/projects/{id}/keys        Create an API key (returns key once)\nDELETE /api/projects/{id}/keys/{kid}  Revoke a key\n```\n\n## Module-specific reads\n\nEach module exposes its own read endpoints under `/api/modules/{module}/`. See the [module documentation](/docs/modules/audit) for the full surface.\n\n| Module       | Base path                       |\n| ------------ | ------------------------------- |\n| Audit        | `/api/modules/audit/`           |\n| Costs        | `/api/modules/costs/`           |\n| Deploys      | `/api/modules/deploys/`         |\n| Logs         | `/api/modules/logs/`            |\n| Configs      | `/api/modules/configs/`         |\n| Repository   | `/api/modules/repository/`      |\n| Performance  | `/api/modules/performance/`     |\n| Traces       | `/api/traces/`                  |\n| Errors       | `/api/errors/`                  |\n| Feature Flags | `/api/flags/`                 |\n| Webhooks     | `/api/webhooks/`                |\n| Tenants      | `/api/tenants/`                 |\n| Video        | `/api/video/`                   |\n\n## OpenAPI\n\nA live OpenAPI 3.1 document is published at `/api/openapi.json` on every running portal.",
  "body_html": "<h1 id=\"api-reference\">API reference</h1>\n<p>The Cuitty portal exposes a small REST surface beyond <code>/api/ingest</code> for project metadata, health, and module-specific reads. Every endpoint requires a bearer token unless explicitly noted.</p>\n<h2 id=\"health\">Health</h2>\n<pre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\"><code><span class=\"line\"><span>GET /api/health</span></span></code></pre>\n<p>Returns <code>200 { \"status\": \"ok\" }</code> when the portal can reach Postgres and SpiceDB. Used by load balancers and the SDK during connection probes. Public — no auth required.</p>\n<h2 id=\"projects\">Projects</h2>\n<pre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\"><code><span class=\"line\"><span>GET    /api/projects                  List projects in the org</span></span>\n<span class=\"line\"><span>POST   /api/projects                  Create a project</span></span>\n<span class=\"line\"><span>GET    /api/projects/{id}             Read a project</span></span>\n<span class=\"line\"><span>PATCH  /api/projects/{id}             Update a project</span></span>\n<span class=\"line\"><span>DELETE /api/projects/{id}             Soft-delete a project</span></span></code></pre>\n<h2 id=\"api-keys\">API keys</h2>\n<pre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\"><code><span class=\"line\"><span>GET    /api/projects/{id}/keys        List API keys</span></span>\n<span class=\"line\"><span>POST   /api/projects/{id}/keys        Create an API key (returns key once)</span></span>\n<span class=\"line\"><span>DELETE /api/projects/{id}/keys/{kid}  Revoke a key</span></span></code></pre>\n<h2 id=\"module-specific-reads\">Module-specific reads</h2>\n<p>Each module exposes its own read endpoints under <code>/api/modules/{module}/</code>. See the <a href=\"/docs/modules/audit\">module documentation</a> for the full surface.</p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<table><thead><tr><th>Module</th><th>Base path</th></tr></thead><tbody><tr><td>Audit</td><td><code>/api/modules/audit/</code></td></tr><tr><td>Costs</td><td><code>/api/modules/costs/</code></td></tr><tr><td>Deploys</td><td><code>/api/modules/deploys/</code></td></tr><tr><td>Logs</td><td><code>/api/modules/logs/</code></td></tr><tr><td>Configs</td><td><code>/api/modules/configs/</code></td></tr><tr><td>Repository</td><td><code>/api/modules/repository/</code></td></tr><tr><td>Performance</td><td><code>/api/modules/performance/</code></td></tr><tr><td>Traces</td><td><code>/api/traces/</code></td></tr><tr><td>Errors</td><td><code>/api/errors/</code></td></tr><tr><td>Feature Flags</td><td><code>/api/flags/</code></td></tr><tr><td>Webhooks</td><td><code>/api/webhooks/</code></td></tr><tr><td>Tenants</td><td><code>/api/tenants/</code></td></tr><tr><td>Video</td><td><code>/api/video/</code></td></tr></tbody></table>\n<h2 id=\"openapi\">OpenAPI</h2>\n<p>A live OpenAPI 3.1 document is published at <code>/api/openapi.json</code> on every running portal.</p>",
  "links_out": [
    "/docs/modules/audit"
  ]
}