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

# API Overview

> High-level map of every backend endpoint that ships with Sabo.

<Info>
  Use this overview to see every backend endpoint that ships with Sabo. For conceptual guidance on patterns (validation, auth guards, folder structure), see [Server APIs](/core-features/server-apis).
</Info>

## Available Endpoints

Sabo includes the following pre-built API endpoints:

### Authentication

* [GET /auth/callback](/api-reference/endpoint/auth-callback) - Handles Supabase OAuth and email verification callbacks

### Marketing

* [POST /api/contact](/api-reference/endpoint/contact-api) - Processes contact form submissions

### Payments (Stripe)

* [POST /api/checkout\_sessions](/api-reference/endpoint/checkout-sessions) - Creates Stripe Checkout sessions for subscriptions
* [POST /api/customer\_portal](/api-reference/endpoint/customer-portal) - Generates Stripe Customer Portal sessions for subscription management
* [POST /api/webhooks/stripe](/api-reference/endpoint/stripe-webhooks) - Processes subscription lifecycle + invoice events from Stripe

<Check>
  All endpoints include proper authentication, validation, error handling, and TypeScript types. Click any endpoint above to view detailed documentation.
</Check>

## Adding Custom Endpoints

To add your own API routes:

1. Create a new route file in `src/app/api/[your-route]/route.ts`
2. Export HTTP method handlers (`GET`, `POST`, `PUT`, `DELETE`)
3. Use Zod for request validation
4. Add proper error handling and status codes
5. Document your endpoint by creating a new page in `docs/api-reference/endpoint/`

<Tip>
  See existing endpoints (like [checkout-sessions.mdx](/api-reference/endpoint/checkout-sessions)) for documentation templates and patterns.
</Tip>
