Developers · API Preview
Floral Gray LMS API
A REST API for institutes and partners who want to read and write student, course and enrollment data straight from their own systems — no spreadsheets, no manual syncing.
Introduction
The Floral Gray LMS API is a JSON REST API. It lets your own systems read and write the same student, course and enrollment records your admins manage in the dashboard — useful for syncing a school information system, a billing tool, or a custom admin panel.
Every example on this page is illustrative: dummy endpoints, dummy IDs, dummy data. It exists to show how the real reference will read and feel once your API key is issued.
Authentication
Requests are authenticated with a short-lived bearer token, issued from your client credentials. Send the token in the Authorization header on every request.
Exchange your client credentials for an access token.
| Field | Type | Description |
|---|---|---|
client_id | string | Issued when API access is approved. |
client_secret | string | Keep this server-side only. |
grant_type | string | Always client_credentials. |
POST /v1/auth/token
Content-Type: application/json
{
"client_id": "fg_live_8h2k...",
"client_secret": "••••••••••••",
"grant_type": "client_credentials"
}
{
"access_token": "eyJhbGciOi...",
"token_type": "bearer",
"expires_in": 3600
}
Base URL & Versioning
The API is versioned in the URL path. Breaking changes ship under a new version; your integration stays on v1 until you choose to move.
| Environment | Base URL |
|---|---|
| Production | https://api.floralgray.com/v1 |
| Sandbox | https://api.sandbox.floralgray.com/v1 |
Errors
Errors return a standard JSON body with a code and message, alongside the HTTP status.
| Status | Meaning |
|---|---|
400 | Malformed request — check required fields. |
401 | Missing or expired access token. |
403 | Token valid, but not scoped for this resource. |
404 | Resource doesn’t exist, or isn’t in your account. |
429 | Rate limit exceeded — see below. |
500 | Something failed on our end. Safe to retry. |
Rate Limits
Limits apply per client, by plan. Current usage is returned on every response via X-RateLimit-Remaining.
| Plan | Requests / min |
|---|---|
| Standard | 60 |
| Partner | 300 |
Students
Read enrolled student records, or look up a single student by ID.
List students, optionally filtered by course and paginated.
| Query param | Type | Description |
|---|---|---|
course_id | string | Optional. Filter to one course. |
page | integer | Default 1. |
limit | integer | Default 20, max 100. |
GET /v1/students?course_id=crs_104&limit=2
Authorization: Bearer eyJhbGciOi...
{
"data": [
{
"id": "stu_7781",
"name": "Amna Raza",
"email": "[email protected]",
"status": "active"
},
{
"id": "stu_7782",
"name": "Bilal Khan",
"email": "[email protected]",
"status": "active"
}
],
"page": 1,
"has_more": true
}
Fetch a single student by ID.
GET /v1/students/stu_7781
Authorization: Bearer eyJhbGciOi...
{
"id": "stu_7781",
"name": "Amna Raza",
"email": "[email protected]",
"enrolled_courses": ["crs_104"],
"devices_active": 2,
"status": "active"
}
Courses
List the courses in your account, with enrollment counts.
List all courses.
GET /v1/courses
Authorization: Bearer eyJhbGciOi...
{
"data": [
{
"id": "crs_104",
"title": "Intro to Physics",
"enrolled_count": 46
}
]
}
Enrollments
Enroll a student in a course from your own system — useful right after a payment or signup completes elsewhere.
Enroll a student in a course.
| Field | Type | Description |
|---|---|---|
student_id | string | Required. |
course_id | string | Required. |
POST /v1/enrollments
Content-Type: application/json
{
"student_id": "stu_7781",
"course_id": "crs_104"
}
{
"id": "enr_9931",
"student_id": "stu_7781",
"course_id": "crs_104",
"status": "active"
}
Want early access to the API?
Tell us what you’re integrating with and we’ll follow up once your key is ready.