Abilities

Approve Applications

lh-membership/approve-applications Idempotent

Approves membership applications waiting on this site, as Approve Member(s) does under Users > Pending Approval: each applicant becomes a regular member and is sent the site's welcome email, with the optional message added. Only applicants pending on this site are changed; anyone else is skipped and reported, so repeating a call is harmless. Use list-pending-applications to find user IDs. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
user_idsarray of integerYesThe applicants, by user ID.
messagestringNoOptional personal message added to the welcome email. Plain text; line breaks are kept.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Approve Team Requests

lh-membership/approve-team-requests Idempotent

Approves open team join requests on this site, as Approve does under Users > Team Requests: each member is added to the team and notified. Requests already decided, or not on this site, are skipped and reported, so repeating a call is harmless. Use list-team-requests to find request IDs. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
request_idsarray of integerYesThe requests, by request_id from list-team-requests.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Decline Team Requests

lh-membership/decline-team-requests Destructive Idempotent

Declines open team join requests on this site, as Decline does under Users > Team Requests: each request is closed and the member is notified. A decline cannot be undone, but the member can ask again. Requests already decided, or not on this site, are skipped and reported. Use list-team-requests to find request IDs. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
request_idsarray of integerYesThe requests, by request_id from list-team-requests.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Get Membership Status

lh-membership/get-membership-status Read-only Idempotent

Returns whether a given user is a member of this site, and their member type, based on the lh_membership_member_type taxonomy. Requires edit_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
user_idintegerYesThe WordPress user ID to check.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

List Members

lh-membership/list-members Read-only Idempotent

Lists users who hold a term in the lh_membership_member_type taxonomy on this site (i.e. are members), optionally filtered by member type slug. Requires edit_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
type_slugstringNoOptional. Restrict to a single member type term slug. Omit to return members of all types.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

List Open Invitations

lh-membership/list-open-invitations Read-only Idempotent

Lists everyone with an unfinished membership application on this site, one entry per person, with their teams and reminder status. These are the people with an open organisation invitation who are not members, the same people as Users > Open Invitations. Each entry has the user ID, name, email, teams (group ID and name), earliest invite date, days open, the date each reminder was sent, the next reminder and when it is due (empty when both have been sent), and the reminder stage. While reminders are off on the site, next_due shows when each would be sent. Filter by team, reminder stage and minimum days open. Read-only. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
group_idintegerNoOnly people invited to this team (BuddyPress group ID). Omit for every team.
stagestringNoOnly people at this reminder stage: none (not reminded yet), reminder_1 (reminder 1 sent) or done (both sent). Omit for every stage. One of: none, reminder_1, done.
min_days_openintegerNoOnly people whose earliest open invitation is at least this many days old. Omit for any age.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

List Pending Applications

lh-membership/list-pending-applications Read-only Idempotent

Lists the membership applications waiting for approval on this site, most recent first: complete applications (required details given and terms accepted) that have not yet been approved or rejected. Returns each applicant's user ID, display name and the date they applied, the count, and the URL of the Users > Pending Approval screen where they are approved or rejected. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

List Team Requests

lh-membership/list-team-requests Read-only Idempotent

Lists the open requests by members to join a team on this site, newest first: requests made where the site requires approval to join a team, waiting to be approved or declined. Returns for each request its ID, the member, the team, when it was made and any notes the site adds, plus the URL of the Users > Team Requests screen. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Reject Applications

lh-membership/reject-applications Destructive Idempotent

Rejects membership applications waiting on this site, as Reject Member(s) does under Users > Pending Approval, and sends each applicant the site's rejection email, with the optional message added. Only applicants pending on this site are changed; anyone else is skipped and reported. A rejection cannot be undone from here. Use list-pending-applications to find user IDs. Requires add_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
user_idsarray of integerYesThe applicants, by user ID.
messagestringNoOptional personal message added to the rejection email, such as the reason. Plain text; line breaks are kept.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.
run_without_site_pluginsbooleanNoOptional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.