learndash/manage-group-membership adds learners to a group or removes them from it.
Adding somebody grants every course the group carries, in one call.
At a glance
| Ability | learndash/manage-group-membership |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Groups |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
So the scale runs the other way from the course ability: one member, many courses. A group carrying twelve courses grants twelve on every addition.
Removing revokes that access, unless the learner also holds the course directly — a direct enrolment outlives group membership, which is the usual reason somebody removed from a group still has a course.
This is incremental. Pass add and remove as arrays; anything you do not mention is left alone. That makes a single change a single call, and it means a caller cannot wipe a list by sending a short one.
Learners can be given as user IDs, logins or email addresses, and the response names anything that could not be resolved to a user — which matters when the list came from a spreadsheet.
Progress is never deleted. A learner removed and re-added picks up where they left off.
The response reports the resulting member count, which is the number to check against what was expected.
Idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
group_id | integer | Yes | The group. |
add | array | No | User IDs, logins or emails to add. |
remove | array | No | User IDs, logins or emails to remove. |
What comes back
| Name | Type | What it is |
|---|---|---|
member_count | integer | How many members the group has afterwards. |
unresolved | array | Entries that could not be matched to a user. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Add these three people to the January cohort.
It resolves to one call:
{
"ability": "learndash/manage-group-membership",
"parameters": {
"group_id": 700,
"add": ["sam@example.com", "alex@example.com", 91]
}
}Worth knowing
- Adding grants every course the group carries.
- A direct enrolment survives removal from the group.
- Unresolvable entries are named rather than silently dropped.
- Progress survives removal and re-addition.
Related abilities
- LearnDash Manage Group Courses — what they gain
- LearnDash Get Access Info — check one learner’s source of access
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category