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.

Preview build. The endpoints below use dummy data to show the shape of the API and this documentation UI. We’ll swap in the live, versioned reference once your API key is issued.

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.

POST /v1/auth/token

Exchange your client credentials for an access token.

FieldTypeDescription
client_idstringIssued when API access is approved.
client_secretstringKeep this server-side only.
grant_typestringAlways client_credentials.
Request
POST /v1/auth/token
Content-Type: application/json

{
  "client_id": "fg_live_8h2k...",
  "client_secret": "••••••••••••",
  "grant_type": "client_credentials"
}
Response · 200
{
  "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.

EnvironmentBase URL
Productionhttps://api.floralgray.com/v1
Sandboxhttps://api.sandbox.floralgray.com/v1

Errors

Errors return a standard JSON body with a code and message, alongside the HTTP status.

StatusMeaning
400Malformed request — check required fields.
401Missing or expired access token.
403Token valid, but not scoped for this resource.
404Resource doesn’t exist, or isn’t in your account.
429Rate limit exceeded — see below.
500Something 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.

PlanRequests / min
Standard60
Partner300

Students

Read enrolled student records, or look up a single student by ID.

GET /v1/students

List students, optionally filtered by course and paginated.

Query paramTypeDescription
course_idstringOptional. Filter to one course.
pageintegerDefault 1.
limitintegerDefault 20, max 100.
Request
GET /v1/students?course_id=crs_104&limit=2
Authorization: Bearer eyJhbGciOi...
Response · 200
{
  "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
}
GET /v1/students/{id}

Fetch a single student by ID.

Request
GET /v1/students/stu_7781
Authorization: Bearer eyJhbGciOi...
Response · 200
{
  "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.

GET /v1/courses

List all courses.

Request
GET /v1/courses
Authorization: Bearer eyJhbGciOi...
Response · 200
{
  "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.

POST /v1/enrollments

Enroll a student in a course.

FieldTypeDescription
student_idstringRequired.
course_idstringRequired.
Request
POST /v1/enrollments
Content-Type: application/json

{
  "student_id": "stu_7781",
  "course_id": "crs_104"
}
Response · 201
{
  "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.