Send a message
$client->messages->send(string chatID, ?Attachment attachment, ?string replyToMessageID, ?string text): MessageSendResponse
POST/v1/chats/{chatID}/messages
Send a text message to a specific chat. Supports replying to existing messages. Returns a pending message ID.
Parameters
chatID: string
Unique identifier of the chat.
Single attachment to send with the message
replyToMessageID?:optional string
Provide a message ID to send this as a reply to an existing message
text?:optional string
Text content of the message you want to send. You may use markdown.
Returns
Send a message
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client();
$response = $client->messages->send(
'!NCdzlIaMjZUmvmvyHU:beeper.com',
attachment: [
'uploadID' => 'uploadID',
'duration' => 0,
'fileName' => 'fileName',
'mimeType' => 'mimeType',
'size' => ['height' => 0, 'width' => 0],
'type' => 'gif',
],
replyToMessageID: 'replyToMessageID',
text: 'text',
);
var_dump($response);{
"chatID": "!signal_adamvy:local-signal.localhost",
"pendingMessageID": "m1694783291234567"
}Returns Examples
{
"chatID": "!signal_adamvy:local-signal.localhost",
"pendingMessageID": "m1694783291234567"
}