Solfy Public API

v1

Export your school’s classes, homework, and student scores.

A Solfy school contains classes, and each class has homeworks assigned to its students. This API lets you walk that tree and extract score per student for each homework — so you can sync results into a gradebook, dashboard, or school information system. Authenticated extract calls share a quota of 60 requests per UTC minute per school.

Try it

Paste your school API key and call the live extract from this page. These requests count toward the 60/min quota.

Enter a key, then choose an endpoint.


      

Authentication

Send the school API key as a Bearer token. The secret is shown once when a school admin creates or rotates it.

Authorization: Bearer $PUBLIC_API_KEY

Missing or invalid key returns 401 with WWW-Authenticate: Bearer.

Endpoints

All extract responses are wrapped as {"data": ...}.

GET /public/v1/school

School bound to the API key.

curl -H "Authorization: Bearer $PUBLIC_API_KEY" "$HOST/public/v1/school"
{
  "data": {
    "short_name": "Lycée Ada",
    "full_name": "Lycée Ada Lovelace",
    "school_code": "ABC123",
    "url": "https://solfy.education/schools/ABC123"
  }
}
GET /public/v1/classes

Active, non-archived classes, sorted by name.

curl -H "Authorization: Bearer $PUBLIC_API_KEY" "$HOST/public/v1/classes"
{
  "data": [
    {
      "name": "4e A",
      "description": "Solfège",
      "class_code": "XYZ789",
      "url": "https://solfy.education/schools/ABC123/classes/XYZ789"
    }
  ]
}
GET /public/v1/classes/{class_code}/homeworks

Homeworks of a class, sorted by homework_order.

curl -H "Authorization: Bearer $PUBLIC_API_KEY" \
  "$HOST/public/v1/classes/$CLASS_CODE/homeworks"
{
  "data": [
    {
      "homework_order": 1,
      "started_at": "2026-09-01T08:00:00+00:00",
      "expired_at": "2026-09-08T08:00:00+00:00",
      "memo": "Week 1"
    }
  ]
}
GET /public/v1/classes/{class_code}/homeworks/{homework_order}/results

One average score per current student (0–100): the rounded mean of their exercise progress on that class homework. Students with no work appear with score: 0.

curl -H "Authorization: Bearer $PUBLIC_API_KEY" \
  "$HOST/public/v1/classes/$CLASS_CODE/homeworks/$HOMEWORK_ORDER/results"
{
  "data": {
    "homework_order": 1,
    "started_at": "2026-09-01T08:00:00+00:00",
    "expired_at": "2026-09-08T08:00:00+00:00",
    "memo": "Week 1",
    "students": [
      { "user_id": "e55d4931-fcd6-443a-9df8-06d2a1f869cb", "pseudo": "Ada", "score": 73 }
    ]
  }
}

Quota

All authenticated /public/v1 extract routes share 60 requests per UTC minute per school. This documentation page is not counted.

HeaderMeaning
RateLimit-Limit60
RateLimit-RemainingRequests left in the current minute
RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (on 429 only)

Errors

Errors always use this JSON format:

{
  "detail": {
    "message": "Invalid API key",
    "domain": "public_api",
    "code": 260001
  }
}
HTTPCodeWhen
401260000Missing API key
401260001Invalid API key
404260002Unknown or foreign class_code
404260003Unknown homework_order
429260006Quota exceeded