Live on Base with Ewance

See the certificates
API Reference

API reference

LearnCoin REST API — base URL, versioning, conventions, and where each endpoint lives.

The LearnCoin API is a single versioned REST surface. All endpoints live under:

https://api.learncoin.me/v1/

Conventions

  • Authentication — Bearer token in Authorization header. See Authentication.
  • Content typeapplication/json for all requests and responses.
  • Timestamps — ISO 8601 UTC (2026-04-23T12:00:00Z).
  • IDs — ULID-shaped prefixed strings: bat_01HX… (batch), cred_01HX… (credential), tnt_01HX… (tenant).
  • IdempotencyIdempotency-Key header accepted on all POSTs; retries within 24h deduplicate.
  • Pagination — cursor-based via cursor and limit query params; max limit is 100.
  • Errors — standard HTTP status codes; body shape { "error": { "code": "...", "message": "...", "request_id": "..." } }.

Environments

EnvironmentBase URLChainKey prefix
Testnethttps://api.learncoin.me/v1/Base Sepolialrn_test_...
Productionhttps://api.learncoin.me/v1/Base mainnetlrn_live_...

Your API key's prefix determines which chain your credentials are anchored on — no separate base URL.

Where to go next

  • Authentication — how keys work, rotation, scoping
  • Endpoints — full endpoint list with request / response shapes

OpenAPI spec

Live at learncoin.me/openapi.yaml — OpenAPI 3.1, covers every endpoint with full request / response schemas.

Generate a typed client:

# TypeScript
npx openapi-typescript https://learncoin.me/openapi.yaml -o learncoin.d.ts

# Python
pip install openapi-python-client
openapi-python-client generate --url https://learncoin.me/openapi.yaml

# Go
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest
oapi-codegen -package learncoin https://learncoin.me/openapi.yaml > learncoin.go

Or drop the hand-maintained TypeScript mirror from /docs/api/types directly into your codebase — no install, no codegen step.

On this page