LearnDash
API actions for the LearnDash integration.
LearnDash
Manage LearnDash courses and enrollments on your WordPress site.
Create a course
Create a new LearnDash course with the given title and optional status.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Title of the new course. |
status | string | No | Optional publication status for the course (for example, 'publish'). |
Response
{
"id": "mock_value",
"status": "mock_value",
"title": "mock_value"
}Enroll a user in a course
Enroll an existing WordPress user into a LearnDash course.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
learner_id | string | Yes | ID of the WordPress user to enroll. |
course_id | string | Yes | ID of the LearnDash course to enroll the user in. |
Response
{}List courses
List courses from your LearnDash site, one page at a time.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Which page of results to return (defaults to 1). |
per_page | number | No | Number of courses to return per page (defaults to 50). |
Response
[
{}
]