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/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/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. At least 6 characters, with an uppercase letter, a lowercase letter and a number. 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" }
}

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.

Still need help? Contact Us