API Reference
Agent-friendly REST endpoints for the Royal Glow platform.
API Reference
The public API uses clean, human-readable RESTful URLs with a consistent JSON envelope, so both browsers and AI agents can discover and call them.
Base URLs: customer endpoints are on https://theroyalglow.in
(local: http://localhost:3000); the admin endpoint groups are a separate app
on https://admin.theroyalglow.in (local: http://localhost:3001) with no
/api/admin/ segment. Most endpoints require a Better Auth session cookie;
public endpoints (services, availability, lead capture, health) need none.
Every response — except GET /api/health — uses the shared { success, data }
envelope.
Response shape
{ "success": true, "data": {}, "meta": {} }{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request data",
"statusCode": 400,
"requestId": "req_xxx"
}
}Endpoint groups
Services & Availability
Catalogue, service detail, slot availability
Bookings (customer)
Create, view, cancel a booking
Admin — Bookings
Approve, assign, complete, no-show
Customers & CRM
Directory, profiles, notes, tags
Leads
Lead capture + admin pipeline
Memberships
Customer view + admin management
Loyalty & Offers
Gems and promotional offers
Notifications & Realtime
In-app, push, Ably token
Background Jobs
QStash-triggered job routes
Health
Liveness + dependency checks
Key endpoints (quick index)
| Action | Method | Path |
|---|---|---|
| List services | GET | /api/services |
| Check availability | GET | /api/availability?date={YYYY-MM-DD}&branchId={id} |
| Submit booking request | POST | /api/bookings |
| Get booking status | GET | /api/bookings/{id} |
| Submit campaign lead | POST | /api/leads |
| Health check | GET | /api/health |
AI-discovery files
/llms.txt
Concise site summary with live service names.
/llms-full.txt
Full menu with prices, durations, policies, and FAQs.
/sitemap.xml
Crawler discovery — all major AI crawlers allowed.
/robots.txt
Crawl rules; AI crawlers explicitly allowed.
A complete, auto-generated reference (via fumadocs-openapi from a published
OpenAPI spec) is a planned follow-up. This page documents the stable,
agent-facing surface in the meantime.
Was this page helpful?