Skip to main content

Send Text Message

Send a text message to a WhatsApp contact or group. You can include link previews, quoted messages, mentions, and delays.

Endpoint

POST /message/sendText/:instanceName

Path Parameters

instanceName
string
required
The name of your WhatsApp instance that you created

Request Body

number
string
required
The recipient’s WhatsApp number in international format (without + symbol)Example: 5511999999999 for a Brazilian number
text
string
required
The text message content you want to send
delay
integer
Delay before sending the message in millisecondsExample: 1000 for 1 second delay
Enable or disable link preview for URLs in the messageDefault: true
quoted
object
Quote a previous message by providing its key and message object
mentionsEveryOne
boolean
Mention all participants in a group (use with caution)Default: false
mentioned
array
Array of phone numbers to mention in the message. Each number should be a numeric string.Example: ["5511999999999", "5511888888888"]

Response

key
object
Message key information
message
object
The sent message object containing the text and metadata
messageTimestamp
string
Unix timestamp when the message was sent
status
string
Message status (e.g., “PENDING”, “SENT”)

Code Examples

curl -X POST https://your-api-url.com/message/sendText/my-instance \
  -H "Content-Type: application/json" \
  -H "apikey: YOUR_API_KEY" \
  -d '{
    "number": "5511999999999",
    "text": "Hello! This is a test message from Evolution API."
  }'

Advanced Examples

{
  "number": "5511999999999",
  "text": "Hey @5511888888888, check this out!",
  "mentioned": ["5511888888888"]
}
{
  "number": "5511999999999",
  "text": "Replying to your previous message",
  "quoted": {
    "key": {
      "id": "BAE5F2D3E4F5A6B7",
      "remoteJid": "[email protected]",
      "fromMe": false
    },
    "message": {
      "conversation": "Original message text"
    }
  }
}

Error Responses

Make sure your instance is connected before sending messages. Use the instance status endpoint to verify connection.
status
number
HTTP status code
message
string
Error description

Common Errors

Status CodeDescription
400Bad Request - Invalid payload or missing required fields
401Unauthorized - Invalid or missing API key
404Not Found - Instance does not exist
500Internal Server Error - Server-side error
The number field should contain only digits in international format without the + symbol. For example, use 5511999999999 instead of +55 11 99999-9999.

Build docs developers (and LLMs) love