Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.montereyfinancial.dev/llms.txt

Use this file to discover all available pages before exploring further.

Monterey API powers an enterprise email campaign management platform built on FastAPI. It provides a complete suite of tools for managing workspaces, designing email templates, orchestrating campaigns, and tracking engagement analytics.

Key capabilities

Multi-tenant workspaces

Isolate resources, users, and campaigns by workspace with role-based access control.

Email templates

Create and manage email templates with merge fields, asset placeholders, and live preview.

Campaign orchestration

Build campaigns with A/B testing, CSV recipient uploads, and automated sending via Celery tasks.

AI-powered editing

Generate and refine email templates using Claude AI through a real-time WebSocket interface.

Analytics

Track campaign performance with time-series data, engagement events, and bounce monitoring.

Webhooks

Ingest engagement events from Campaigner for opens, clicks, and bounces.

Architecture overview

The API follows a layered architecture:
Routers (FastAPI endpoints)
    → Services (business logic)
        → Repositories (async database access)
All layers receive an AppContext via FastAPI dependency injection. AppContext holds all connectors for external services including PostgreSQL, Redis, MSSQL, Campaigner, Azure Blob Storage, and Celery.

Authentication

All endpoints (except GET /auth/me) require:
  • A Bearer token (JWT from Microsoft Entra ID) in the Authorization header
  • A workspace_id header to scope requests to a specific workspace
See the authentication guide for details.