Skip to main content

Set a group's profile picture

With this endpoint, you will be able to set a profile picture for a given group.

Parameters

You will need to obtain the UUID of the WhatsApp group that you want to use. In 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
urlA publicly accessible URL pointing to the image you want to set as group's picturehttps://2chat.co/img/2chat-logo.png

Invocation

The group UUID is part of the path in the URL. For this example, we are using 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/set-picture' \
--header 'Content-Type: application/json' \
--header 'X-User-API-Key: your_api_key_here' \
--data '{
"from_number": "+12123334444",
"url": "https://2chat.co/img/2chat-logo.png"
}'

Response

{
"success": true,
}