Server API
Classes & students
Read your classes and who's in them; enrol people from your own systems.
Each class has a public page at mercestack.com/classrooms/<workspace>/<class> where people pay to join. Paying students become customers in your CRM, tagged student. Use these endpoints to read the roster or give someone a seat — a scholarship, a corporate booking — without payment.
List classes
GET
/v1/classroomsSecret keyclassrooms:read
With price, status and seats taken.
curl https://api.mercestack.com/v1/classrooms \
-H "Authorization: Bearer sk_test_…"Response
{ "object": "list", "data": [ { "id": "c1…", "title": "Product Design Bootcamp", "status": "published", … } ], "hasMore": false, "nextCursor": null }Get a class
GET
/v1/classrooms/:idSecret keyclassrooms:read
Sessions, resources and enrolments.
curl https://api.mercestack.com/v1/classrooms/CLASS_ID \
-H "Authorization: Bearer sk_test_…"Response
{ "id": "c1…", "title": "Product Design Bootcamp", "sessions": [ … ], … }List students
GET
/v1/classrooms/:id/enrollmentsSecret keyclassrooms:read
Everyone enrolled, with status and what they paid.
Query parameters
searchstring- Name or email.
curl https://api.mercestack.com/v1/classrooms/CLASS_ID/enrollments \
-H "Authorization: Bearer sk_test_…"Response
{
"object": "list",
"data": [
{
"id": "e1…",
"name": "Chidi Okeke",
"email": "[email protected]",
"status": "active",
"customerId": "7e1f…",
"amountMinor": "4500000",
"currency": "NGN",
"enrolledAt": "2026-09-01T10:00:00.000Z"
}
],
"hasMore": false,
"nextCursor": null
}Enrol someone
POST
/v1/classrooms/:id/enrollmentsSecret keyclassrooms:write
Gives a seat without payment and emails them the class. Respects capacity.
Body
namestringrequired- Student's name.
emailstringrequired- Where the invitation goes.
curl -X POST https://api.mercestack.com/v1/classrooms/CLASS_ID/enrollments \
-H "Authorization: Bearer sk_test_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name":"Ngozi Eze","email":"[email protected]"}'Response
{ "id": "e2…", "status": "active", … }