API Reference
The dashboard exposes a REST API under /api/v1. Use it to manage projects, rules, brands, and keys programmatically.
Base URL
https://prism.syntaxure.dev/api/v1Authentication
Requests authenticate with an API key in the x-api-key header:
curl https://prism.syntaxure.dev/api/v1/projects \
-H "x-api-key: YOUR_API_KEY"Create keys in the dashboard under Settings → API Keys, or with the CLI:
prism api-keys create
prism api-keys listKeys are stored hashed (SHA-256) server-side. Each request records last-used time. Browser sessions (Supabase auth cookies) also work for the same routes.
Endpoints
| Area | Path prefix | Notes |
|---|---|---|
| Projects | /api/v1/projects | Create-time enforcement of the per-tier project cap |
| Rules | /api/v1/rules | List/create rules; sub-routes for validate, creator, extract, and a project’s pass |
| Brands | /api/v1/brands | Brand profiles |
| Components | /api/v1/components | Saved components (tier-limited) |
| Skills | /api/v1/skills | Project skills |
| Analytics | /api/v1/analytics | Usage stats (tier-scoped) |
| API keys | /api/v1/api-keys | Key management (tier-limited count) |
| Marketplace | /api/v1/marketplace | Public rule sets |
| Sandbox | /api/v1/sandbox | Rules evaluation sandbox |
TODO(confirm): per-endpoint request/response schemas are generated in apps/prism-engine/src/app/api/v1/. Publish exact schemas here, or keep this index with a pointer to the source?
Example: list rules
curl "https://prism.syntaxure.dev/api/v1/rules?limit=20" \
-H "x-api-key: YOUR_API_KEY"Responses use an envelope: { "data": ..., "meta": ... }. Errors return { "error": "<message>" } with an appropriate HTTP status.
Rate limits and tiers
Routes apply per-tier rate limits and caps (for example project creation and AI generation counts) from the subscription tier attached to the key’s owner. Free keys work; some AI-powered routes require a paid tier. See Pricing.
Related
- Dashboard Guide — Using the same features in the UI
- MCP Server — Tools for AI assistants
- CLI Reference — The
prismcommands that call this API