Skip to main content

Get Profile

Retrieves the authenticated user’s profile. Automatically creates a profile if one doesn’t exist.

Response

object
User profile object

Example Request

Example Response


Update Profile

Updates the authenticated user’s profile information.

Request Body

string
User display name
string
User biography/description
string
Profile image URL
string
Preferred currency (ISO 4217 code)

Response

object
Updated profile object

Example Request


Delete Account

Deletes the authenticated user’s account and all associated data.

Response

string
Success confirmation message

Example Request

Notes

This action is irreversible. It deletes:
  • User authentication account
  • Profile data
  • All enrollments
  • All progress records
  • All quiz results

List Learners (Admin/Instructor)

Retrieves a list of all learners (users with user_type = “user”). Requires admin or instructor authentication.

Query Parameters

Search by name or email
string
Filter by enrollment status: “all”, “enrolled”, “not-enrolled”

Response

array
Array of learner objects

Example Request

Example Response


Get Learner Purchases (Admin/Instructor)

Retrieves all purchases (payments) for a specific learner. Requires admin or instructor authentication.

Path Parameters

string
required
Learner UUID

Response

array
Array of purchase objects

Example Request


User Types

The platform supports three user types:

Profile Auto-Creation

When a new user signs up, the GET /api/profile endpoint automatically:
  1. Checks if a profile exists
  2. If not, creates one with:
    • user_type: “user” (default)
    • name: Derived from email or user metadata
    • currency: “USD” (default)
  3. Returns the profile
This ensures every authenticated user always has a valid profile.

Error Codes