Skip to main content

Set WhatsApp Status

Agent Skill

Automate this endpoint with an AI agent using the 2chat-whatsapp skill:

npx skills add 2ChatCo/agent-skills -s 2chat-whatsapp

This endpoint will let you set a status on your WhatsApp account, like the "away" or "only calls" texts.

These values will remain assigned until you change them.

Parameters​

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

FieldDescriptionExample values
statusThe value of the statusMy cool new status

Invocation​

Make a POST request to https://api.p.2chat.io/open/whatsapp/set-status/<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-status/+595981048478' \
--header 'X-User-API-Key: your_api_key_here' \
--header 'Content-Type: application/json' \
--data-raw '{
"status": "My cool new status"
}'

Response​

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

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