{
  "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.",
  "links_out": [
    "/docs/modules/audit"
  ]
}