> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete API endpoint documentation for the Equa platform

# API Reference

The Equa platform exposes a RESTful API through `equa-server`. This section documents every endpoint group with request/response schemas, authentication requirements, and examples.

## Base URL

| Environment             | URL                                                   |
| ----------------------- | ----------------------------------------------------- |
| Production browser path | `https://app.equa.cc/api/v1` or same-origin `/api/v1` |

The endpoint reference below describes server routes as `/v1/...`, but browser traffic currently reaches them through the same-origin `/api/v1/...` path on the SPA host. Re-verify any direct `api.equa.cc` hostname claims before documenting them as current.

## Authentication

All API endpoints require an authenticated session. The server uses `express-session` with a database-backed store (TypeORM). After signing in via Google OAuth, the server sets an HTTP session cookie that the browser includes automatically with each request.

```
Cookie: connect.sid=<session-id>
```

There are no JWT bearer tokens. Sessions use `rolling: true`, which extends the expiry on every request.

## Overview Documents

| Document                              | Description                                       | Status |
| ------------------------------------- | ------------------------------------------------- | ------ |
| [Authentication](/api/authentication) | API authentication, session cookies, Google OAuth | DRAFT  |
| [Error Codes](/api/error-codes)       | Standard error responses and status codes         | DRAFT  |
| [Rate Limiting](/api/rate-limiting)   | Request rate limits and throttling                | DRAFT  |
| [Webhooks](/api/webhooks)             | Webhook events and delivery                       | DRAFT  |
| [SDK Guide](/api/sdk-guide)           | Client SDK usage and integration                  | DRAFT  |

## Endpoint Groups (18)

All endpoint definitions are located in `equa-server/modules/api/src/endpoints/`.

| Endpoint Group                                         | Source File                 | Description                                       | Status |
| ------------------------------------------------------ | --------------------------- | ------------------------------------------------- | ------ |
| [Auth](/api/endpoints/auth-endpoints)                  | `auth-endpoints.ts`         | Authentication and session management             | DRAFT  |
| [User](/api/endpoints/user-endpoints)                  | `user-endpoints.ts`         | User profile and preferences                      | DRAFT  |
| [Organization](/api/endpoints/organization-endpoints)  | `organization-endpoints.ts` | Organization CRUD and settings                    | DRAFT  |
| [Cap Table](/api/endpoints/captable-endpoints)         | `captable-endpoints.ts`     | Equity, shares, stakeholders                      | DRAFT  |
| [Billing](/api/endpoints/billing-endpoints)            | `billing-endpoints.ts`      | Subscription and payment management               | DRAFT  |
| [Admin](/api/endpoints/admin-endpoints)                | `admin-endpoints.ts`        | Platform administration                           | DRAFT  |
| [Activity](/api/endpoints/activity-endpoints)          | `activity-endpoints.ts`     | Activity feed and audit trail                     | DRAFT  |
| [Data Room](/api/endpoints/data-room-endpoints)        | `data-room-endpoints.ts`    | Secure document sharing                           | DRAFT  |
| [Documents](/api/endpoints/document-endpoints)         | `document-endpoints.ts`     | Document management and DocGen                    | DRAFT  |
| [Microsoft](/api/endpoints/microsoft-endpoints)        | `microsoft-endpoints.ts`    | Microsoft integration                             | DRAFT  |
| [Google Drive](/api/endpoints/google-drive-endpoints)  | `google-drive-endpoints.ts` | Google Drive sync (commented out in registration) | DRAFT  |
| [Referral](/api/endpoints/referral-endpoints)          | `referral-endpoints.ts`     | Referral program                                  | DRAFT  |
| [Colors](/api/endpoints/color-endpoints)               | `color-endpoints.ts`        | UI color/theme endpoints                          | DRAFT  |
| [Wallet](/api/endpoints/wallet-endpoints)              | `wallet-endpoint.ts`        | Wallet/payment methods                            | DRAFT  |
| [Profile](/api/endpoints/profile-endpoints)            | `profile-endpoints.ts`      | User profile endpoints                            | DRAFT  |
| [File Storage](/api/endpoints/file-storage-endpoints)  | `file-storage-endpoints.ts` | File upload/download pipeline                     | DRAFT  |
| [Notifications](/api/endpoints/notification-endpoints) | `notification-endpoints.ts` | Notification delivery endpoints                   | DRAFT  |
| [Agent](/api/endpoints/agent-endpoints)                | `agent-endpoints.ts`        | Equanaut AI agent endpoints                       | DRAFT  |

## How to Document an Endpoint

1. Copy `templates/api-endpoint.md` into `api/endpoints/`.
2. Read the source endpoint file and its associated service module.
3. Document every route, request schema, response schema, and error case.
4. Update this index and `README.md` when the status changes.
