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/jsonAccept: application/jsonX-INTEGRATION-TOKEN: your token
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| courseId | string | required | ID of the product. Get it from the list endpoint. |
| string | required | Student email | |
| password | string | required | Password for a new account. Ignored if the student already exists. |
| name | string | optional | Student 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.