Baileys WhatsApp API

Green API style endpoints. Admin routes are hidden from this user docs page.

Admin Panel

Credentials

Base URL: https://baileys.rentalaibot.com

idInstance: from admin panel
apiToken: from admin panel

Connecting Account

GET Instance Status

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getStateInstance/YOUR_API_TOKEN

GET QR Code

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/qr/YOUR_API_TOKEN

GET QR HTML

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/qr/YOUR_API_TOKEN?html=1

POST Pair with Code

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getAuthorizationCode/YOUR_API_TOKEN

Content-Type: application/json

{"phoneNumber":"923001234567"}

GET Logout

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/logout/YOUR_API_TOKEN

GET Reboot

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/reboot/YOUR_API_TOKEN

POST Socket Config / Full History

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/setSocketConfig/YOUR_API_TOKEN

Content-Type: application/json

{"syncFullHistory":true,"markOnlineOnConnect":false,"autoStart":true}

Events & Store

GET Contacts

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getContacts/YOUR_API_TOKEN

GET Groups

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getContacts/YOUR_API_TOKEN?group=true

GET Last Messages

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/lastMessages/YOUR_API_TOKEN

GET Events Summary

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/events/YOUR_API_TOKEN

POST Set Webhook

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/setWebhook/YOUR_API_TOKEN

Content-Type: application/json

{"webhookUrl":"https://example.com/webhook.php"}

Sending Messages

POST Send Message

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","message":"Hello"}

POST Quote Message

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"120xxx@g.us","message":"Done","quotedMessageId":"MESSAGE_ID"}

POST Mention User

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendMessageMention/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"120xxx@g.us","message":"Hi @923001234567","mentions":["923001234567@c.us"]}

POST Reply Mention

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendReplyMention/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"120xxx@g.us","message":"Done @923001234567","quotedMessageId":"MESSAGE_ID","mentions":["923001234567@c.us"]}

POST Forward Message

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/forwardMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","message":{}}

POST Location

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendLocation/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","latitude":31.5204,"longitude":74.3587,"name":"Lahore"}

POST Contact

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendContact/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","fullName":"Support","phoneNumber":"923001234567"}

POST Reaction

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendReaction/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","emoji":"✅"}

POST Pin Message

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/pinMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"120xxx@g.us","messageId":"MESSAGE_ID","type":1,"time":86400}

POST Poll

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendPoll/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","name":"Choose","options":["A","B"],"selectableCount":1}

POST Link Preview

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendLinkPreview/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","message":"https://example.com"}

Media Messages

POST Send File by URL

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendFileByUrl/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","urlFile":"https://example.com/file.pdf","fileName":"file.pdf","caption":"Optional"}

POST Send File by Base64

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendFileByBase64/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","fileName":"image.jpg","base64File":"BASE64","mimetype":"image/jpeg"}

POST Send Image/Video/Audio/Document URL

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendImage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","urlFile":"https://example.com/image.jpg","fileName":"image.jpg"}

POST Send View Once

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendViewOnce/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","urlFile":"https://example.com/image.jpg","fileName":"image.jpg"}

POST Download Media Message

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/downloadMediaMessage/YOUR_API_TOKEN

Content-Type: application/json

{"type":"base64","message":{}}

Modify Messages & Chat States

POST Edit Message

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/editMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","message":"New text","fromMe":true}

POST Delete Message for Everyone

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/deleteMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","fromMe":true}

POST Delete Message for Me

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/deleteMessageForMe/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","fromMe":false}

POST Reject Call

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/rejectCall/YOUR_API_TOKEN

Content-Type: application/json

{"callId":"CALL_ID","from":"923001234567@c.us"}

POST Read Messages

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/readMessages/YOUR_API_TOKEN

Content-Type: application/json

{"keys":[{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","fromMe":false}]}

POST Send Presence

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendPresence/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","presence":"composing"}

Modify Chats

POST Archive Chat

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/archiveChat/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","archive":true}

POST Mute Chat

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/muteChat/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","muteSeconds":86400}

POST Mark Read/Unread

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/markChatRead/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","read":true}

POST Delete Chat

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/deleteChat/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us"}

POST Star/Unstar

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/starMessage/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","messageId":"MESSAGE_ID","star":true}

POST Disappearing Messages

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/disappearingMessages/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","seconds":86400}

User Querys

POST Check ID Exists

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/checkWhatsApp/YOUR_API_TOKEN

Content-Type: application/json

{"phoneNumber":"923001234567"}

POST Query Chat History

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/queryChatHistory/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","count":25}

POST Fetch Status

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/fetchStatus/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us"}

POST Fetch Profile Picture

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/fetchProfilePicture/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","type":"image"}

POST Fetch Business Profile

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/fetchBusinessProfile/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us"}

POST Fetch Presence

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/fetchPresence/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us"}

Change Profile

POST Change Profile Status

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/changeProfileStatus/YOUR_API_TOKEN

Content-Type: application/json

{"status":"Available"}

POST Change Profile Name

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/changeProfileName/YOUR_API_TOKEN

Content-Type: application/json

{"name":"My Business"}

POST Change Display Picture

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/changeDisplayPicture/YOUR_API_TOKEN

Content-Type: application/json

{"urlFile":"https://example.com/pic.jpg"}

POST Remove Display Picture

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/removeDisplayPicture/YOUR_API_TOKEN

Content-Type: application/json

{}

Groups

POST Create Group

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/createGroup/YOUR_API_TOKEN

Content-Type: application/json

{"subject":"Test Group","participants":["923001234567@c.us"]}

POST Add/Remove/Promote/Demote

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/groupParticipants/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","participants":["923001234567@c.us"],"action":"add"}

POST Change Subject

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/groupSubject/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","subject":"New Name"}

POST Change Description

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/groupDescription/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","description":"New Description"}

POST Change Settings

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/groupSettings/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","setting":"announcement"}

POST Leave Group

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/leaveGroup/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us"}

POST Get Invite Code

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getGroupInviteCode/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us"}

POST Revoke Invite Code

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/revokeGroupInviteCode/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us"}

POST Join Invite

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/joinGroupInvite/YOUR_API_TOKEN

Content-Type: application/json

{"code":"INVITE_CODE"}

POST Group Info By Invite

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getGroupInfoByInviteCode/YOUR_API_TOKEN

Content-Type: application/json

{"code":"INVITE_CODE"}

POST Group Metadata

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/groupMetadata/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us"}

GET All Participating Groups

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getAllGroups/YOUR_API_TOKEN

POST Request Join List

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getRequestJoinList/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us"}

POST Approve/Reject Join

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/approveRejectJoinRequest/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","participants":["923001234567@c.us"],"action":"approve"}

POST Toggle Ephemeral

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/toggleEphemeral/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","seconds":86400}

POST Change Add Mode

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/changeAddMode/YOUR_API_TOKEN

Content-Type: application/json

{"groupId":"120xxx@g.us","mode":"all_member_add"}

Privacy

POST Block/Unblock

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/blockUser/YOUR_API_TOKEN

Content-Type: application/json

{"chatId":"923001234567@c.us","action":"block"}

GET Privacy Settings

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getPrivacySettings/YOUR_API_TOKEN

GET Block List

GET

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/getBlockList/YOUR_API_TOKEN

POST Update Privacy

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/updatePrivacy/YOUR_API_TOKEN

Content-Type: application/json

{"type":"lastSeen","value":"contacts"}

Broadcast Lists & Stories

POST Send Status Broadcast

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/sendStatusBroadcast/YOUR_API_TOKEN

Content-Type: application/json

{"message":"Hello story","recipients":["923001234567@c.us"]}

POST Query Broadcast List

POST

https://baileys.rentalaibot.com/waInstanceYOUR_ID_INSTANCE/queryBroadcastList/YOUR_API_TOKEN

Content-Type: application/json

{"broadcastId":"12345@broadcast"}

Important Notes

Some advanced WhatsApp features depend on current Baileys/WhatsApp support. If a method is unavailable in your installed Baileys version, API returns method_not_supported instead of crashing.

Normal JID: 923001234567@c.us. Group JID: 120xxx@g.us. LID messages may show as @lid and may not expose phone number.