# manage-portal-members-and-prospects Manage the lifecycle of API Experience Hub portal members and prospects. Use when an admin needs to approve or reject prospects (candidate users), list active members, inspect and update a member's user-group assignments, or disable a member. Covers the full join → approve → assign → disable flow. - **APIs:** [api-experience-hub-management](https://dev-portal.mulesoft.com/apis/api-experience-hub-management.md)- **Skill Source:** [SKILL.md](https://dev-portal.mulesoft.com/skills/manage-portal-members-and-prospects/SKILL.md) ## Steps ### Step 1: Step 1: List AEH Connections **API:** `urn:api:api-experience-hub-management`**Operation:** `getConnections` **Outputs:** - `connectionId` (`$[*].id`) — AEH connection ID (Salesforce org link) backing the portal ### Step 2: Step 2: List Portals on the Connection **API:** `urn:api:api-experience-hub-management`**Operation:** `getAllApiPortalByConnectionId` **Inputs:** - `connectionId` — Connection ID from Step 1 **Outputs:** - `portalId` (`$[*].id`) — ID of the portal to manage ### Step 3: Step 3: List Pending Prospects **API:** `urn:api:api-experience-hub-management`**Operation:** `getProspects` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID **Outputs:** - `prospects` (`$.prospects[*]`) — Pending prospects awaiting admin decision - `prospectId` (`$.prospects[*].id`) — Prospect ID used by the approve/reject operations ### Step 4: Step 4: Approve a Prospect **API:** `urn:api:api-experience-hub-management`**Operation:** `approveProspect` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID - `prospectId` — The prospect being approved - `approvalRequest` — User groups to assign to the new member on approval **Outputs:** - `approvedUserId` (`$.userId`) — The user ID of the newly approved member ### Step 5: Step 5: Reject a Prospect (Optional) **API:** `urn:api:api-experience-hub-management`**Operation:** `rejectProspect` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID - `prospectId` — The prospect being rejected **Outputs:** - `rejectedProspectId` (`$.id`) — The rejected prospect's ID (for audit) ### Step 6: Step 6: List Portal Members **API:** `urn:api:api-experience-hub-management`**Operation:** `getCommunityUsers` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID **Outputs:** - `members` (`$.users[*]`) — Active portal members - `userId` (`$.users[*].id`) — Portal-member user ID used by per-member operations ### Step 7: Step 7: Inspect a Member's User-Group Assignments **API:** `urn:api:api-experience-hub-management`**Operation:** `getCommunityUser` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID - `userId` — Portal-member user ID **Outputs:** - `memberUserGroups` (`$.userGroups[*]`) — Current user groups assigned to the member ### Step 8: Step 8: Update a Member's User-Group Assignments **API:** `urn:api:api-experience-hub-management`**Operation:** `addGroupMappingToUser` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID - `targetUserId` — Portal-member user ID - `userGroupsRequest` — Full replacement set of user groups for this member **Outputs:** - `updatedUserId` (`$.userId`) — Confirmed member ID with new assignments applied ### Step 9: Step 9: Disable a Portal Member (Optional) **API:** `urn:api:api-experience-hub-management`**Operation:** `disableCommunityUser` **Inputs:** - `connectionId` — Connection ID - `portalId` — Portal ID - `targetUserId` — The member to disable **Outputs:** - `disabledUserId` (`$.userId`) — Confirmed disabled member ID