# REST API

The Aigon REST API gives you programmatic access to your notes, files, and search — the same endpoints that power the CLI and MCP server.

**Base URL:** `https://api.aigon.ai`

## Documentation

The API is auto-documented via OpenAPI 3.1:

- [Swagger UI](https://api.aigon.ai/docs) — interactive explorer, try endpoints directly
- [ReDoc](https://api.aigon.ai/redoc) — clean reference documentation
- [OpenAPI spec](https://api.aigon.ai/openapi.json) — raw JSON schema for code generation

## Authentication

All endpoints require a Bearer token. See [Authentication](/docs/auth/) for how to get one.

```
Authorization: Bearer YOUR_API_TOKEN
```

## Endpoint Groups

| Group | What it covers |
|-------|---------------|
| **notetaker** | Read, search, update, and generate reports from your notes |
| **filedb** | Upload, download, version, and share files |
| **search** | Global cross-resource search |
| **transcribe** | Audio-to-text transcription |
| **tokens** | API token management |
| **users** | User provisioning |
| **oauth** | OAuth 2.0 client registration and token exchange |

See the [Swagger UI](https://api.aigon.ai/docs) for the full endpoint list with request/response schemas.

## Quick Example

```bash
# Read your 5 most recent notes
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.aigon.ai/notetaker/notes?limit=5

# Search notes
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.aigon.ai/notetaker/search?q=meeting
```
