Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
API reference

Lessons

Runtime calibration distills lessons from your calls and their outcomes. These operations read them.

All paths are under https://api.mubit.ai, with a management key in Authorization: Bearer. Management API covers keys, roles, pagination, retries and errors. The samples read the key from MUBIT_MANAGEMENT_KEY.

List lessons

GET /api/v1/lessons

Lists the lessons runtime calibration distilled: rules, pitfalls and guidelines.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
statusquerystring: active, pending, rejectedno
limitqueryintegernoNumber of records to return (1-200)
cursorquerystringnoSealed pagination cursor from previous page
curl
curl "https://api.mubit.ai/api/v1/lessons" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: List of lessons

Each item of data:

FieldTypeRequiredDescription
idstringyes
rulestringyes
statusstringyes
scopestringyes
importancestringyes
recurrence_countintegerno
created_atstring (date-time)yes
approvalanynoThe lesson's approval; null when it has none.
{
  "data": [
    {
      "id": "les_019283",
      "rule": "Always include tax breakdown in billing responses",
      "status": "active",
      "scope": "global",
      "importance": "high",
      "recurrence_count": 5,
      "created_at": "2026-10-20T00:00:00Z"
    }
  ],
  "next_cursor": null
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
500Internal server error

Get a lesson

GET /api/v1/lessons/{lesson_id}

Returns one lesson with its evidence and scope.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
lesson_idpathstringyes
curl
curl "https://api.mubit.ai/api/v1/lessons/$LESSON_ID" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: Lesson details

FieldTypeRequiredDescription
idstringyes
rulestringyes
statusstringyes
scopestringyes
importancestringyes
citationsarray of stringno
approvalanynoThe lesson's approval; null when it has none.
{
  "id": "les_019283",
  "rule": "Always include tax breakdown in billing responses",
  "status": "active",
  "scope": "global",
  "importance": "high",
  "citations": [
    "call_019283",
    "call_019290"
  ]
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
500Internal server error