GET /api/health
public
available
Return operational status and catalog counts for monitoring.
Returns ok:true, status:operational, environment, and catalog item counts.
Read-only discovery for the MVP API contracts. Public-preview endpoints expose catalog and commerce intent state; write-capable endpoints stay guarded until live provisioning, legal review, and launch gates clear.
public-preview guarded writesGET /api returns the grouped endpoint contract as JSON.
GET /api/healthReturn operational status and catalog counts for monitoring.
Returns ok:true, status:operational, environment, and catalog item counts.
GET /api/catalogReturn the active artist, release, track, moderation, ledger, SHADOW, and takedown catalog.
Uses Supabase when public read credentials are configured; otherwise returns the seed catalog.
GET /api/searchReturn deterministic catalog search results with explicit filter and ranking signals.
Supports q, origin, rights, downloadable, support, shadow, featured, and sort filters; raw plays are not ranking input.
GET /api/artists/:slugReturn one artist contract by slug.
Slug and UUID lookup are both supported by the repository.
GET /api/releases/:slugReturn one release contract by slug.
Release tracks are available through the full catalog until a dedicated child route is needed.
GET /api/tracks/:slugReturn one track contract with rights, AI disclosure, pricing, gate fields, and synthesized Trust Score.
Includes trustScore: { value (0–100), label, breakdown } derived from rights, AI disclosure, moderation, streaming, download, and support gates.
GET /api/similar/:slugReturn up to 10 similar tracks ranked by genre, mood, origin, artist, and version-type overlap.
Uses deterministic scoring from computeSimilarTracks(): genre +40, each shared mood +15, origin +20, same artist +10, same versionType +5. Returns slug, title, artistName, genre, aiOrigin, mood, url per result.
GET /api/genresReturn the canonical genre taxonomy with per-genre track counts and active origin intersections.
Genres are defined in TRACK_GENRES in domain.ts — pop, hip-hop, electronic, rock, r-n-b, ambient, experimental, soundtrack, other.
GET /api/originsReturn the canonical AI-origin taxonomy with per-origin track counts and active genre intersections.
Origins are the five Syntha disclosure types: human, ai-assisted, synthetic, transformed, hybrid.
GET /api/moodsReturn the canonical mood taxonomy with per-mood track counts, active genre intersections, and active origin intersections.
Moods are defined in TRACK_MOODS in domain.ts — dark, euphoric, melancholic, energetic, chill, cinematic, dreamy, aggressive. A track can carry multiple moods.
GET /api/oembedoEmbed provider endpoint returning a rich-type payload for https://syntha.music/tracks/{slug} URLs.
Pass ?url={trackUrl}. The returned iframe points at /embed/{slug}, a disclosure-preserving compact player that keeps AI-origin, rights state, and disclosure visible wherever the track is embedded. 400 without url, 404 for non-track or unknown URLs.
GET /api/stream/:trackIdServe an approved stream object or report why the track is gated.
Requires the BUCKET binding and an enabled track before bytes are returned.
GET /api/download/:trackIdServe an approved download object after a short-lived entitlement token is supplied.
Download access requires rights gates, download gates, BUCKET, and DOWNLOAD_TOKEN_SECRET.
GET /api/support/checkoutCreate or describe a Stripe support Checkout intent for a track.
Creates a real Stripe Checkout Session when Stripe secrets and price IDs are configured.
GET /api/download/checkoutCreate or describe a Stripe download Checkout intent for a track.
Download delivery still requires a later entitlement token before object access opens.
POST /api/credits/purchaseCreate a dynamic Stripe Checkout Session for credit purchases.
Credits remain manually allocated until listener accounts and abuse controls are live.
POST /api/analytics/eventAccept a privacy-filtered allowlist of syntha_* analytics events.
Personal details and sensitive inferred properties are stripped before persistence.
POST /api/artist-applicationsAccept controlled artist applications for manual review before upload access opens.
Validates rights confirmation and review flags; persistence requires Supabase service-role configuration.
POST /api/stripe/webhookVerify Stripe webhook signatures and compute ledger/support transaction rows.
Persistence requires STRIPE_WEBHOOK_SECRET plus Supabase service-role configuration.
POST /api/csp-reportDrain browser Content Security Policy violation reports without exposing user-facing telemetry.
Always returns 204 No Content for valid and malformed reports; console logging is best-effort and not a launch-readiness signal.
GET /api/admin/readinessReturn provider provisioning readiness groups and missing configuration.
Read-only contract; it does not reveal secret values.
GET /api/admin/launchReturn sanitized launch gate status, strict proof posture, and provider/legal evidence without secret values.
Launch remains blocked until strict readiness, strict live smoke, app-release-gate, and founder/legal gates all pass.
POST /api/admin/audio-upload/intentValidate upload metadata and mint a short-lived private object upload URL.
Requires ADMIN_TOKEN and DOWNLOAD_TOKEN_SECRET; object write also requires BUCKET.
POST /api/admin/moderation/:id/:actionPersist moderation approval, info request, monetization hold, download restriction, or unpublish action.
Supabase service-role configuration persists flags, track gate patches, and audit logs.
POST /api/tracks/:id/rightsPersist rights records and hold stream/download gates until review clears.
Used before public distribution or monetization opens.
POST /api/tracks/:id/ai-disclosurePersist AI disclosure records and hold stream/download gates until review clears.
Supports human, AI-assisted, synthetic, transformed, and hybrid origin disclosure.
POST /api/shadow/import-handoffValidate SHADOW handoff payloads and create draft catalog records when configured.
Drafts remain pending moderation with stream/download gates closed.
POST /api/admin/takedownsIntake DMCA/takedown notices and open review evidence.
Revocation actions live under /api/admin/takedowns/:id/:action.