LetsBot Menu
العربية Get Started

LetsBot API reference

Send WhatsApp messages, templates and media, manage conversations and contacts, and read your message history by date — over plain HTTPS and JSON.

Base URL

https://letsbot.net/api/v1

Authentication

Send Authorization: Bearer <lb_api_key>. The account owner finds the key in the LetsBot panel under API → Authentication data. Requires an active subscription with the API Access add-on, or an active trial.

Errors

JSON with Status: false and a Message. 401 means a missing or wrong key; 402 means the subscription or API add-on is not active. Validation failures are not uniform: some send endpoints answer HTTP 202 with "Status": 0 (for example message/send without a body), and the Live Chat endpoints answer 422 with "message": "error". Read Status in the body, not only the HTTP code. Each endpoint lists its own responses.

Rate limit

1,000 requests per minute per API key.

Download Postman collection

Messages

In this folder, you can send different types of message in Whatsapp with different options.

POST /api/v1/send/file

Media › send file message

You can send file message to phone number. You just send the URL of the message you want to send. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see documentMessage that contain file info (URL, mimetype of the file, file length, etc.) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
urlhttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf

Example request

curl -X POST "https://letsbot.net/api/v1/send/file" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "url=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/image

Media › send Image message

You can send Image message to phone number. You just send the URL of the message you want to send. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see imageMessage that contain image info (URL, mimetype of the image, caption of the message and more info) , messageTimesamp format and status of the message

Form fields

FieldExample
phone{{phone}}
urlhttps://letsbot.net/resources/Gallery/221595264200_servers.png
captiontest send image

Example request

curl -X POST "https://letsbot.net/api/v1/send/image" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "url=https://letsbot.net/resources/Gallery/221595264200_servers.png" \
  -F "caption=test send image"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/video

Media › send video message

You can send Video message to phone number. You just send the URL of the message you want to send. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see videoMessage that contain video info (URL, mimetype of the video, caption of the message and more info) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
urlhttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4
captiontest send video caption

Example request

curl -X POST "https://letsbot.net/api/v1/send/video" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "url=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4" \
  -F "caption=test send video caption"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/gif

Media › send gif message

You can send gif message to phone number. You just send the URL of the message you want to send. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see videoMessage that contain gif info (URL, mimetype of the video, caption of the message and more info) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
urlhttps://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif
captionThis is GIF

Example request

curl -X POST "https://letsbot.net/api/v1/send/gif" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "url=https://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif" \
  -F "caption=This is GIF"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/audio

Media › send audio message

You can send audio message to phone number. You just send the URL of the message you want to send. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see videoMessage that contain audio info (URL, mimetype of the file, file length, seconds, etc.) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
audiohttps://letsbot.net/public/swiftly.mp3

Example request

curl -X POST "https://letsbot.net/api/v1/send/audio" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "audio=https://letsbot.net/public/swiftly.mp3"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/location

Media › send location message

You can send location message to phone number. You just send the lat&lng of location you want to send. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see locationMessage that contain location info (degreesLatitude, degreesLongitude) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/7311c6d3-8ba0-4b2c-a9dd-43a74850de55/aW1hZ2UucG5n' alt='' height='181' width='332'>

Form fields

FieldExample
phone{{phone}}
lat30.0594885
lng31.2584644

Example request

curl -X POST "https://letsbot.net/api/v1/send/location" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "lat=30.0594885" \
  -F "lng=31.2584644"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/ptt

Media › send ptt (push to talk) message

You can send ppt audio message to phone number. You need to send the URL of the file. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see audioMessage that contain audio info (url, mimetype, ppt, mediaKeyTimestamp, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
urlhttps://letsbot.net/public/swiftly.mp3

Example request

curl -X POST "https://letsbot.net/api/v1/send/ptt" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "url=https://letsbot.net/public/swiftly.mp3"

Responses

Success Response200
(empty body)
POST /api/v1/send/contact

Media › send contact

You can send contact message to phone number. You just send the Contact phone number, the name of the contact and description (Optional). Id of the message in the key of the data of the response. In the Message of the data of the response , You can see contactMessage that contain Contact info (displyName, vcard) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/48feb9d7-ba29-4180-8a96-40c10a2225fa/aW1hZ2UucG5n' alt='' height='166' width='357'>

Form fields

FieldExample
phone{{phone}}
contact{{phone}}
nameContact Name
descriptionContact info

Example request

curl -X POST "https://letsbot.net/api/v1/send/contact" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "contact={{phone}}" \
  -F "name=Contact Name" \
  -F "description=Contact info"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/send/buttons

Media › send buttons (alias of /button)

Send a message with reply buttons. Same behaviour as POST /button.

Required: phone, body, title, footer, buttons (array of buttons, each with id and title).

Channels: official WhatsApp Cloud API and QR channels.

JSON body

{
  "phone": "{{phone}}",
  "title": "Order #1024",
  "body": "Do you want to confirm your order?",
  "footer": "LetsBot",
  "buttons": [
    {
      "id": "confirm",
      "title": "Confirm"
    },
    {
      "id": "cancel",
      "title": "Cancel"
    }
  ]
}

Example request

curl -X POST "https://letsbot.net/api/v1/send/buttons" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "{{phone}}",
  "title": "Order #1024",
  "body": "Do you want to confirm your order?",
  "footer": "LetsBot",
  "buttons": [
    {
      "id": "confirm",
      "title": "Confirm"
    },
    {
      "id": "cancel",
      "title": "Cancel"
    }
  ]
}'
POST /api/v1/message/send

Message › send text message

You can send message text to phone number. The Message Id is the id of key of data. remoteJid is the whatsapp phone account. text of extendedTextMessage is the body of the message that sent. messageTimestamp is the date of the message in timestamp format.

Form fields

FieldExample
phone{{phone}}
bodyالسلام عليكم

Example request

curl -X POST "https://letsbot.net/api/v1/message/send" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "body=السلام عليكم"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/message/send/sticker

Message › send sticker

You can send sticker message to phone number. You need to send the URL of the sticker. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see stickerMessage that contain Sticker info (url, mimetype, mediaKey, mediaKeyTimestamp, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
urlhttps://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp

Example request

curl -X POST "https://letsbot.net/api/v1/message/send/sticker" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "url=https://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/message/send/reaction

Message › send reaction

You can send sticker message to phone number. You need to send the URL of the sticker. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see reactionMessage that contain Reaction info (reaction id, remoteJid, senderTimestampMs) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
reaction❤️
messageIdBAE5F2C25476F607

Example request

curl -X POST "https://letsbot.net/api/v1/message/send/reaction" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "reaction=❤️" \
  -F "messageId=BAE5F2C25476F607"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/message/send/reply

Message › send reply

You can send reply on message to phone number. You need to send the body of the message and the message Id that you want to reply on it. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see extended TextMessage that contain Message reply info (text, contextInfo) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
bodyاهلا بك فى ليتس بوت تجربة ارسال رد
messageIdBAE5F2C25476F607

Example request

curl -X POST "https://letsbot.net/api/v1/message/send/reply" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "body=اهلا بك فى ليتس بوت تجربة ارسال رد" \
  -F "messageId=BAE5F2C25476F607"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/message/send/mention

Message › send mention

You can send mention on message to phone number or GroupId. You need to send mention phone number. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see extended TextMessage that contain Message mention info (mentionedJid, text) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
mention{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/message/send/mention" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "mention={{phone}}"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/message/send/disappearing

Message › send disappearing message

You can send disappearing message to phone number. You need to send body of the message and the duration of the message**(optional)** to hide after amount of time in seconds. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see extendedTextMessage in message of ephemeralMessage that contain Message info (text, expiration time in seconds) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/14312df8-9cd2-4694-85ec-d3ccbe502d32/aW1hZ2UucG5n' alt='' height='253' width='592'>

Form fields

FieldExample
phone{{phone}}
bodyThis is a disappearing message that will disappear after X duration
duration60

Example request

curl -X POST "https://letsbot.net/api/v1/message/send/disappearing" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "body=This is a disappearing message that will disappear after X duration" \
  -F "duration=60"

Responses

Success Reponse200
(empty body)
Failed Response202
(empty body)
POST /api/v1/share/catalog

Message › send share catalog message

You can share catalog message to phone number. You need to the catalog phone number to be share and you can add more additional details(optional) like title, body, and description. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see extendedTextMessage that contain Message info (text, description, title, image if exist) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/7c8a1cae-eea4-4763-9d19-c4349f846c61/aW1hZ2UucG5n' alt='' height='250' width='268'>

Form fields

FieldExample
phone{{phone}}
catalog{{phone}}
titleThis is title of catalog
bodyThis is body of catalog
descriptionThis is desc of catalog

Example request

curl -X POST "https://letsbot.net/api/v1/share/catalog" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "catalog={{phone}}" \
  -F "title=This is title of catalog" \
  -F "body=This is body of catalog" \
  -F "description=This is desc of catalog"

Responses

Success Response200
(empty body)
Failed Message202
(empty body)
GET /api/v1/message/id

Message › get message by Id

Get message content info with message id in phone chat number. In the data of the response , The body of the data response is the message content**. The chatName** is the phone number that receive this message. messageType is the type of the message that sent. remoteJid is the phone whatsapp account. Time is the time of the message in timestamp format. TimeFormatted is the time of the message in Format _ Dayname, Daynumber MonthName Year Hours:Min:Sec ZoneType_. There are different types of response depend on the message type. You can see Examples of the response in different types below the request.

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone}} phone number with country code
messageID Yes BAE5690364E55771 Message Id

Example request

curl -G "https://letsbot.net/api/v1/message/id" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone={{phone}}" \
  --data-urlencode "messageID=BAE5690364E55771"

Responses

Failed Response202
(empty body)
Success Response (Text)200
(empty body)
Image Message Response200
(empty body)
Video Message Response200
(empty body)
File Message Response200
(empty body)
GIF Message Response200
(empty body)
Audio Message Response200
(empty body)
Button Text Message Response200
(empty body)
GET /api/v1/message/fetch

Message › Fetch messages

Get Group Meta info of the group. ID, Subject, Subject Owner, Subject Time, Size, Creation Time, Owner Phone, Description, Description Id, Restrict, Announce And Participants Phones

Example request

curl -G "https://letsbot.net/api/v1/message/fetch" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

Fetch Messages200
(empty body)
DELETE /api/v1/message/delete

Message › delete message by Id

You can delete message for phone number. You need to send the message id. Id of the message in the key of the data of the response. In the data of the response you can see many options of the message (id, body, messageType, fileName if exist, author, chatName, time in timestamp format, status, etc).

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone}}
messageID Yes BAE509D204172AC0

Form fields

FieldExample
phone{{phone}}
messageIDBAE509D204172AC0

Example request

curl -X DELETE "https://letsbot.net/api/v1/message/delete?phone={{phone}}&messageID=BAE509D204172AC0" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "messageID=BAE509D204172AC0"

Responses

Delete Message by Id200
(empty body)
POST /api/v1/message/send/forward/message

Message › forward message

Forward a stored message to another phone number.

Required: phone (recipient), messageId (the WhatsApp message id of a message stored in your inbox).

Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.

Form fields

FieldExample
phone{{phone}}
messageId3EB0C4F1A2B3D4E5F6

Example request

curl -X POST "https://letsbot.net/api/v1/message/send/forward/message" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "messageId=3EB0C4F1A2B3D4E5F6"
POST /api/v1/button

Buttons › send buttons message

You can send buttons message to phone number. You need to send the tilte(optional), body, footer(optional), caption(optional) and buttons of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see buttonsMessage that contain buttons info (contentText, footerText, buttons, etc) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/2102cae4-08ae-4d22-a90a-c7b281eb68b2/aW1hZ2UucG5n' alt='' height='194 width='362'>

Form fields

FieldExample
phone{{phone}}
titletest title
bodyContent Of the Message
footerFooter of the button
buttons[0][id]1
buttons[0][title]button type 1
buttons[0][type]1
buttons[0][extra_data]https://example.net
captiontest caption

Example request

curl -X POST "https://letsbot.net/api/v1/button" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "title=test title" \
  -F "body=Content Of the Message" \
  -F "footer=Footer of the button" \
  -F "buttons[0][id]=1" \
  -F "buttons[0][title]=button type 1" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net" \
  -F "caption=test caption"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/button/image

Buttons › send button with image message

You can send buttons with image message to phone number. You need to send the  caption, footer(optional), images(array) and buttons(array) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see buttonsMessage that contain buttons info (imageMessage info, contenText, footerText, buttons, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
captionImage caption
footertest footer
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://final.letsbot.net/login
imagehttps://letsbot.net/resources/Gallery/221595264200_servers.png

Example request

curl -X POST "https://letsbot.net/api/v1/button/image" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "caption=Image caption" \
  -F "footer=test  footer" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://final.letsbot.net/login" \
  -F "image=https://letsbot.net/resources/Gallery/221595264200_servers.png"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/button/video

Buttons › send buttons with video message

You can send buttons with video message to phone number. You need to send the caption, footer(optional), video(array) and buttons(array) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see buttonsMessage that contain buttons info (videoMessage info, contenText, footerText, buttons, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
captionvideo caption
footertest footer
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.net/login
videohttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4'

Example request

curl -X POST "https://letsbot.net/api/v1/button/video" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "caption=video caption" \
  -F "footer=test  footer" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net/login" \
  -F "video=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4'"

Responses

Success Response200
(empty body)
Failed Message202
(empty body)
POST /api/v1/button/location

Buttons › send buttons with location message

You can send buttons with location message to phone number. You need to send the caption, footer(optional), lat, lng and buttons(array) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see buttonsMessage that contain buttons info (locationMessage info, contenText, footerText, buttons, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
captionlocation scaption
footertest footer
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.net/login
lat21
lng23

Example request

curl -X POST "https://letsbot.net/api/v1/button/location" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "caption=location scaption" \
  -F "footer=test  footer" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net/login" \
  -F "lat=21" \
  -F "lng=23"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/button/document

Buttons › send buttons with document message

You can send message templates via whatsapp with this api

Form fields

FieldExample
phone{{phone}}
captionThis is Document
footertest footer
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.net/login
documenthttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf

Example request

curl -X POST "https://letsbot.net/api/v1/button/document" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "caption=This is Document" \
  -F "footer=test  footer" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net/login" \
  -F "document=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/carousel

Buttons › send carousel (Messenger / Instagram)

Send a card carousel to a Facebook Messenger or Instagram conversation.

Required: recipient (the Messenger PSID or Instagram IGSID), cards (1–10 cards, each with a title).

Optional: platform (messenger default, or instagram); per card subtitle, image_url, url and up to 3 buttons.

Channels: Messenger and Instagram channels only; not WhatsApp.

JSON body

{
  "recipient": "1234567890123456",
  "platform": "messenger",
  "cards": [
    {
      "title": "Epoxy kit 5 kg",
      "subtitle": "Clear, UV resistant",
      "image_url": "https://example.com/kit-5.jpg",
      "url": "https://example.com/kit-5"
    },
    {
      "title": "Epoxy kit 20 kg",
      "subtitle": "Best value",
      "image_url": "https://example.com/kit-20.jpg",
      "url": "https://example.com/kit-20"
    }
  ]
}

Example request

curl -X POST "https://letsbot.net/api/v1/carousel" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "recipient": "1234567890123456",
  "platform": "messenger",
  "cards": [
    {
      "title": "Epoxy kit 5 kg",
      "subtitle": "Clear, UV resistant",
      "image_url": "https://example.com/kit-5.jpg",
      "url": "https://example.com/kit-5"
    },
    {
      "title": "Epoxy kit 20 kg",
      "subtitle": "Best value",
      "image_url": "https://example.com/kit-20.jpg",
      "url": "https://example.com/kit-20"
    }
  ]
}'
POST /api/v1/button/template

Buttons Templates › send buttons template message

You can send buttons Template message to phone number. You need to send the title(optional), footer(optional), body and buttons(array , exp format in body) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see templateMessage that contain buttons info (hydratedButtons, displayText, url index, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
titlehello title
bodyhello body
footertest footer
buttons[0][id]4
buttons[0][title]:star:Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.com

Example request

curl -X POST "https://letsbot.net/api/v1/button/template" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "title=hello title" \
  -F "body=hello body" \
  -F "footer=test footer" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=:star:Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.com"

Responses

Success Response200
(empty body)
POST /api/v1/button/image/template

Buttons Templates › send buttons template with image message

You can send buttons Template with image message to phone number. You need to send the title(optional), footer(optional), body and buttons(array , exp format in body) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see templateMessage that contain buttons info (hydratedButtons, displayText, url index, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
titleThis is title
bodyاهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية
footerلا تفوت العرض
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://final.letsbot.net/login
imagehttps://letsbot.net/resources/Gallery/221595264200_servers.png

Example request

curl -X POST "https://letsbot.net/api/v1/button/image/template" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "title=This is title" \
  -F "body=اهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية" \
  -F "footer=لا تفوت العرض" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://final.letsbot.net/login" \
  -F "image=https://letsbot.net/resources/Gallery/221595264200_servers.png"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/button/document/template

Buttons Templates › send buttons template with document message

You can send buttons Template with document message to phone number. You need to send the title(optional), footer(optional), body and buttons(array , exp format in body) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see templateMessage that contain buttons info (hydratedButtons, displayText, url index, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
titletitle
bodyاهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية
footerلا تفوت العرض
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.net/login
buttons[1][id]5
buttons[1][title]⭐Star LetsBot on GitHub!
buttons[1][type]1
buttons[1][extra_data]https://example.net/login
documenthttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf

Example request

curl -X POST "https://letsbot.net/api/v1/button/document/template" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "title=title" \
  -F "body=اهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية" \
  -F "footer=لا تفوت العرض" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net/login" \
  -F "buttons[1][id]=5" \
  -F "buttons[1][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[1][type]=1" \
  -F "buttons[1][extra_data]=https://example.net/login" \
  -F "document=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/button/video/template

Buttons Templates › send buttons template with video messag

You can send buttons Template with video message to phone number. You need to send the title(optional), footer(optional), body and buttons(array , exp format in body) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see templateMessage that contain buttons info (hydratedButtons, displayText, url index, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
titletitle
bodyاهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية
footerلا تفوت العرض
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.net/login
videohttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4

Example request

curl -X POST "https://letsbot.net/api/v1/button/video/template" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "title=title" \
  -F "body=اهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية" \
  -F "footer=لا تفوت العرض" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net/login" \
  -F "video=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/button/location/template

Buttons Templates › send buttons template with location messag

You can send buttons Template with location message to phone number. You need to send the title(optional), footer(optional), body and buttons(array , exp format in body) of the message. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see templateMessage that contain buttons info (hydratedButtons, displayText, url index, etc) , messageTimesamp format and status of the message.

Form fields

FieldExample
phone{{phone}}
titletitle
bodyاهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية
footerلا تفوت العرض
buttons[0][id]4
buttons[0][title]⭐Star LetsBot on GitHub!
buttons[0][type]1
buttons[0][extra_data]https://example.net/login
lat23
lng21

Example request

curl -X POST "https://letsbot.net/api/v1/button/location/template" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "title=title" \
  -F "body=اهلا بك فى ليتس بوت تجربة ارسال ازرار تفاعلية" \
  -F "footer=لا تفوت العرض" \
  -F "buttons[0][id]=4" \
  -F "buttons[0][title]=⭐Star LetsBot on GitHub!" \
  -F "buttons[0][type]=1" \
  -F "buttons[0][extra_data]=https://example.net/login" \
  -F "lat=23" \
  -F "lng=21"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/list/message

Send List Message › send list message

You can send list message select to phone number. You need to send the body, footer, title(optional), buttonText and sections(array) of the message. Every section array has two index which is title and rows , for every rows has title, rowid and description(optional).You can see the result of the sections in image below. Id of the message in the key of the data of the response. In the Message of the data of the response , You can see listMessage that contain list message info (title, description, buttonText, listType, sections, etc) , messageTimesamp format and status of the message. <img src='https://content.pstmn.io/cd6efe52-5a20-48e2-ae2d-e9b235b089f6/aW1hZ2UucG5n' alt='' height='484' width='436'>

Form fields

FieldExample
phone{{phone}}
bodyBody of message
titleTilte of message
footerFooter of message
buttonTextRequired, text on the button to view the list
sections[0][title]Section 1 Text
sections[0][rows][0][title]Option 1
sections[0][rows][0][rowId]Option1
sections[0][rows][0][description]This is description
sections[0][rows][1][title]Option 2
sections[0][rows][1][rowId]Option2

Example request

curl -X POST "https://letsbot.net/api/v1/list/message" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "body=Body of message" \
  -F "title=Tilte of message" \
  -F "footer=Footer of message" \
  -F "buttonText=Required, text on the button to view the list" \
  -F "sections[0][title]=Section 1 Text" \
  -F "sections[0][rows][0][title]=Option 1" \
  -F "sections[0][rows][0][rowId]=Option1" \
  -F "sections[0][rows][0][description]=This is description" \
  -F "sections[0][rows][1][title]=Option 2" \
  -F "sections[0][rows][1][rowId]=Option2"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)

group

POST /api/v1/invite/code

Invite to group › generate Invite code

Get invite code by group id. Data of the response is the invitation code.

Form fields

FieldExample
jid120363057244685240@g.us

Example request

curl -X POST "https://letsbot.net/api/v1/invite/code" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us"

Responses

Success Response200
(empty body)
POST /api/v1/invite/revoke/code

Invite to group › revoke Invite code

Revoke Group invite code by group Id. Data of the response is the New invite code.

Form fields

FieldExample
jid120363057244685240@g.us

Example request

curl -X POST "https://letsbot.net/api/v1/invite/revoke/code" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us"

Responses

Success Response200
(empty body)
POST /api/v1/invite/send/link

Invite to group › send invite link

Send invite group link to phone number. The data response is the link for invitation

Form fields

FieldExample
to{{phone}}
jid120363057244685240@g.us

Example request

curl -X POST "https://letsbot.net/api/v1/invite/send/link" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "to={{phone}}" \
  -F "jid=120363057244685240@g.us"

Responses

Success Response200
(empty body)
GET /api/v1/invite/get/info

Invite to group › proup get Invite Info

Get Group info by valid invite Code. Data of the response is the group id.

Query parameters

ParameterRequiredExampleDescription
code Yes KXDixa04zE73bgj5LIWhJ7

Example request

curl -G "https://letsbot.net/api/v1/invite/get/info" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "code=KXDixa04zE73bgj5LIWhJ7"

Responses

Success Response200
(empty body)
Failed Response (Invaild Code)200
(empty body)
POST /api/v1/group/demote/participant

Group Participant › demote group participant

You can demote list of phone numbers in the group. The Jid of the response is the Whatsapp account of the participant you demoted.

Form fields

FieldExample
jid120363057244685240@g.us
phones[0]{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/group/demote/participant" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "phones[0]={{phone}}"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/group/add/participant

Group Participant › add group participant

You can add participants to the group by passing the group id (response of create group) and list of phone numbers**(array)** to add. The Jid of the response is the Whatsapp account of the participant you added.

Form fields

FieldExample
jid120363057244685240@g.us
phones[0]{{phone2}}

Example request

curl -X POST "https://letsbot.net/api/v1/group/add/participant" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "phones[0]={{phone2}}"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/group/remove/participant

Group Participant › remove group participant

You can remove list of phone numbers in the group. The Jid of the response is the Whatsapp account of the participant you removed.

Form fields

FieldExample
jid120363057244685240@g.us
phones[0]{{phone2}}

Example request

curl -X POST "https://letsbot.net/api/v1/group/remove/participant" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "phones[0]={{phone2}}"

Responses

Failed Response202
(empty body)
Success Respoonse200
(empty body)
POST /api/v1/group/promote/participant

Group Participant › promote group participant

You can promote list of phone numbers in the group. The Jid of the response is the Whatsapp account of the participant you promoted.

Form fields

FieldExample
jid120363057244685240@g.us
phones[0]{{phone2}}

Example request

curl -X POST "https://letsbot.net/api/v1/group/promote/participant" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "phones[0]={{phone2}}"

Responses

Success Respose200
(empty body)
Failed Response202
(empty body)
GET /api/v1/group/display/picture

group settings › get display picture

get group image by jid parameter value must be group id

Query parameters

ParameterRequiredExampleDescription
jid Yes 120363061829425867@g.us

Example request

curl -G "https://letsbot.net/api/v1/group/display/picture" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "jid=120363061829425867@g.us"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/group/set/display/picture

group settings › set display picture

put this jid key, it will modify the image of the group

Form fields

FieldExample
imagehttps://letsbot.net/resources/Gallery/221595264200_servers.png
jid120363061829425867@g.us

Example request

curl -X POST "https://letsbot.net/api/v1/group/set/display/picture" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "image=https://letsbot.net/resources/Gallery/221595264200_servers.png" \
  -F "jid=120363061829425867@g.us"

Responses

Failed Response202
(empty body)
success response200
(empty body)
POST /api/v1/group/rename

group settings › rename group

You can rename group chat by passing the group id and the new subject of the group.

Form fields

FieldExample
jid120363057244685240@g.us
subjectTest Group 2

Example request

curl -X POST "https://letsbot.net/api/v1/group/rename" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "subject=Test Group 2"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/group/set/description

group settings › set group description

You can set group description by passing group id and description.

Form fields

FieldExample
jid120363057244685240@g.us
descriptionThis is test group

Example request

curl -X POST "https://letsbot.net/api/v1/group/set/description" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "description=This is test group"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/group/settings

group settings › change group settings

You can change group settings by passing group id and the settings option. There are exactly 4 options in the settings. - unlocked (This group settings to allow all participants to edit their information). - announcement (This group settings to allow only admins to send messages to this group.) - not_announcement (This group settings to allow all participants to send messages to this group). - locked(This group settings are for admins only to edit its information).

Form fields

FieldExample
jid120363057244685240@g.us
settingsnot_announcement

Example request

curl -X POST "https://letsbot.net/api/v1/group/settings" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "jid=120363057244685240@g.us" \
  -F "settings=not_announcement"

Responses

Success Response200
(empty body)
Invaild Settings202
(empty body)
Failed Response202
(empty body)
GET /api/v1/group/list

get group list

Get groups list of your phone number. Data of the response contain : - participants array of numbers. - id of the group. - name of the group. - conversationTimestamp. - etc....

Example request

curl -G "https://letsbot.net/api/v1/group/list" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

Success Response200
(empty body)
GET /api/v1/group/conversation

get group conversation

Get group conversation of your phone number by passing jid of the phone number. The data of the response contain : - Id of the mesage. - body. - caption. - messageType(text, file, image, etc). - author. - chatName (Phone number). - time in timestamp. - status of the message. - payload.imageMessage.url (if message is image). - body.content. - etc

Query parameters

ParameterRequiredExampleDescription
jid Yes {{jid1}}

Example request

curl -G "https://letsbot.net/api/v1/group/conversation" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "jid={{jid1}}"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
GET /api/v1/group/meta/data

get group metadata

Get Group Meta info of the group. - ID : of the group. - Subject : name of the group. - Subject Owner : owner Whatsapp account. - Subject Time : timestamp of the subject updated. - Size : number of the participants. - Creation : timestamp of the group creation. - Owner Phone : owner account number. - Description : description of the group. - Description Id : id of the description. - Restrict and announce. - Participants info ( id, admin) if not admin the value is null.

Query parameters

ParameterRequiredExampleDescription
jid Yes {{jid}}

Example request

curl -G "https://letsbot.net/api/v1/group/meta/data" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "jid={{jid}}"

Responses

Success Response200
(empty body)
POST /api/v1/group/create

create group

You can create group in Whatsapp by passing subject of the group and phone numbers (array). The id of the data of the response is the id of the group.

Form fields

FieldExample
phones[0]{{phone}}
phones[1]{{phone}}
subjectTest Group

Example request

curl -X POST "https://letsbot.net/api/v1/group/create" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phones[0]={{phone}}" \
  -F "phones[1]={{phone}}" \
  -F "subject=Test Group"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/group/join

join group

Join Group by valid invite Code. Data of the response is the group id.

Form fields

FieldExample
code{{code}}

Example request

curl -X POST "https://letsbot.net/api/v1/group/join" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "code={{code}}"

Responses

Success Response200
(empty body)
Failed Response200
(empty body)

Chat

GET /api/v1/chat/list

get chat list for phone

Get the chat list for your phone number. Each chat in the response contains:

  • id — the WhatsApp account the chat is with.
  • lastMessageRecvTimestamp — timestamp of the last message received.
  • messages.0.message.message.conversation — content of the last message.
  • messages.0.message.reactions — reactions received on that message.
  • messages.0.message.key.id — the message ID.
  • messages.0.message.key.remoteJid — the WhatsApp account of the message.

Example request

curl -G "https://letsbot.net/api/v1/chat/list" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

Success Response200
(empty body)
GET /api/v1/chat/conversation

get chat conversation for phone

Get the conversation with one phone number from the WhatsApp session, newest first. Page with limit, then pass the last message's id as cursorId and its direction as cursorFromMe.

Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.

To read stored messages by date on any channel, use Message Archive → Get messages by date.

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone2}}
limit Yes 25
cursorId Yes REDACTED
cursorFromMe Yes true

Example request

curl -G "https://letsbot.net/api/v1/chat/conversation" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone={{phone2}}" \
  --data-urlencode "limit=25" \
  --data-urlencode "cursorId=REDACTED" \
  --data-urlencode "cursorFromMe=true"

Responses

success response200
(empty body)
GET /api/v1/contacts

get contacts

You can get your contacts list. The data of the response contain: - Id is the Whatsapp account number. - name is the name of the contact. - image of the person if exist. - notify is the nick name.

Example request

curl -G "https://letsbot.net/api/v1/contacts" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

Success Response200
(empty body)
POST /api/v1/chat/typing

set typing

You can show you are typing to the phone number or chat by passing in the chat form-data.

Form fields

FieldExample
chat{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/typing" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "chat={{phone}}"

Responses

Success Respose200
(empty body)
POST /api/v1/chat/recording

set recording

You can set you are recording by passing phone number or group id.

Form fields

FieldExample
chat{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/recording" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "chat={{phone}}"

Responses

Success Response200
(empty body)
POST /api/v1/chat/read

read chat

You can read chat messages to phone number. <img src='https://content.pstmn.io/1ddafbdb-648d-4b7d-ade5-52fa7b15b499/aW1hZ2UucG5n' alt='Before' width='158' height='139'> <img src='https://content.pstmn.io/b42624d4-bde5-473a-bcbf-424e5923d8fe/aW1hZ2UucG5n' alt='After' width='154' height='147'>

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/read" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
POST /api/v1/chat/unread

unread chat

You can un read phone chat number.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/unread" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
POST /api/v1/chat/archive

archive chat

You can archive chat phone number.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/archive" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
POST /api/v1/chat/unarchive

unarchive chat

You can un archive chat phone number.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/unarchive" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
POST /api/v1/chat/mute

mute chat

You can mute chat phone number with duration time in seconds.

Form fields

FieldExample
phone{{phone}}
duration60

Example request

curl -X POST "https://letsbot.net/api/v1/chat/mute" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "duration=60"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/chat/unmute

unmute chat

You can un mute phone chat number.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/unmute" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

success response200
(empty body)
POST /api/v1/chat/pin

pin chat

You can pin phone chat number or group chat(passing group id).

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/pin" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
POST /api/v1/chat/unpin

unpin chat

You can un pin phone chat number or group chat(passing group id).

Form fields

FieldExample
phone{{phone}}
phone{{GROUP_TEST}}

Example request

curl -X POST "https://letsbot.net/api/v1/chat/unpin" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "phone={{GROUP_TEST}}"

Responses

Success Response200
(empty body)
POST /api/v1/check/phone

check phone on WhatsApp

Check whether a phone number has a WhatsApp account.

Required: phone (international format, digits).

Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/check/phone" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Users

POST /api/v1/user/presence

presence user

Get user presence status.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/user/presence" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
failed response202
(empty body)
GET /api/v1/user/display/picture

disply picture by user

Display user picture by phone number. Data of the response is the picture link.

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone}}

Form fields

FieldExample
phone{{phone}}

Example request

curl -G "https://letsbot.net/api/v1/user/display/picture" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone={{phone}}" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
failed response200
(empty body)
POST /api/v1/user/block

block number

Block phone number by passing the number in form-data.

Form fields

FieldExample
phone{{phone2}}

Example request

curl -X POST "https://letsbot.net/api/v1/user/block" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone2}}"

Responses

Success Response200
(empty body)
POST /api/v1/user/unblock

unblock number

un block phone number by passing the number in form-data.

Form fields

FieldExample
phone{{phone2}}

Example request

curl -X POST "https://letsbot.net/api/v1/user/unblock" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone2}}"

Responses

Success Response200
(empty body)
POST /api/v1/user/business

user business profile

You can get info of user business profile by passing phone number. The data of the response contain : - wid Whatsapp phone account. - description of the business. - website business. - category of the business. - business working hours if exist. - address of the business. - email of the business. - etc.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/user/business" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
failed response200
(empty body)
POST /api/v1/user/set/name

set profile name

You can set profile name of phone number.

Form fields

FieldExample
phone{{phone2}}
nameProfile Name

Example request

curl -X POST "https://letsbot.net/api/v1/user/set/name" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone2}}" \
  -F "name=Profile Name"

Responses

Failed Response202
(empty body)
Success Response200
(empty body)
POST /api/v1/user/status

get user status

Get the WhatsApp "about" text of a phone number.

Required: phone.

Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/user/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"
POST /api/v1/user/set/status

set my status

Set the WhatsApp "about" text of your connected number.

Required: status.

Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.

Form fields

FieldExample
statusAvailable 9:00–18:00

Example request

curl -X POST "https://letsbot.net/api/v1/user/set/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "status=Available 9:00–18:00"
POST /api/v1/user/set/display/picture

set my display picture

Set the profile picture of your connected number.

Required: phone, image (a public image URL).

Channels: QR (WhatsApp Web) channels only. On official WhatsApp Cloud API channels this request is not supported.

Form fields

FieldExample
phone{{phone}}
imagehttps://example.com/logo.jpg

Example request

curl -X POST "https://letsbot.net/api/v1/user/set/display/picture" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "image=https://example.com/logo.jpg"

Live Chat

Contacts, labels and team assignment in the LetsBot inbox. These read and write your LetsBot data and work on every channel type.

GET /api/v1/live_chat/contact

get contact

Get a contact with its labels and assigned team members. If the phone number is not a contact yet, it is created.

Required: phone.

Response: data = {id, phone, labels[], moderators[]}.

Validation errors return HTTP 422 {"message": "error", "data": "<first error>"}.

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone}} Contact phone number

Example request

curl -G "https://letsbot.net/api/v1/live_chat/contact" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone={{phone}}"
GET /api/v1/live_chat/moderators

list team members

List the team members who can be assigned to conversations.

Response: data[] = {id, name, email, phone, image}.

Example request

curl -G "https://letsbot.net/api/v1/live_chat/moderators" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
POST /api/v1/live_chat/set-moderator

assign team member to contact

Assign a team member to a contact. Existing assignments are kept.

Required: phone, moderator_id (an id from list team members).

Validation errors return HTTP 422 {"message": "error", "data": "<first error>"}.

Form fields

FieldExample
phone{{phone}}
moderator_id3

Example request

curl -X POST "https://letsbot.net/api/v1/live_chat/set-moderator" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "moderator_id=3"
GET /api/v1/live_chat/labels

list labels

List contact labels.

Response: data[] = {id, name, name_translations, color}.

Example request

curl -G "https://letsbot.net/api/v1/live_chat/labels" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
POST /api/v1/live_chat/set-label

add label to contact

Add a label to a contact. Existing labels are kept.

Required: phone, label_id (an id from list labels).

Validation errors return HTTP 422 {"message": "error", "data": "<first error>"}.

Form fields

FieldExample
phone{{phone}}
label_id5

Example request

curl -X POST "https://letsbot.net/api/v1/live_chat/set-label" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "label_id=5"

Instances

GET /api/v1/instance/status

status

You can set status of your phone number by passing status field.

Example request

curl -G "https://letsbot.net/api/v1/instance/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/instance/set/status

set status

You can set status of your phone number by passing status field.

Form fields

FieldExample
status343434

Example request

curl -X POST "https://letsbot.net/api/v1/instance/set/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "status=343434"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/instance/set/settings

set Settings

Set setting of the phone when mark online on connect to be true or false(1 or 0).

Form fields

FieldExample
markOnlineOnConnect1

Example request

curl -X POST "https://letsbot.net/api/v1/instance/set/settings" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "markOnlineOnConnect=1"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/instance/set/presence

set presence

if you want to set presence you may should to use mixed parameter to set by phone or group jid mixed=xxxxxxx@g.us OR mixed=966xxxxxxx

Form fields

FieldExample
presenceavailable
mixed{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/instance/set/presence" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "presence=available" \
  -F "mixed={{phone}}"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)
POST /api/v1/instance/query/broadcast

pending query broadcast

Set setting of the phone when mark online on connect to be true or false(1 or 0).

Form fields

FieldExample
broadcasttest

Example request

curl -X POST "https://letsbot.net/api/v1/instance/query/broadcast" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "broadcast=test"

Responses

Success Response200
(empty body)
Failed Response202
(empty body)

product

POST /api/v1/product

get products

Get products of phone number. products of the data from response is the details for all products. Details like: - id of the product. - iamgeUrls. - reviewStauts from whatsapp exp(APPROVED(. - avaiability. - name. - description. - price. - currency - isHidden(Boolean). - etc

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/product" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)
failed response200
(empty body)
GET /api/v1/product/id

get products by id

Get products of phone number. products of the data from response is the details for all products. Details like: - id of the product. - iamgeUrls. - reviewStauts from whatsapp exp(APPROVED(. - avaiability. - name. - description. - price. - currency - isHidden(Boolean). - etc

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone}} phone number with country code
productId Yes 6198355910228429

Example request

curl -G "https://letsbot.net/api/v1/product/id" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone={{phone}}" \
  --data-urlencode "productId=6198355910228429"

Responses

Success Response200
(empty body)
failed response200
(empty body)
POST /api/v1/product/create

create products

Get products of phone number. products of the data from response is the details for all products. Details like: - id of the product. - iamgeUrls. - reviewStauts from whatsapp exp(APPROVED(. - avaiability. - name. - description. - price. - currency - isHidden(Boolean). - etc

Form fields

FieldExample
phone{{phone}}
nameproduct name
descriptionproduct description
price1000
currencyEGP
isHidden0
images[0][url]https://letsbot.net/public/uploads/8fe87007-20f4-4730-96e9-f6a9bc806dbc/groupMessages/60/soca-company-112923571820220811041023AM.jpg

Example request

curl -X POST "https://letsbot.net/api/v1/product/create" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "name=product name" \
  -F "description=product description" \
  -F "price=1000" \
  -F "currency=EGP" \
  -F "isHidden=0" \
  -F "images[0][url]=https://letsbot.net/public/uploads/8fe87007-20f4-4730-96e9-f6a9bc806dbc/groupMessages/60/soca-company-112923571820220811041023AM.jpg"

Responses

Success Response200
(empty body)
failed response200
(empty body)
POST /api/v1/product/get/order

get order

Get products of phone number. products of the data from response is the details for all products. Details like: - id of the product. - iamgeUrls. - reviewStauts from whatsapp exp(APPROVED(. - avaiability. - name. - description. - price. - currency - isHidden(Boolean). - etc

Form fields

FieldExample
phone{{phone}}
orderID456
orderToken

Example request

curl -X POST "https://letsbot.net/api/v1/product/get/order" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}" \
  -F "orderID=456" \
  -F "orderToken="

Responses

Success Response200
(empty body)
failed response202
(empty body)
POST /api/v1/product/get/collections

get collections

Get products of phone number. products of the data from response is the details for all products. Details like: - id of the product. - iamgeUrls. - reviewStauts from whatsapp exp(APPROVED(. - avaiability. - name. - description. - price. - currency - isHidden(Boolean). - etc

Form fields

FieldExample
phone{{phone}}

Example request

curl -X POST "https://letsbot.net/api/v1/product/get/collections" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone}}"

Responses

Success Response200
(empty body)

QR

POST /api/v1/qr

qr

here you can query check your QRCode

Example request

curl -X POST "https://letsbot.net/api/v1/qr" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

success response200
(empty body)

Sessions

POST /api/v1/session/find

find session

in this query you can find your session

Example request

curl -X POST "https://letsbot.net/api/v1/session/find" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

success response200
(empty body)
failed response200
(empty body)
POST /api/v1/session/status

session status

use this link to check your session is authenticated

Example request

curl -X POST "https://letsbot.net/api/v1/session/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"

Responses

success response200
(empty body)
failed response200
(empty body)

Templates (Official API)

WhatsApp Template Messages API endpoints. These endpoints allow sending pre-approved WhatsApp template messages through the official Meta WhatsApp Business API.

Important Notes:

  • Templates must be pre-approved in WhatsApp Business Manager before sending
  • Only works with official WhatsApp Business API channels
  • Supports all template types: text, image, document, video, and location headers
POST /api/v1/template/send

Send Template Message (Full Featured)

Send any WhatsApp template message with full component support.

Supports:

  • Header: text, image, document, video, location
  • Body: text parameters (variables)
  • Buttons: URL buttons, Quick Reply buttons

Example for added_to_course template:

  • Header with confirmation title
  • Body with customer name and course name
  • URL buttons for iOS and Android app download

JSON body

{
  "phone": "{{phone}}",
  "template_name": "added_to_course",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "text",
      "parameters": [
        {"type": "text", "text": "تأكيد التسجيل"}
      ]
    },
    "body": [
      "أحمد",
      "دورة البرمجة المتقدمة"
    ],
    "buttons": [
      {
        "index": 0,
        "sub_type": "url",
        "parameters": [{"type": "text", "text": "app/course/123"}]
      },
      {
        "index": 1,
        "sub_type": "url",
        "parameters": [{"type": "text", "text": "store/app/456"}]
      }
    ]
  }
}

Example request

curl -X POST "https://letsbot.net/api/v1/template/send" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "{{phone}}",
  "template_name": "added_to_course",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "text",
      "parameters": [
        {"type": "text", "text": "تأكيد التسجيل"}
      ]
    },
    "body": [
      "أحمد",
      "دورة البرمجة المتقدمة"
    ],
    "buttons": [
      {
        "index": 0,
        "sub_type": "url",
        "parameters": [{"type": "text", "text": "app/course/123"}]
      },
      {
        "index": 1,
        "sub_type": "url",
        "parameters": [{"type": "text", "text": "store/app/456"}]
      }
    ]
  }
}'

Responses

Success Response200
{
  "success": true,
  "message": "The message has been successfully sent.",
  "data": {
    "key": {
      "remoteJid": "966500000000@s.whatsapp.net",
      "fromMe": true,
      "id": "wamid.HBgLMTIzNDU2Nzg5MBUTQ"
    },
    "messageTimestamp": 1706900000,
    "status": "PENDING"
  }
}
POST /api/v1/template/simple

Send Simple Template (Body Only)

Send a simple template message with only body parameters.

Ideal for templates that only contain text variables in the body section, such as order confirmations, appointment reminders, etc.

JSON body

{
  "phone": "{{phone}}",
  "template_name": "order_confirmation",
  "template_language": "ar",
  "components": {
    "body": [
      "أحمد",
      "ORD-12345",
      "150 ريال"
    ]
  }
}

Example request

curl -X POST "https://letsbot.net/api/v1/template/simple" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "{{phone}}",
  "template_name": "order_confirmation",
  "template_language": "ar",
  "components": {
    "body": [
      "أحمد",
      "ORD-12345",
      "150 ريال"
    ]
  }
}'
POST /api/v1/template/image

Send Template with Image Header

Send a template message with an image header.

Perfect for promotional templates, product announcements, or any template that includes a visual image at the top.

JSON body

{
  "phone": "{{phone}}",
  "template_name": "product_promotion",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "image",
      "image": {
        "link": "https://example.com/product-image.jpg"
      }
    },
    "body": [
      "خصم 50%",
      "المنتج الجديد"
    ]
  }
}

Example request

curl -X POST "https://letsbot.net/api/v1/template/image" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "{{phone}}",
  "template_name": "product_promotion",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "image",
      "image": {
        "link": "https://example.com/product-image.jpg"
      }
    },
    "body": [
      "خصم 50%",
      "المنتج الجديد"
    ]
  }
}'
POST /api/v1/template/document

Send Template with Document Header

Send a template message with a document/PDF header.

Ideal for sending invoices, contracts, receipts, or any template that includes a downloadable document.

JSON body

{
  "phone": "{{phone}}",
  "template_name": "invoice_template",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "document",
      "document": {
        "link": "https://example.com/invoice.pdf",
        "filename": "فاتورة_12345.pdf"
      }
    },
    "body": [
      "ORD-12345",
      "500 ريال"
    ]
  }
}

Example request

curl -X POST "https://letsbot.net/api/v1/template/document" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "{{phone}}",
  "template_name": "invoice_template",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "document",
      "document": {
        "link": "https://example.com/invoice.pdf",
        "filename": "فاتورة_12345.pdf"
      }
    },
    "body": [
      "ORD-12345",
      "500 ريال"
    ]
  }
}'
POST /api/v1/template/video

Send Template with Video Header

Send a template message with a video header.

Perfect for course previews, product demonstrations, or any template that includes a video at the top.

JSON body

{
  "phone": "{{phone}}",
  "template_name": "course_preview",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "video",
      "video": {
        "link": "https://example.com/course-preview.mp4"
      }
    },
    "body": [
      "دورة البرمجة",
      "30 يوم"
    ]
  }
}

Example request

curl -X POST "https://letsbot.net/api/v1/template/video" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "{{phone}}",
  "template_name": "course_preview",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "video",
      "video": {
        "link": "https://example.com/course-preview.mp4"
      }
    },
    "body": [
      "دورة البرمجة",
      "30 يوم"
    ]
  }
}'

Message Archive (read by date)

Read stored WhatsApp conversations by date, in both directions. Works for official (Cloud API) and QR channels. Outgoing replies can also be received in real time with a message_notification webhook (panel → API → Webhooks), which covers new messages only.

GET /api/v1/messages

Get messages by date

Read the message archive by date — incoming and outgoing, including replies your team types in Live Chat.

Authentication: Authorization: Bearer {{lb_api_key}} (the collection's bearer auth). The key is in the panel → API → Authentication data (visible to the account owner). Requires an active subscription with the API Access add-on (or an active trial). This is not the Zapier key (lbz_...).

Pagination: results are ordered oldest first by message_date, then id. When next_cursor is not null, repeat the same request adding cursor=<next_cursor> until it is null. Rows that share a timestamp are never skipped or repeated across pages.

Each message

  • from_metrue for messages you sent, false for messages from the customer.
  • sent_by — where an outgoing message came from (live_chat, bot, api, ...); null for incoming.
  • agent{id, name} of the team member who typed the message; null for automated and incoming messages. Use this, not sent_by, to identify human replies.
  • contact{id, phone, chat_id, name} of the customer, or null.
  • typetext, image, video, audio, file, template_text, ...
  • status / status_text — the last status we recorded for the message (Pending, Sent, Delivered, Viewed, FAILED). It is not proof of delivery on every channel.
  • message_date — ISO-8601 with offset, in the requested timezone.

Internal notes, reactions, system lines and deleted messages are not returned.

Response-time analytics: pair each incoming message with the next outgoing message for the same contact.phone whose agent is not null.

Errors: 422 with {"Status": false, "Message": "..."} for invalid parameters; 401 for a missing or wrong key; 402 when the subscription or API add-on is not active.

Example

curl -G "https://letsbot.net/api/v1/messages" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "date_from=2026-09-09" \
  --data-urlencode "date_to=2026-09-09" \
  --data-urlencode "from_me=1" \
  --data-urlencode "timezone=Europe/Kyiv"

Query parameters

ParameterRequiredExampleDescription
date_from Yes 2026-09-09 Required. Start of the range. `YYYY-MM-DD` covers the whole day; a full ISO-8601 datetime (e.g. `2026-09-09T08:00:00+03:00`) is an exact, inclusive bound.
date_to Yes 2026-09-09 Required. End of the range. `YYYY-MM-DD` covers the whole day (`date_from=date_to` is one full day); a full ISO-8601 datetime is an exact, inclusive bound. Must not be before `date_from`.
timezone Yes Europe/Kyiv Optional, default `UTC`. IANA timezone used to read bare dates and to format every `message_date` (always returned with its offset).
from_me Yes 1 Optional. `1`/`true` = outgoing only, `0`/`false` = incoming only. Omit for both directions.
sent_by No live_chat Optional. Only messages from this source: `live_chat`, `bot`, `api`, `mcp`, `send_bulk`, `zapier`, `salla`, `zid`, `woocommerce`, `shopify`, `hubspot`, `pipedrive`, `stripe`, `magento`, `agent`.
phone No {{phone}} Optional. Only messages with this customer (international format, digits; a leading `+` is accepted).
limit No 50 Optional. Page size, default 50, maximum 200.
cursor No Optional. Pass `next_cursor` from the previous response, unchanged, to get the next page. A `null` `next_cursor` means there are no more pages.

Example request

curl -G "https://letsbot.net/api/v1/messages" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "date_from=2026-09-09" \
  --data-urlencode "date_to=2026-09-09" \
  --data-urlencode "timezone=Europe/Kyiv" \
  --data-urlencode "from_me=1"

Responses

200 — outgoing Live Chat replies for one day (Kyiv time)200
{
    "Status": true,
    "timezone": "Europe/Kyiv",
    "data": [
        {
            "id": 4812,
            "message_id": "wamid.HBgMMzgwOTM1MDAwMDAxFQIAERgSN0Y0QjM2QjI5RjA1MDFEQjQ4AA==",
            "from_me": true,
            "sent_by": "live_chat",
            "agent": {
                "id": 3,
                "name": "Olena (Sales)"
            },
            "contact": {
                "id": 127,
                "phone": "380935000001",
                "chat_id": "380935000001@s.whatsapp.net",
                "name": "Customer name"
            },
            "group_id": null,
            "type": "text",
            "body": "Good afternoon! The 20 kg epoxy kit ships tomorrow.",
            "caption": null,
            "attachment": null,
            "status": 3,
            "status_text": "Viewed",
            "message_date": "2026-09-09T12:45:49+03:00"
        },
        {
            "id": 4815,
            "message_id": "wamid.HBgMMzgwOTM1MDAwMDAxFQIAERgSQzE5RDA4NjM0MzhFRkY3M0Q1AA==",
            "from_me": true,
            "sent_by": "live_chat",
            "agent": {
                "id": 3,
                "name": "Olena (Sales)"
            },
            "contact": {
                "id": 127,
                "phone": "380935000001",
                "chat_id": "380935000001@s.whatsapp.net",
                "name": "Customer name"
            },
            "group_id": null,
            "type": "image",
            "body": null,
            "caption": "Colour sample",
            "attachment": {
                "url": "https://example.com/media/sample.jpg",
                "mimetype": "image/jpeg"
            },
            "status": 2,
            "status_text": "Delivered",
            "message_date": "2026-09-09T13:14:51+03:00"
        }
    ],
    "next_cursor": "eyJkIjoiMjAyNi0wOS0wOSAxMzoxNDo1MSIsImkiOjQ4MTV9"
}
422 — date_to before date_from422
{
    "Status": false,
    "Message": "The date to must not be before the date from.",
    "errors": {}
}
422 — date_from missing422
{
    "Status": false,
    "Message": "The date from field is required.",
    "errors": {
        "date_from": [
            "The date from field is required."
        ]
    }
}
401 — wrong or missing lb_api_key401
{
    "Status": false,
    "Message": "lb_api_key Incorrect"
}
402 — API add-on not active402
{
    "Status": false,
    "Message": "API access is not included in your current subscription. Please upgrade your plan or add the API addon.",
    "error_code": "API_ADDON_REQUIRED"
}

Chat with us on WhatsApp