Online courses and memberships: build, sell, teach, and see how students are doing.
courses.webanalyticsinc.com/s/your-name), tagline, accent color, currency and logo. Or switch on your WAI business profile and it fills itself in./learn/your-name) shows their courses with progress, a Resume button, your announcements, memberships and certificates./cert/CR-XXXX-XXXX confirms it.Create a token in Settings → API & webhooks, then send Authorization: Bearer wai_courses_.... Responses are {"ok":true,"data":...,"next":"..."}; page with ?limit= (up to 100) and ?after=<next>. Money is in cents.
GET|POST /api/v1/courses | Your courses. POST {"title", "subtitle", "price_cents"} creates a draft. |
GET|PATCH /api/v1/courses/<id> | One course with sections and lessons. PATCH title, subtitle, price_cents, status (draft / published / archived). |
GET /api/v1/students[/<id>] | ?email= &course_id=. One student includes their enrollments. |
GET|POST /api/v1/enrollments | ?course_id= &student_id= &since=YYYY-MM-DD. POST {"course_id", "email", "name"} enrolls someone (free access). |
GET|PATCH /api/v1/enrollments/<id> | Progress, completion, certificate number. PATCH {"status": "active"|"revoked"}. |
GET /api/v1/summary | Courses, students, enrollments, completions, revenue, storage. |
Public feed (no token): GET https://courses.webanalyticsinc.com/feed.cgi?school=<handle> lists published courses (add &format=js for the embed).
Webhooks (signed with X-WAI-Signature: t=..,v1=HMAC-SHA256(secret, t + "." + body), retried 1 min, 5 min, 30 min, 2 h, 12 h):
enrollment.created | A student enrolled in a course (free, coupon, paid, manual or through a membership) |
course.completed | A student finished every lesson of a course (certificate number included) |
quiz.passed | A student passed a quiz (score and pass mark) |
comment.created | A student asked a question or left a comment on a lesson |