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/zapier-enroll-student-action-webhook
The root is api.onlinecoursehost.com.
Authentication
Send your integration token in the x-integration-token header. Get it in Admin > Settings > Integrations > Zapier Integration > Activate. See Where to find your Zapier 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. At least 6 characters, with an uppercase letter, a lowercase letter and a number. 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" }
}If the student already has the product, you get HTTP 200 with "status": "ok" and a message saying it is already assigned.
A missing or invalid token, unknown courseId, missing email or password, or a weak password 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.