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

# API overview

> Overview of the Stralos service APIs

Stralos uses separate service APIs rather than one monolithic backend. Each service owns a bounded product area and references records from other services by ID.

## Service matrix

| Service | Base prefix | Local port | Owns | Primary stores and dependencies |
| - | - | -: | - | - |
| Global API | `/api/global` | 3300 | Auth, organisations, users, clients, projects, suppliers, contractors, rate categories, setting lists, app config | Postgres, DynamoDB OTP, DynamoDB sessions expected by runtime |
| Rates API | `/api/rates` | 3301 | Rate items, rate options, rate summaries, project rate overrides, pricing rules, day-rate schedules, and imports | Postgres |
| Activities API | `/api/activities` | 3302 | Activities and activity components | Postgres |
| Estimate API | `/api/estimate` | 3303 | Estimates, sections, takeoff, work items, TAGs, import jobs | Postgres |
| Documents API | `/api/documents` | 3304 | Presigned uploads, document processing, area runs, suggestions, retry, accept/reject | Postgres, S3/LocalStack, SQS, EventBridge, provider integrations |
| Assistant API | `/api/assistant` | 3307 | Copilot conversations, messages, tool audit, help search, and confirm-before-write drafts | Postgres (`stralos_assistant`), configured AI provider, downstream service APIs |

## Boundary rules

* Global owns shared records used by more than one feature.
* Module APIs own module-specific records and store foreign IDs for shared records.
* Documents is a pipeline service, not a simple CRUD service.
* The shell and feature bundles call services through their configured base URLs.

## Common patterns

* Fastify 5 service boundary.
* Drizzle and Postgres for relational module data.
* Zod validation at request boundaries.
* Most list envelopes use `{ items, totalCount, start, length }`.
* Global, Estimate, Activities, Documents, Rates, and Assistant require
  EdDSA bearer authentication on protected routes. They accept user or authorised
  service tokens.

## Authentication prerequisites

The Global API runtime needs its EdDSA signing keys and refresh-session table;
consuming services need the Global JWKS URL.

## OpenAPI status

The following tenant-facing services serve a machine-readable OpenAPI 3.1 document generated from
their route-descriptor registries:

| Service | Endpoint | Reference |
| - | - | - |
| Activities API | `GET /api/activities/openapi.json` | [Activities API — OpenAPI document](https://help.stralos.app/api/activities.md#openapi-document-endpoint) |
| Assistant API | `GET /api/assistant/openapi.json` | [AI copilot assistant service — OpenAPI contract](https://help.stralos.app/internal/assistant-service.md#openapi-contract) |
| Documents API | `GET /api/documents/openapi.json` | [Documents API — OpenAPI document](https://help.stralos.app/api/documents.md#openapi-contract-endpoint) |
| Global API | `GET /api/global/openapi.json` | [Global API — OpenAPI document](https://help.stralos.app/api/global.md#openapi-document) |
| Estimate API | `GET /api/estimate/openapi.json` | [Estimate API — OpenAPI document](https://help.stralos.app/api/estimate.md#openapi-document) |
| Rates API | `GET /api/rates/openapi.json` | [Rates API — OpenAPI document](https://help.stralos.app/api/rates.md#openapi-document) |

Each service keeps a committed contract snapshot and source-level drift and snapshot tests.

The internal Admin API also serves a documentation-only OpenAPI contract at
`GET /api/admin/openapi.json`; it is intentionally excluded from the tenant/copilot tool
substrate. Services not listed here do not yet serve an OpenAPI document.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.