LearnDash
API actions for the LearnDash integration.
LearnDash
Manage LearnDash courses and enrollments via the REST API.
Create a course
Create a new LearnDash course with the given title and optional status.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Course title to create. |
status | string | No | Optional WordPress post status for the course (e.g., '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 | Identifier of the WordPress user to enroll. |
course_id | string | Yes | Identifier of the LearnDash course. |
Response
{}List courses
Retrieve paginated LearnDash courses for the configured site.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number for pagination (defaults to 1). |
per_page | number | No | Number of courses to return per page (defaults to 50). |
Response
[
{}
]