WasenderApi API

API Documentation

WasenderApi WhatsApp API

Update Group Participants

Groups

PUT/api/groups/{groupId}/participants/update

Promote or demote one or more participants in a specific group.

Update Group Participants' Roles

This endpoint allows you to change the role of participants within a group. You can either promote a member to an admin or demote an admin back to a regular member.

This action requires that your session has admin privileges in the target group. You can perform the action on multiple participants in a single API call by including their JIDs in the participants array.

The action parameter determines the operation to be performed:

  • promote: Grants admin privileges to the specified participants.
  • demote: Revokes admin privileges from the specified participants.

Parameters

NameTypeRequiredDescription
groupIdstringYesThe JID of the group (e.g., [email protected]).
actionstringYesThe action to perform on the participants. Must be either `promote` or `demote`.
participantsarrayYesAn array of user JIDs (strings) to update.

Code Examples

curl -X PUT "https://www.wasenderapi.com/api/groups/[email protected]/participants/update" 
  -H "Authorization: Bearer YOUR_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "action": "promote",
    "participants": ["[email protected]", "[email protected]"]
}'

Response Examples

{
    "success": true,
    "data": {
        "participants": ["[email protected]"]
    }
}