POST
Send Text
https://your-domain.com/api/v1/[instanceId]/send/text
Headers
| Authorization | Bearer YOUR_API_TOKEN |
| Content-Type | application/json |
JSON Payload
chatIdstring | numberRequired
The recipient's phone number, username (with @), or chat ID.
textstringRequired
The message text to send.
replyToMsgIdnumber
The ID of a message to reply to.
curl -X POST "https://your-domain.com/api/v1/YOUR_INSTANCE_ID/send/text" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chatId": "@username",
"text": "Hello world!"
}'const response = await fetch("https://your-domain.com/api/v1/YOUR_INSTANCE_ID/send/text", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"chatId": "@username",
"text": "Hello world!"
})
});
const data = await response.json();
console.log(data);