Skip to main content

Promote a participant to administrator of a group

With this endpoint, you will be able to promote a participant as an administrator in a WhatsApp group.

Parameters

You will need to obtain the UUID of the WhatsApp group the participant is part of. For this example, we will use WAG45b0f301-9203-4660-8b57-b51a6c2742a5 as the UUID.

These parameters should be sent as a JSON payload in the request body.

FieldDescriptionExample values
from_numberYour WhatsApp number that you connected to 2Chat+12123334444
participantsA list of participants you want to promote in the group[ "+447700176576", "+17137157533" ]
info

You can promote up to 10 participants per invocation. If you want to promote more than 10 people, you can call this endpoint multiple times.

Invocation

The group UUID is part of the path in the URL. For this example, we'll use WAG45b0f301-9203-4660-8b57-b51a6c2742a5 as the UUID.

tip

You can obtain the UUID of the group you want to target using the List Groups endpoint

curl -X POST --location 'https://api.p.2chat.io/open/whatsapp/group/WAG45b0f301-9203-4660-8b57-b51a6c2742a5/promote-participant' \
--header 'Content-Type: application/json' \
--header 'X-User-API-Key: your_api_key_here' \
--data '{
"from_number": "+12123334444",
"participants": [
"+447700176576",
"+17137157533"
]
}'

Response

info

After the participants are promoted, it can take a few minutes for 2Chat to be able to see the changes made.

caution

Seeing unaccepted_numbers in the reply means that the numbers listed couldn't be processed, either because they are invalid for the context (e.g., they are not part of the group), or because they don't have a WhatsApp account.

{
"success": true,
"participants": {
"statusCode": 200,
}
}