Skip to main content

Set WhatsApp Text Status

This endpoint will let you set an ephemeral text status on your WhatsApp account with optional styling parameters like background color and font.

This status will show up as an update similar to Instagram statuses.

Parameters

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

FieldDescriptionExample values
textThe text content of the statusoiko!
paramsOptional styling parameters{ "backgroundColor": "#0275d8", "font": 10 }
params.backgroundColorBackground color as a hex code#0275d8
params.fontFont style identifier10

Invocation

Make a POST request to https://api.p.2chat.io/open/whatsapp/set-text-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-text-status/+5491124837650' \
--header 'X-User-API-Key: your_api_key_here' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "oiko!",
"params": { "backgroundColor": "#0275d8", "font": 10 }
}'

Response

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

{
"success": true,
}