Skip to content

Send Text Status

Send a text status message on WhatsApp.

Usage

php
use NjoguAmos\Waha\Facades\Status;
use NjoguAmos\Waha\Dto\TextStatusData;

$data = new TextStatusData(text: 'Hello from WhatsApp!');

$result = Status::sendText(data: $data);

With Custom Background

php
use NjoguAmos\Waha\Facades\Status;
use NjoguAmos\Waha\Dto\TextStatusData;

$data = new TextStatusData(
    text: 'Hello from WhatsApp!',
    backgroundColor: '#38b42f'
);

$result = Status::sendText(data: $data);

With Contacts

php
use NjoguAmos\Waha\Facades\Status;
use NjoguAmos\Waha\Dto\TextStatusData;

$data = new TextStatusData(
    text: 'Hello from WhatsApp!',
    contacts: ['[email protected]', '[email protected]']
);

$result = Status::sendText(data: $data);

Result

The response is an instance of Saloon\Http\Response.

php
$result->status(); // 201
$result->json();   // ["text" => "Hello from WhatsApp!", ...]

Parameters

ParameterTypeRequiredDescription
textstringYesThe status message text
backgroundColorstringNoBackground color in hex format (e.g., #38b42f). If not provided, a random background will be generated.
fontintYesFont style (1-5)
contactsarray|nullNoArray of chat IDs to send status to

Engines

WEBJSWPPNOWEBGOWS

References

Released under the MIT License.