This endpoint supports both regular text messages and advanced features like ghost mentions and @everyone mentions for groups.
Endpoint
Headers
Device identifier for multi-device support. Required when multiple devices are registered. If only one device is registered, it will be used as the default. Can also be provided as
device_id query parameter.Request Body
Phone number with country code and WhatsApp suffix.Format:
{country_code}{phone_number}@s.whatsapp.netExample: [email protected]The text message content to send.Example:
"Hello, how are you?"Message ID to reply to. Use this to create a quoted reply to a previous message.Example:
"3EB089B9D6ADD58153C561"Mark the message as forwarded. When set to
true, the message will display a “Forwarded” label.Disappearing message duration in seconds. The message will automatically delete after this duration.Common values:
86400- 24 hours604800- 7 days7776000- 90 days
3600 (1 hour)List of phone numbers to mention (ghost mentions - no @ required in message text). Use special keyword
"@everyone" to mention all group participants.Format: Array of phone numbers (without country code prefix or @s.whatsapp.net suffix)Examples:["628123456789", "628987654321"]- Mention specific users["@everyone"]- Mention all group members
Ghost mentions allow you to mention users without including ”@” in the message text. The mentioned users will still receive a notification.
Response
Response status code. Returns
"SUCCESS" on successful message send.Human-readable response message.
Code Examples
Response Example
Error Responses
Invalid request parameters. Check that phone number format is correct and required fields are provided.
Server error or device not connected. Ensure the device is logged in and connected to WhatsApp.
Features
Ghost Mentions
Ghost mentions allow you to notify specific users without displaying the ”@” symbol in the message text:@everyone Mention
Mention all participants in a group chat:Disappearing Messages
Send messages that automatically delete after a specified duration:- 24 hours:
86400seconds - 7 days:
604800seconds - 90 days:
7776000seconds
Best Practices
-
Phone Number Format: Always include the country code and
@s.whatsapp.netsuffix for individual chats, or@g.usfor groups. - Message Length: WhatsApp supports messages up to 65,536 characters, but keep messages concise for better user experience.
- Rate Limiting: Implement rate limiting to avoid being flagged for spam. WhatsApp may temporarily ban accounts sending too many messages.
- Error Handling: Always check the response status and implement retry logic for failed messages.
- Mentions: Use ghost mentions sparingly. Overusing mentions can annoy users and may be considered spam.
Related Endpoints
- Send Image - Send images with captions
- Send Video - Send video messages
- Send Link - Send links with preview
- Revoke Message - Delete sent messages
- React to Message - Add emoji reactions
