Skip to main content

Set WhatsApp Profile Picture

This endpoint will let you set the profile picture of your WhatsApp account to the provided value.

Parameters

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

FieldDescriptionExample value
urlThe URL of the image you want to set as profile picturehttps://2chat.co/img/2chat-logo.png
tip

To remove the profile picture, set url to null.

Invocation

Make a POST request to https://api.p.2chat.io/open/whatsapp/set-profile-picture/<number> where <number> is the phone number that you have connected to 2Chat.

curl --location --request POST 'https://api.p.2chat.io/open/whatsapp/set-profile-picture/+595981048477' \
--header 'X-User-API-Key: your_api_key_here' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://2chat.co/img/2chat-logo.png"
}'

Response

The API will return whether it succeded or not to queue the request for processing

{
"success": true,
"batched": true
}