API Documentation
Integrate with G4 Learn programmatically. All endpoints return JSON.
Base URL
https://api.learn.g4.businessFor the hosted SaaS. Self-hosted or dev environments use your configured site URL.
Authentication
Authenticated endpoints require a Bearer token in the Authorization header. Obtain your token from the Tutor dashboard under Settings → API or via the login endpoint.
Authorization: Bearer <your-token>Tokens are scoped to your account. Keep them secret — they grant full access to your academy's data.
Endpoints
/api/healthHealth check. Returns service status and version. No authentication required. Useful for uptime monitoring.
GET https://api.learn.g4.business/api/health
Response 200
{
"ok": true,
"version": "1.0.0",
"uptime": 123456
}/api/plansList available subscription plans. Supports optional currency query param for localized pricing with tax breakdown.
GET https://api.learn.g4.business/api/plans?currency=INR
Response 200
[
{
"id": "plan_free",
"name": "Free",
"tier": "free",
"monthly": 0,
"annual": 0,
"currency": "INR",
"trialDays": 0,
"platformFeePercent": 10,
"features": ["Up to 1 course", "Community"],
"highlighted": false
}
]
Query params:
currency (optional) — e.g. INR, USD, EUR, GBP, AED/api/currency/ratesList supported currencies, their symbols, and the base currency. Used to populate currency selectors and format prices.
GET https://api.learn.g4.business/api/currency/rates
Response 200
[
{ "code": "INR", "name": "Indian Rupee", "symbol": "₹", "isBase": true },
{ "code": "USD", "name": "US Dollar", "symbol": "$", "isBase": false }
]/api/tenancy/resolveResolve tenancy from a hostname. Returns the academy/tenant associated with a domain or subdomain. Used by the storefront to render the correct branding.
GET https://api.learn.g4.business/api/tenancy/resolve?host=myacademy.learn.g4.business
Response 200
{
"tenant": {
"id": "ten_abc123",
"domain": "myacademy.learn.g4.business",
"name": "My Academy"
}
}
Query params:
host (required) — hostname to resolve/api/tenancy/storefrontFetch storefront data for a tenant — branding, courses, and public settings. Powers the public academy site at [domain]/page.
GET https://api.learn.g4.business/api/tenancy/storefront?domain=myacademy.learn.g4.business
Response 200
{
"tenant": { "id": "ten_abc123", "name": "My Academy" },
"brand": { "primaryColor": "262 83% 58%" },
"courses": [ { "id": "crs_1", "title": "Intro to Design" } ]
}Errors
Errors use standard HTTP status codes and a JSON body:
{
"error": "unauthorized",
"message": "Missing or invalid Bearer token"
}
Status codes:
400 — Bad request (invalid params)
401 — Unauthorized (missing/invalid token)
403 — Forbidden
404 — Not found
429 — Rate limited
500 — Internal errorRate Limits
Public endpoints are rate-limited to 100 requests/minute per IP. Authenticated endpoints follow the limits of your plan. Check response headers X-RateLimit-Remaining and Retry-After.
Need help?
Contact us at [email protected] or visit the Help center.
Operated by Sotor Easy Life Technologies LLP, Nagpur, Maharashtra, India.