LearnDash icon

LearnDash

Interact with the LearnDash LMS REST API

Actions60

User Courses → Add

AI-generated

Summary

Adds one or more courses to a user's LearnDash course list, sending a POST request to the user's courses endpoint with the provided course IDs.

Inputs

  • Parent ID (required) — The numeric ID of the user whose courses will be updated. Required.
  • Item IDs — One or more course IDs to add to the user. Optional in the UI, but at least one ID is required for a meaningful operation.

Output shape

Array of items (the API response after the POST request)

The response from the LearnDash API is normalized into an n8n item array.

Examples

Example 1: Add two courses to a user

POST to /wp-json/ldlms/v2/users/{parentId}/courses with body {"course_ids": [...]}

Discussion