Lodol Docs

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

ParameterTypeRequiredDescription
titlestringYesCourse title to create.
statusstringNoOptional 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

ParameterTypeRequiredDescription
learner_idstringYesIdentifier of the WordPress user to enroll.
course_idstringYesIdentifier of the LearnDash course.

Response

{}

List courses

Retrieve paginated LearnDash courses for the configured site.

Parameters

ParameterTypeRequiredDescription
pagenumberNoPage number for pagination (defaults to 1).
per_pagenumberNoNumber of courses to return per page (defaults to 50).

Response

[
  {}
]

On this page