User API Documentation
Baileys 7 multi-account API. Replace the placeholders with the credentials shown in Admin → Accounts. Typing presence is explicit API-only and never starts just because a message arrived.
Base URL: https://whatsapi.rentalaibot.com idInstance: YOUR_ID_INSTANCE apiToken: YOUR_API_TOKEN
GET · State
https://whatsapi.rentalaibot.com/waInstance{idInstance}/getStateInstance/{apiToken}GET · QR
https://whatsapi.rentalaibot.com/waInstance{idInstance}/qr/{apiToken}GET · Contacts
https://whatsapi.rentalaibot.com/waInstance{idInstance}/getContacts/{apiToken}GET · Groups
https://whatsapi.rentalaibot.com/waInstance{idInstance}/getGroups/{apiToken}GET · Reboot
https://whatsapi.rentalaibot.com/waInstance{idInstance}/reboot/{apiToken}GET · Logout
https://whatsapi.rentalaibot.com/waInstance{idInstance}/logout/{apiToken}POST · Pair with phone code
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/getAuthorizationCode/{apiToken}
Content-Type: application/json
{"phoneNumber":"923001234567"}POST · Send text or quoted reply
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/sendMessage/{apiToken}
Content-Type: application/json
{"chatId":"923001234567@c.us","message":"Hello"}
Quoted reply:
{"chatId":"120363000000000000@g.us","message":"Done","quotedMessageId":"MESSAGE_ID"}POST · Mentions
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/sendMessageMention/{apiToken}
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/sendReplyMention/{apiToken}
{"chatId":"120363000000000000@g.us","message":"Done","mentions":["923001234567@c.us"],"quotedMessageId":"MESSAGE_ID"}POST · Media URL
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/sendFileByUrl/{apiToken}
{"chatId":"923001234567@c.us","urlFile":"https://example.com/file.pdf","fileName":"file.pdf","caption":"Optional"}Aliases: sendDocumentByUrl, sendImageByUrl, sendVideoByUrl, sendAudioByUrl.
POST · Media Base64
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/sendFileByBase64/{apiToken}
{"chatId":"923001234567@c.us","fileName":"image.jpg","base64File":"BASE64","mimetype":"image/jpeg","caption":"Optional"}Aliases: sendDocumentByBase64, sendImageByBase64, sendVideoByBase64, sendAudioByBase64.
POST · Typing
Typing is endpoint-driven only; incoming messages do not automatically show typing. Use one of the modes below.
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/sendTyping/{apiToken}
Content-Type: application/json
1) Show typing for fixed seconds:
{"chatId":"923001234567@c.us","seconds":5}
Milliseconds are also supported:
{"chatId":"923001234567@c.us","typingTime":5000}
2) Keep typing until this exact incoming message is replied to:
{"chatId":"120363000000000000@g.us","messageId":"INCOMING_MESSAGE_ID","untilReply":true}
Use messageId/messageIdShort received in the incoming webhook payload. Typing automatically stops after a successful outbound message sent to the same chat (webhook reply or sendMessage API). A safety timeout also stops stale sessions.
3) Stop typing manually:
{"chatId":"923001234567@c.us","action":"stop"}Legacy POST /typing with x-api-key accepts the same JSON body.
POST · Edit message
POST https://whatsapi.rentalaibot.com/waInstance{idInstance}/editMessage/{apiToken}
{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","message":"Updated text"}Webhook auto-reply format
Incoming messages POST JSON to the configured webhook. For an automatic WhatsApp reply, the webhook must return HTTP 200 and a JSON reply body. A success acknowledgement alone never sends a message. Alternatively, send messages separately using the API.
HTTP/1.1 200 OK
Content-Type: application/json
{"reply":"Hello from bot"}
Also accepted: {"replyText":"Hello"}, {"text":"Hello"},
{"data":{"reply":"Hello"}}Plain-text webhook replies are disabled by default. Set WEBHOOK_ALLOW_PLAINTEXT_REPLY=true to enable.
Legacy x-api-key endpoints
Send the account token in the x-api-key header. Available routes: /instance/health, /qr, /contacts, /groups, /pair-code, /send, /reset, /send-quoted-message, /send-message-mention, /send-reply-mention, /send-file-url, /send-file-base64, /typing, /edit-message.