OnlineCourseHost.com Help Center

Enroll Student Action API

One call creates a student account if it does not exist yet and enrolls the student in a product. Use it to sell through WooCommerce, Shopify or a payment gateway we do not integrate with directly.

Request

POST /api/pabbly-enroll-student-action-webhook

The root is api.onlinecoursehost.com.

Authentication

Send your integration token in the x-integration-token header. See Where to find your Pabbly Integration Token.

Headers

  • Content-Type: application/json
  • Accept: application/json
  • X-INTEGRATION-TOKEN: your token

Body (JSON)

FieldTypeRequiredDescription
courseIdstringrequiredID of the product. Get it from the list endpoint.
emailstringrequiredStudent email
passwordstringrequiredPassword for a new account. Ignored if the student already exists.
namestringoptionalStudent name

Response

On success (HTTP 200):

{
  "status": "success",
  "message": "Account created successfully.",
  "data": { "course": "How to win friends", "email": "student@example.com" }
}

A missing or invalid token, unknown courseId or invalid input returns an error message with HTTP 500.

New students get a welcome email with their login details. Existing students get an email about the new product.

Still need help? Contact Us