Skip to main content

Get All Applications

Retrieve all educator applications with optional filtering by status.

Authentication

string
required
Bearer token with admin role required

Query Parameters

string
Filter applications by status. Available values:
  • pending - Applications awaiting review
  • approved - Approved applications
  • rejected - Rejected applications
If not specified, returns all applications regardless of status

Response

boolean
Indicates if the request was successful
array
Array of applications sorted by submission date (newest first)

Approve Application

Approve an educator application and grant the user educator role in Clerk.

Authentication

string
required
Bearer token with admin role required

Path Parameters

string
required
Application ID (MongoDB ObjectId)

Response

boolean
Indicates if the approval was successful
string
Confirmation message

Side Effects

  1. Updates application status to approved
  2. Clears any existing rejectionReason
  3. Updates user’s Clerk public metadata with role: 'educator'
  4. User can now create and publish courses

Example Request


Reject Application

Reject an educator application with an optional reason.

Authentication

string
required
Bearer token with admin role required

Path Parameters

string
required
Application ID (MongoDB ObjectId)

Request Body

string
Reason for rejection (will be visible to the applicant)

Response

boolean
Indicates if the rejection was successful
string
Confirmation message

Side Effects

  1. Updates application status to rejected
  2. Stores the rejection reason (if provided)
  3. User can resubmit a new application later
  4. Previous rejection reason will be cleared upon resubmission

Example Requests

Notes

  • Applications can only be approved or rejected once they are in pending status
  • Rejected users can resubmit applications, which will overwrite their previous submission
  • Approving an application automatically grants the educator role in Clerk
  • The reason field is optional but recommended to provide feedback to applicants
  • All admin endpoints require the protectAdmin middleware authentication