Skip to main content
POST
/
api
/
sendText
Send a text message
curl --request POST \
  --url https://{host}/api/sendText \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "session": "session",
  "chatId": "5511999999999@c.us",
  "text": "Hello World!"
}'
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Description

This endpoint allows you to send simple text messages to individual contacts or groups on WhatsApp. It is also possible to reply to specific messages using the parameter replyTo.

Body

{
  "sessionId": "my-session",
  "jid": "5511999999999@s.whatsapp.net",
  "text": "Hello, how are you?",
  "replyTo": "value"
}

Body Parameters

PropertyTypeRequiredDescription
sessionIdstring✅ YesAuthenticated session ID that will send the message
jidstring✅ YesRecipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups
textstring✅ YesText message content to be sent
replyTostring❌ NoMessage ID to which you want to reply (to create a conversation thread)
{
  "success": true,
  "messageId": "3EB0XXXXXX"
}

Status Codes

  • 200 - Message sent successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized session
  • 404 - Session not found

Usage Example

curl -X POST https://api.wappfy.com.br/api/sendText \
  -H "Content-Type: application/json" \
  -d '{
    "sessionId": "my-session",
    "jid": "5511999999999@s.whatsapp.net",
    "text": "Hello, how are you?"
  }'

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Body

application/json
chatId
string
required

Chat ID (WhatsApp JID)

Example:

"5511999999999@c.us"

text
string
default:Hello, how are you?
required

Text message content

session
string
required

Session name (instanceName)

Example:

"my-session"

reply_to
string

Message ID you want to reply to

Example:

"false_5511999999999@c.us_AAAAAAAAAAAAAAAAAAAA"

Enable link preview automatically

High quality link preview

Response

201 - application/json
id
string
required

Message ID

Example:

"false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA"

timestamp
number
required

Unix timestamp of when the message was created

Example:

1666943582

from
string
required

Chat ID to which this message was sent

Example:

"5511999999999@c.us"

fromMe
boolean
required

Indicates if the message was sent by the current user

source
enum<string>
required

The device that sent the message - either API or APP. Available in events (webhooks/websockets) only and only "fromMe: true" messages.

Available options:
api,
app
Example:

"api"

to
string
required
  • ID for who this message is for.
  • If the message is sent by the current user, it will be the Chat to which the message is being sent.
  • If the message is sent by another user, it will be the ID for the current user.
Example:

"5511999999999@c.us"

participant
string
required

For groups - participant who sent the message

body
string
required

Message content

hasMedia
boolean
required

Indicates if the message has media available for download

ack
enum<number>
required

Message acknowledgement (ACK) status

Available options:
-1,
0,
1,
2,
3,
4
ackName
string
required

Message acknowledgement status name

media
object

Message media object, if any and downloaded

author
string

If the message was sent to a group, this field will contain the user who sent the message

location
object

Location information contained in the message

vCards
string[]

List of vCards contained in the message

_data
object

Message in raw WhatsApp format. May change at any time, use with caution!

replyTo
object
I