Skip to main content

Quickstart

First call to the Agata API in minutes.
2 min read

Goal: in a few minutes you have the API running and a valid JSON response.

Requirements#

  • Go API configured (apps/api/.env.local)
  • Postgres with migrations applied
  • Node monorepo only if you will call from Next

Full clone → install → env → migrate → app flow: Local development.

By default the API listens on port 8080 (adjust for your env).

Step 1 — Health (public)#

No secrets required.

Expected response (conceptual shape):

There is also GET /api/health/ready for readiness (depends on the DB).

Step 2 — Authenticated call (dev)#

Almost every product route goes through:

  1. User identity — Better Auth Bearer session only (Authorization: Bearer <session token>).
  2. Profile — :studioId path + membership (on domain routes).

Details: Authentication.

Example: list the user's profiles (requires user auth):

Step 3 — A domain mutation#

With a valid studioId, create a task (exact fields per OpenAPI / the TS client):

Full guide: Create a task.

Step 4 — From Next (the real monorepo path)#

In the product you do not call Go from the browser. The flow is:

See From Next.js.

Aha moment checklist#

  • /api/health returns 200
  • You list profiles with your user
  • You create or read a resource in a profile
  • You know how to read error.code and request_id on failures

Next#

If you want to…Go to…
Understand authAuthentication
Money/date formatConventions
Explore every endpointOpenAPI reference (sidebar)