Skip to main content
← API Reference

Quickstart

Call your first endpoint in under five minutes.

1

Mint an API key

Open Settings → Integrations → API Access in any workspace on the Business or Enterprise plan. Click Create API key, name it (we suggest <project>-<env> — e.g. ci-prod), and pick the scopes you need.

Copy the key now — we hash it and you cannot read it back.
2

Verify with whoami

Test your key without burning a real budget. GET /api/v1/whoami echoes your resolved identity, the workspace your key is bound to, and the scopes it carries.
curl -H "Authorization: Bearer $LAZYNEXT_KEY" \
  https://lazynext.com/api/v1/whoami
Expected response:
{
  "authType": "apiKey",
  "userId": "user_...",
  "workspaceId": "ws_...",
  "keyId": "key_...",
  "keyPrefix": "ln_live_...",
  "keyName": "ci-prod",
  "scopes": ["read", "write"]
}
3

Make your first real call

Read all decisions in your workspace:
curl -H "Authorization: Bearer $LAZYNEXT_KEY" \
  https://lazynext.com/api/v1/decisions
Or log a new decision from your CI/CD tooling:
curl -X POST \
  -H "Authorization: Bearer $LAZYNEXT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Adopted Postgres 16","outcome":"chosen"}' \
  https://lazynext.com/api/v1/decisions
4

Read the response headers

Every response carries:
  • X-Request-Id — quote this in support tickets
  • X-API-Version — currently v1
  • X-RateLimit-Limit, -Remaining, -Reset — back off pre-emptively when Remaining approaches 0
On 429 you also get Retry-After in seconds. See Rate limits.