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

# API Endpoints

> Founder Sherpa REST API endpoint reference.

Founder Sherpa exposes two API endpoints. Most data access is handled through the [Supabase client libraries](https://supabase.com/docs/reference) using RLS-protected table queries.

## Transcript Import

### Parse transcript

```bash theme={null}
POST /api/import/{importId}/parse
```

Triggers AI parsing of an uploaded transcript. The import record must already exist (created through the upload UI). Processing runs asynchronously — poll the import status to check for completion.

**Request body:**

```json theme={null}
{
  "hypothesisIds": ["uuid-1", "uuid-2"]
}
```

| Field           | Type       | Required | Description                                                                       |
| --------------- | ---------- | -------- | --------------------------------------------------------------------------------- |
| `hypothesisIds` | `string[]` | Yes      | UUIDs of hypotheses to use as context for evidence extraction. Must be non-empty. |

**Responses:**

| Status | Description                                                  |
| ------ | ------------------------------------------------------------ |
| `200`  | Parsing initiated successfully                               |
| `400`  | Invalid request body or missing `hypothesisIds`              |
| `401`  | Missing or invalid authentication token                      |
| `422`  | Parsing failed (e.g., import not found or already processed) |

**Authentication:** Bearer token (Supabase Auth JWT)

***

## Notifications

### Trigger digest emails

```bash theme={null}
POST /api/notifications/digest?frequency=daily
```

Sends activity digest emails to eligible users. This endpoint is protected by `CRON_SECRET` and is intended to be called by Vercel Cron, not by end users.

**Query parameters:**

| Parameter   | Type     | Required | Values              |
| ----------- | -------- | -------- | ------------------- |
| `frequency` | `string` | Yes      | `daily` or `weekly` |

**Responses:**

| Status | Description                                                |
| ------ | ---------------------------------------------------------- |
| `200`  | Digests processed. Returns `{ ok: true, frequency, sent }` |
| `400`  | Invalid or missing frequency parameter                     |
| `401`  | Missing or invalid `CRON_SECRET`                           |

**Authentication:** `Authorization: Bearer <CRON_SECRET>`

***

## Supabase Data API

For querying and mutating data (projects, personas, hypotheses, evidence, questions, etc.), use the [Supabase Data API](https://supabase.com/docs/guides/api) with the `apikey` and `Authorization` headers described in the [Authentication](/docs/api/authentication) guide.

The Supabase Data API provides a REST interface auto-generated from the database schema, with full support for filtering, pagination, and relationships. All access is governed by Row Level Security policies that enforce workspace membership.
