Swayzio Core API v1 — base path /api/swayzio/v1
Getting Started

Getting Started

Base URL

EnvironmentBase URL
Productionhttps://app.swayzio.com/api/swayzio
Versioned surfacehttps://app.swayzio.com/api/swayzio/v1
AI chathttps://app.swayzio.com/api/ai

All examples below use the production host. Every product endpoint is under /api/swayzio/v1; health sits at /api/swayzio/health.

Make your first calls

Check the API is up

curl -s https://app.swayzio.com/api/swayzio/health
{ "status": "ok", "service": "swayzio-core", "runtime": "vercel", "timestamp": "2026-06-10T…Z" }

Get a token

Authenticated requests carry a Clerk session JWT as a bearer token. In the browser the web app obtains it via window.Clerk.session.getToken(); server side, mint one with the Clerk backend SDK. See Authentication for the full resolution order.

Call an authenticated endpoint

curl -s https://app.swayzio.com/api/swayzio/v1/tracks?limit=10 \
  -H "Authorization: Bearer $SWAYZIO_TOKEN"

Request & response basics

  • Content type: JSON. Send Content-Type: application/json on requests with a body.
  • Responses are JSON DTOs. Owner IDs, storage URIs (gs://…), and provider internals are stripped from client responses — see Data Contracts.
  • Caching: all responses set Cache-Control: no-store by default.
  • No CORS preflight handlers are defined; the API is designed for same‑origin (the web app) and server‑to‑server use.

Status codes at a glance

CodeMeaning
200 / 201 / 202 / 204Success (created / accepted / no content)
400Validation error or malformed JSON
401Missing or invalid credentials
403Authenticated but not entitled (plan gate) or access denied
404Resource not found (or owner mismatch)
405Method not allowed on that resource
409Conflict (name clash, reorder mismatch, delete-original)
422Structural validation failed (e.g. split‑sheet totals)
429Rate limited (e.g. analytics)
501Native route not implemented (proxy disabled)
502 / 503Provider error / dependency unavailable

See Conventions for the full error model and response headers.

This API powers a first‑party web client. There is no public app‑registration or API‑key issuance flow today; access is via a Clerk session token for a real account, or a server‑to‑server secret for the internal surfaces.