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 parameterreplyTo
.
Body
Body Parameters
Property | Type | Required | Description |
---|---|---|---|
sessionId | string | ✅ Yes | Authenticated session ID that will send the message |
jid | string | ✅ Yes | Recipient identifier (WhatsApp JID). Format: 5511999999999@s.whatsapp.net for contacts or 120363XXXXX@g.us for groups |
text | string | ✅ Yes | Text message content to be sent |
replyTo | string | ❌ No | Message ID to which you want to reply (to create a conversation thread) |
Status Codes
200
- Message sent successfully400
- Invalid parameters401
- Unauthorized session404
- Session not found
Usage Example
Authorizations
Your Wappfy API key (get it at dash.wappfy.com.br)
Body
Chat ID (WhatsApp JID)
"5511999999999@c.us"
Text message content
Session name (instanceName)
"my-session"
Message ID you want to reply to
"false_5511999999999@c.us_AAAAAAAAAAAAAAAAAAAA"
Enable link preview automatically
High quality link preview
Response
Message ID
"false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA"
Unix timestamp of when the message was created
1666943582
Chat ID to which this message was sent
"5511999999999@c.us"
Indicates if the message was sent by the current user
The device that sent the message - either API or APP. Available in events (webhooks/websockets) only and only "fromMe: true" messages.
api
, app
"api"
- 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.
"5511999999999@c.us"
For groups - participant who sent the message
Message content
Indicates if the message has media available for download
Message acknowledgement (ACK) status
-1
, 0
, 1
, 2
, 3
, 4
Message acknowledgement status name
Message media object, if any and downloaded
If the message was sent to a group, this field will contain the user who sent the message
Location information contained in the message
List of vCards contained in the message
Message in raw WhatsApp format. May change at any time, use with caution!