Messages
In this folder, you can send different types of message in Whatsapp with different options.
POST
/api/v1/send/file
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.
Formularfelter
Felt Eksempel
phone{{phone}}
urlhttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/file" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "url=https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf"
const response = await fetch("https://letsbot.net/api/v1/send/file", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/file');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'url' => 'https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/file",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/image
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
Formularfelter
Felt Eksempel
phone{{phone}}
urlhttps://letsbot.net/resources/Gallery/221595264200_servers.png
captiontest send image
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/image" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "url=https://letsbot.net/resources/Gallery/221595264200_servers.png" \
-F "caption=test send image"
const response = await fetch("https://letsbot.net/api/v1/send/image", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
"caption": "test send image",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/image');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'url' => 'https://letsbot.net/resources/Gallery/221595264200_servers.png',
'caption' => 'test send image',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/image",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
"caption": "test send image",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/video
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.
Formularfelter
Felt Eksempel
phone{{phone}}
urlhttps://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4
captiontest send video caption
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/video" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/send/video", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4",
"caption": "test send video caption",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/video');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'url' => 'https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4',
'caption' => 'test send video caption',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/video",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4",
"caption": "test send video caption",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/gif
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.
Formularfelter
Felt Eksempel
phone{{phone}}
urlhttps://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif
captionThis is GIF
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/gif" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "url=https://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif" \
-F "caption=This is GIF"
const response = await fetch("https://letsbot.net/api/v1/send/gif", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"url": "https://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif",
"caption": "This is GIF",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/gif');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'url' => 'https://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif',
'caption' => 'This is GIF',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/gif",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"url": "https://c.tenor.com/Iqv4_poJZOYAAAAj/kju-online.gif",
"caption": "This is GIF",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/audio
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.
Formularfelter
Felt Eksempel
phone{{phone}}
audiohttps://letsbot.net/public/swiftly.mp3
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/audio" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "audio=https://letsbot.net/public/swiftly.mp3"
const response = await fetch("https://letsbot.net/api/v1/send/audio", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"audio": "https://letsbot.net/public/swiftly.mp3",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/audio');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'audio' => 'https://letsbot.net/public/swiftly.mp3',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/audio",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"audio": "https://letsbot.net/public/swiftly.mp3",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/location
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'>
Formularfelter
Felt Eksempel
phone{{phone}}
lat30.0594885
lng31.2584644
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/location" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "lat=30.0594885" \
-F "lng=31.2584644"
const response = await fetch("https://letsbot.net/api/v1/send/location", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"lat": "30.0594885",
"lng": "31.2584644",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/location');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'lat' => '30.0594885',
'lng' => '31.2584644',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/location",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"lat": "30.0594885",
"lng": "31.2584644",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/ptt
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.
Formularfelter
Felt Eksempel
phone{{phone}}
urlhttps://letsbot.net/public/swiftly.mp3
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/ptt" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "url=https://letsbot.net/public/swiftly.mp3"
const response = await fetch("https://letsbot.net/api/v1/send/ptt", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/public/swiftly.mp3",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/ptt');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'url' => 'https://letsbot.net/public/swiftly.mp3',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/ptt",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"url": "https://letsbot.net/public/swiftly.mp3",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
POST
/api/v1/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'>
Formularfelter
Felt Eksempel
phone{{phone}}
contact{{phone}}
nameContact Name
descriptionContact info
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/send/contact" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "contact=9665xxxxxxxx" \
-F "name=Contact Name" \
-F "description=Contact info"
const response = await fetch("https://letsbot.net/api/v1/send/contact", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"contact": "9665xxxxxxxx",
"name": "Contact Name",
"description": "Contact info",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/contact');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'contact' => '9665xxxxxxxx',
'name' => 'Contact Name',
'description' => 'Contact info',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/contact",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"contact": "9665xxxxxxxx",
"name": "Contact Name",
"description": "Contact info",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/send/buttons
Ny
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-indhold
{
"phone": "{{phone}}",
"title": "Order #1024",
"body": "Do you want to confirm your order?",
"footer": "LetsBot",
"buttons": [
{
"id": "confirm",
"title": "Confirm"
},
{
"id": "cancel",
"title": "Cancel"
}
]
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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": "9665xxxxxxxx",
"title": "Order #1024",
"body": "Do you want to confirm your order?",
"footer": "LetsBot",
"buttons": [
{
"id": "confirm",
"title": "Confirm"
},
{
"id": "cancel",
"title": "Cancel"
}
]
}'
const response = await fetch("https://letsbot.net/api/v1/send/buttons", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"phone": "9665xxxxxxxx",
"title": "Order #1024",
"body": "Do you want to confirm your order?",
"footer": "LetsBot",
"buttons": [
{
"id": "confirm",
"title": "Confirm"
},
{
"id": "cancel",
"title": "Cancel"
}
]
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/send/buttons');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"phone": "9665xxxxxxxx",
"title": "Order #1024",
"body": "Do you want to confirm your order?",
"footer": "LetsBot",
"buttons": [
{
"id": "confirm",
"title": "Confirm"
},
{
"id": "cancel",
"title": "Cancel"
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/send/buttons",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"phone": "9665xxxxxxxx",
"title": "Order #1024",
"body": "Do you want to confirm your order?",
"footer": "LetsBot",
"buttons": [
{
"id": "confirm",
"title": "Confirm",
},
{
"id": "cancel",
"title": "Cancel",
},
],
},
)
print(response.json())
POST
/api/v1/message/send
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.
Formularfelter
Felt Eksempel
phone{{phone}}
bodyالسلام عليكم
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/message/send" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "body=السلام عليكم"
const response = await fetch("https://letsbot.net/api/v1/message/send", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"body": "السلام عليكم",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'body' => 'السلام عليكم',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"body": "السلام عليكم",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/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.
Formularfelter
Felt Eksempel
phone{{phone}}
urlhttps://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/message/send/sticker" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "url=https://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp"
const response = await fetch("https://letsbot.net/api/v1/message/send/sticker", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"url": "https://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/sticker');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'url' => 'https://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/sticker",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"url": "https://img-11.stickers.cloud/packs/add9862f-fa7a-424d-91f9-8e5a1ee7b3f3/webp/6706af79-d59a-42b5-b01c-8af9b0191bcf.webp",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/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.
Formularfelter
Felt Eksempel
phone{{phone}}
reaction❤️
messageIdBAE5F2C25476F607
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/message/send/reaction" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "reaction=❤️" \
-F "messageId=BAE5F2C25476F607"
const response = await fetch("https://letsbot.net/api/v1/message/send/reaction", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"reaction": "❤️",
"messageId": "BAE5F2C25476F607",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/reaction');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'reaction' => '❤️',
'messageId' => 'BAE5F2C25476F607',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/reaction",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"reaction": "❤️",
"messageId": "BAE5F2C25476F607",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/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.
Formularfelter
Felt Eksempel
phone{{phone}}
bodyاهلا بك فى ليتس بوت تجربة ارسال رد
messageIdBAE5F2C25476F607
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/message/send/reply" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "body=اهلا بك فى ليتس بوت تجربة ارسال رد" \
-F "messageId=BAE5F2C25476F607"
const response = await fetch("https://letsbot.net/api/v1/message/send/reply", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"body": "اهلا بك فى ليتس بوت تجربة ارسال رد",
"messageId": "BAE5F2C25476F607",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/reply');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'body' => 'اهلا بك فى ليتس بوت تجربة ارسال رد',
'messageId' => 'BAE5F2C25476F607',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/reply",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"body": "اهلا بك فى ليتس بوت تجربة ارسال رد",
"messageId": "BAE5F2C25476F607",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/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.
Formularfelter
Felt Eksempel
phone{{phone}}
mention{{phone}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/message/send/mention" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "mention=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/message/send/mention", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"mention": "9665xxxxxxxx",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/mention');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'mention' => '9665xxxxxxxx',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/mention",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"mention": "9665xxxxxxxx",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/message/send/disappearing
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'>
Formularfelter
Felt Eksempel
phone{{phone}}
bodyThis is a disappearing message that will disappear after X duration
duration60
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/message/send/disappearing" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "body=This is a disappearing message that will disappear after X duration" \
-F "duration=60"
const response = await fetch("https://letsbot.net/api/v1/message/send/disappearing", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"body": "This is a disappearing message that will disappear after X duration",
"duration": "60",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/disappearing');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'body' => 'This is a disappearing message that will disappear after X duration',
'duration' => '60',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/disappearing",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"body": "This is a disappearing message that will disappear after X duration",
"duration": "60",
},
)
print(response.json())
Svar
Success Reponse200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/share/catalog
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'>
Formularfelter
Felt Eksempel
phone{{phone}}
catalog{{phone}}
titleThis is title of catalog
bodyThis is body of catalog
descriptionThis is desc of catalog
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/share/catalog" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "catalog=9665xxxxxxxx" \
-F "title=This is title of catalog" \
-F "body=This is body of catalog" \
-F "description=This is desc of catalog"
const response = await fetch("https://letsbot.net/api/v1/share/catalog", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"catalog": "9665xxxxxxxx",
"title": "This is title of catalog",
"body": "This is body of catalog",
"description": "This is desc of catalog",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/share/catalog');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'catalog' => '9665xxxxxxxx',
'title' => 'This is title of catalog',
'body' => 'This is body of catalog',
'description' => 'This is desc of catalog',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/share/catalog",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"catalog": "9665xxxxxxxx",
"title": "This is title of catalog",
"body": "This is body of catalog",
"description": "This is desc of catalog",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Message202
(tomt indhold)
GET
/api/v1/message/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.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
phone
Ja
{{phone}}
phone number with country code
messageID
Ja
BAE5690364E55771
Message Id
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://letsbot.net/api/v1/message/id" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
--data-urlencode "phone=9665xxxxxxxx" \
--data-urlencode "messageID=BAE5690364E55771"
const response = await fetch("https://letsbot.net/api/v1/message/id?phone=%7B%7Bphone%7D%7D&messageID=BAE5690364E55771", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/id?phone=%7B%7Bphone%7D%7D&messageID=BAE5690364E55771');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/message/id",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
params={
"phone": "9665xxxxxxxx",
"messageID": "BAE5690364E55771",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
Success Response (Text)200
(tomt indhold)
Image Message Response200
(tomt indhold)
Video Message Response200
(tomt indhold)
File Message Response200
(tomt indhold)
GIF Message Response200
(tomt indhold)
Audio Message Response200
(tomt indhold)
Button Text Message Response200
(tomt indhold)
GET
/api/v1/message/fetch
Fetch the most recent messages of the WhatsApp session (limit, default 25). No date filter.
Channels: QR (WhatsApp Web) channels only. On an official WhatsApp Cloud API number this request answers 409 with "error_code": "USE_MESSAGES_ARCHIVE" and a ready-made use.example URL.
To read stored messages by date — incoming and outgoing, on any channel — use Message Archive → Get messages by date .
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://letsbot.net/api/v1/message/fetch" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/message/fetch", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/fetch');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/message/fetch",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Fetch Messages200
(tomt indhold)
409 — official number409
{
"success": false,
"Status": false,
"error_code": "USE_MESSAGES_ARCHIVE",
"Message": "GET /api/v1/message/fetch reads a QR (WhatsApp Web) session, which official WhatsApp Cloud API numbers do not have. Read stored messages — incoming and outgoing — with GET /api/v1/messages (date_from, date_to, optional phone, cursor).",
"use": {
"method": "GET",
"path": "/api/v1/messages",
"example": "/api/v1/messages?phone=966512345678&date_from=2026-08-31&date_to=2026-09-30"
}
}
DELETE
/api/v1/message/delete
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).
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
phone
Ja
{{phone}}
messageID
Ja
BAE509D204172AC0
Formularfelter
Felt Eksempel
phone{{phone}}
messageIDBAE509D204172AC0
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://letsbot.net/api/v1/message/delete?phone=9665xxxxxxxx&messageID=BAE509D204172AC0" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-F "messageID=BAE509D204172AC0"
const response = await fetch("https://letsbot.net/api/v1/message/delete?phone=%7B%7Bphone%7D%7D&messageID=BAE509D204172AC0", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"messageID": "BAE509D204172AC0",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/delete?phone=%7B%7Bphone%7D%7D&messageID=BAE509D204172AC0');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'messageID' => 'BAE509D204172AC0',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://letsbot.net/api/v1/message/delete",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
params={
"phone": "9665xxxxxxxx",
"messageID": "BAE509D204172AC0",
},
data={
"phone": "9665xxxxxxxx",
"messageID": "BAE509D204172AC0",
},
)
print(response.json())
Svar
Delete Message by Id200
(tomt indhold)
POST
/api/v1/message/send/forward/message
Ny
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.
Formularfelter
Felt Eksempel
phone{{phone}}
messageId3EB0C4F1A2B3D4E5F6
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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=9665xxxxxxxx" \
-F "messageId=3EB0C4F1A2B3D4E5F6"
const response = await fetch("https://letsbot.net/api/v1/message/send/forward/message", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"messageId": "3EB0C4F1A2B3D4E5F6",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/message/send/forward/message');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'messageId' => '3EB0C4F1A2B3D4E5F6',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/message/send/forward/message",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"messageId": "3EB0C4F1A2B3D4E5F6",
},
)
print(response.json())
POST
/api/v1/button
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'>
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"title": "test title",
"body": "Content Of the Message",
"footer": "Footer of the button",
"buttons[0][id]": "1",
"buttons[0][title]": "button type 1",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net",
"caption": "test caption",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'title' => 'test title',
'body' => 'Content Of the Message',
'footer' => 'Footer of the button',
'buttons[0][id]' => '1',
'buttons[0][title]' => 'button type 1',
'buttons[0][type]' => '1',
'buttons[0][extra_data]' => 'https://example.net',
'caption' => 'test caption',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"title": "test title",
"body": "Content Of the Message",
"footer": "Footer of the button",
"buttons[0][id]": "1",
"buttons[0][title]": "button type 1",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net",
"caption": "test caption",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/button/image
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/image" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/image", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"caption": "Image caption",
"footer": "test 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",
"image": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/image');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'caption' => 'Image caption',
'footer' => 'test 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',
'image' => 'https://letsbot.net/resources/Gallery/221595264200_servers.png',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/image",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"caption": "Image caption",
"footer": "test 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",
"image": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/button/video
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/video" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/video", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"caption": "video caption",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": "⭐Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net/login",
"video": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/video');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'caption' => 'video caption',
'footer' => 'test footer',
'buttons[0][id]' => '4',
'buttons[0][title]' => '⭐Star LetsBot on GitHub!',
'buttons[0][type]' => '1',
'buttons[0][extra_data]' => 'https://example.net/login',
'video' => 'https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/video",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"caption": "video caption",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": "⭐Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net/login",
"video": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Message202
(tomt indhold)
POST
/api/v1/button/location
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/location" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/location", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"caption": "location scaption",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": "⭐Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net/login",
"lat": "21",
"lng": "23",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/location');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'caption' => 'location scaption',
'footer' => 'test footer',
'buttons[0][id]' => '4',
'buttons[0][title]' => '⭐Star LetsBot on GitHub!',
'buttons[0][type]' => '1',
'buttons[0][extra_data]' => 'https://example.net/login',
'lat' => '21',
'lng' => '23',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/location",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"caption": "location scaption",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": "⭐Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net/login",
"lat": "21",
"lng": "23",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/button/document
You can send message templates via whatsapp with this api
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/document" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/document", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"caption": "This is Document",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": "⭐Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net/login",
"document": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/document');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'caption' => 'This is Document',
'footer' => 'test footer',
'buttons[0][id]' => '4',
'buttons[0][title]' => '⭐Star LetsBot on GitHub!',
'buttons[0][type]' => '1',
'buttons[0][extra_data]' => 'https://example.net/login',
'document' => 'https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/document",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"caption": "This is Document",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": "⭐Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.net/login",
"document": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/carousel
Ny
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-indhold
{
"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"
}
]
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
}
]
}'
const response = await fetch("https://letsbot.net/api/v1/carousel", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"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"
}
]
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/carousel');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"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"
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/carousel",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"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",
},
],
},
)
print(response.json())
POST
/api/v1/button/template
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/template" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/template", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"title": "hello title",
"body": "hello body",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": ":star:Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.com",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/template');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'title' => 'hello title',
'body' => 'hello body',
'footer' => 'test footer',
'buttons[0][id]' => '4',
'buttons[0][title]' => ':star:Star LetsBot on GitHub!',
'buttons[0][type]' => '1',
'buttons[0][extra_data]' => 'https://example.com',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/template",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"title": "hello title",
"body": "hello body",
"footer": "test footer",
"buttons[0][id]": "4",
"buttons[0][title]": ":star:Star LetsBot on GitHub!",
"buttons[0][type]": "1",
"buttons[0][extra_data]": "https://example.com",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
POST
/api/v1/button/image/template
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/image/template" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/image/template", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"title": "This 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",
"image": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/image/template');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'title' => 'This 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',
'image' => 'https://letsbot.net/resources/Gallery/221595264200_servers.png',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/image/template",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"title": "This 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",
"image": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/button/document/template
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/document/template" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/document/template", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"title": "title",
"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",
"document": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/document/template');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'title' => 'title',
'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',
'document' => 'https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/document/template",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"title": "title",
"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",
"document": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/f8eb54b3-30c9-43da-a3bd-2f551c55c114.pdf",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/button/video/template
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/video/template" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/video/template", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"title": "title",
"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",
"video": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/video/template');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'title' => 'title',
'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',
'video' => 'https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/video/template",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"title": "title",
"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",
"video": "https://letsbot.net/public/uploads/78986064-893d-4f65-895c-edb2875e4038/chats/dc6a152f-1b27-4171-bf38-9c1e75c2fc34.mp4",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/button/location/template
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.
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/button/location/template" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/button/location/template", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"title": "title",
"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",
"lat": "23",
"lng": "21",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/button/location/template');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'title' => 'title',
'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',
'lat' => '23',
'lng' => '21',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/button/location/template",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"title": "title",
"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",
"lat": "23",
"lng": "21",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/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'>
Formularfelter
Felt Eksempel
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
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/list/message" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phone=9665xxxxxxxx" \
-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"
const response = await fetch("https://letsbot.net/api/v1/list/message", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phone": "9665xxxxxxxx",
"body": "Body of message",
"title": "Tilte of message",
"footer": "Footer of message",
"buttonText": "Required, 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",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/list/message');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phone' => '9665xxxxxxxx',
'body' => 'Body of message',
'title' => 'Tilte of message',
'footer' => 'Footer of message',
'buttonText' => 'Required, 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',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/list/message",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phone": "9665xxxxxxxx",
"body": "Body of message",
"title": "Tilte of message",
"footer": "Footer of message",
"buttonText": "Required, 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",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
group
POST
/api/v1/invite/code
Get invite code by group id. Data of the response is the invitation code .
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/invite/code", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/invite/code');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/invite/code",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
POST
/api/v1/invite/revoke/code
Revoke Group invite code by group Id. Data of the response is the New invite code.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/invite/revoke/code", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/invite/revoke/code');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/invite/revoke/code",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
POST
/api/v1/invite/send/link
Send invite group link to phone number. The data response is the link for invitation
Formularfelter
Felt Eksempel
to{{phone}}
jid120363057244685240@g.us
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/invite/send/link" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "to=9665xxxxxxxx" \
-F "jid=120363057244685240@g.us"
const response = await fetch("https://letsbot.net/api/v1/invite/send/link", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"to": "9665xxxxxxxx",
"jid": "120363057244685240@g.us",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/invite/send/link');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'to' => '9665xxxxxxxx',
'jid' => '120363057244685240@g.us',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/invite/send/link",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"to": "9665xxxxxxxx",
"jid": "120363057244685240@g.us",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
GET
/api/v1/invite/get/info
Get Group info by valid invite Code. Data of the response is the group id.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
code
Ja
KXDixa04zE73bgj5LIWhJ7
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/invite/get/info?code=KXDixa04zE73bgj5LIWhJ7", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/invite/get/info?code=KXDixa04zE73bgj5LIWhJ7');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/invite/get/info",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
params={
"code": "KXDixa04zE73bgj5LIWhJ7",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response (Invaild Code)200
(tomt indhold)
POST
/api/v1/group/demote/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.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
phones[0]{{phone}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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]=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/group/demote/participant", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"phones[0]": "9665xxxxxxxx",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/demote/participant');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'phones[0]' => '9665xxxxxxxx',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/demote/participant",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"phones[0]": "9665xxxxxxxx",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/group/add/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.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
phones[0]{{phone2}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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}}"
const response = await fetch("https://letsbot.net/api/v1/group/add/participant", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"phones[0]": "{{phone2}}",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/add/participant');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'phones[0]' => '{{phone2}}',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/add/participant",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"phones[0]": "{{phone2}}",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/group/remove/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.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
phones[0]{{phone2}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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}}"
const response = await fetch("https://letsbot.net/api/v1/group/remove/participant", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"phones[0]": "{{phone2}}",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/remove/participant');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'phones[0]' => '{{phone2}}',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/remove/participant",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"phones[0]": "{{phone2}}",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
Success Respoonse200
(tomt indhold)
POST
/api/v1/group/promote/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.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
phones[0]{{phone2}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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}}"
const response = await fetch("https://letsbot.net/api/v1/group/promote/participant", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"phones[0]": "{{phone2}}",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/promote/participant');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'phones[0]' => '{{phone2}}',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/promote/participant",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"phones[0]": "{{phone2}}",
},
)
print(response.json())
Svar
Success Respose200
(tomt indhold)
Failed Response202
(tomt indhold)
GET
/api/v1/group/display/picture
get group image by jid parameter value must be group id
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
jid
Ja
120363061829425867@g.us
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/group/display/picture?jid=120363061829425867%40g.us", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/display/picture?jid=120363061829425867%40g.us');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/group/display/picture",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
params={
"jid": "120363061829425867@g.us",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/group/set/display/picture
put this jid key, it will modify the image of the group
Formularfelter
Felt Eksempel
imagehttps://letsbot.net/resources/Gallery/221595264200_servers.png
jid120363061829425867@g.us
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/group/set/display/picture", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"image": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
"jid": "120363061829425867@g.us",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/set/display/picture');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'image' => 'https://letsbot.net/resources/Gallery/221595264200_servers.png',
'jid' => '120363061829425867@g.us',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/set/display/picture",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"image": "https://letsbot.net/resources/Gallery/221595264200_servers.png",
"jid": "120363061829425867@g.us",
},
)
print(response.json())
Svar
Failed Response202
(tomt indhold)
success response200
(tomt indhold)
POST
/api/v1/group/rename
You can rename group chat by passing the group id and the new subject of the group.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
subjectTest Group 2
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/group/rename", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"subject": "Test Group 2",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/rename');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'subject' => 'Test Group 2',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/rename",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"subject": "Test Group 2",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/group/set/description
You can set group description by passing group id and description.
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
descriptionThis is test group
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/group/set/description", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"description": "This is test group",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/set/description');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'description' => 'This is test group',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/set/description",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"description": "This is test group",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/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).
Formularfelter
Felt Eksempel
jid120363057244685240@g.us
settingsnot_announcement
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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"
const response = await fetch("https://letsbot.net/api/v1/group/settings", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"jid": "120363057244685240@g.us",
"settings": "not_announcement",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/settings');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'jid' => '120363057244685240@g.us',
'settings' => 'not_announcement',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/settings",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"jid": "120363057244685240@g.us",
"settings": "not_announcement",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Invaild Settings202
(tomt indhold)
Failed Response202
(tomt indhold)
GET
/api/v1/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....
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://letsbot.net/api/v1/group/list" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/group/list", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/list');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/group/list",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
GET
/api/v1/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
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
jid
Ja
{{jid1}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://letsbot.net/api/v1/group/conversation" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
--data-urlencode "jid={{jid1}}"
const response = await fetch("https://letsbot.net/api/v1/group/conversation?jid=%7B%7Bjid1%7D%7D", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/conversation?jid=%7B%7Bjid1%7D%7D');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/group/conversation",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
params={
"jid": "{{jid1}}",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
GET
/api/v1/group/meta/data
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.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
jid
Ja
{{jid}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
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}}"
const response = await fetch("https://letsbot.net/api/v1/group/meta/data?jid=%7B%7Bjid%7D%7D", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/meta/data?jid=%7B%7Bjid%7D%7D');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://letsbot.net/api/v1/group/meta/data",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
params={
"jid": "{{jid}}",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
POST
/api/v1/group/create
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.
Formularfelter
Felt Eksempel
phones[0]{{phone}}
phones[1]{{phone}}
subjectTest Group
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/group/create" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "phones[0]=9665xxxxxxxx" \
-F "phones[1]=9665xxxxxxxx" \
-F "subject=Test Group"
const response = await fetch("https://letsbot.net/api/v1/group/create", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"phones[0]": "9665xxxxxxxx",
"phones[1]": "9665xxxxxxxx",
"subject": "Test Group",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/create');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'phones[0]' => '9665xxxxxxxx',
'phones[1]' => '9665xxxxxxxx',
'subject' => 'Test Group',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/create",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"phones[0]": "9665xxxxxxxx",
"phones[1]": "9665xxxxxxxx",
"subject": "Test Group",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response202
(tomt indhold)
POST
/api/v1/group/join
Join Group by valid invite Code. Data of the response is the group id.
Formularfelter
Felt Eksempel
code{{code}}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://letsbot.net/api/v1/group/join" \
-H "Authorization: Bearer YOUR_LB_API_KEY" \
-H "Accept: application/json" \
-F "code={{code}}"
const response = await fetch("https://letsbot.net/api/v1/group/join", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
body: new URLSearchParams({
"code": "{{code}}",
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://letsbot.net/api/v1/group/join');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_LB_API_KEY',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => http_build_query([
'code' => '{{code}}',
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://letsbot.net/api/v1/group/join",
headers={
"Authorization": "Bearer YOUR_LB_API_KEY",
"Accept": "application/json",
},
data={
"code": "{{code}}",
},
)
print(response.json())
Svar
Success Response200
(tomt indhold)
Failed Response200
(tomt indhold)
CRM
The CRM API reads and writes your LetsBot CRM: contacts, companies, deals and pipelines, tasks, activities, quotes and products, plus REST-hook webhooks for Zapier, Make and n8n. It is available once the workspace uses the CRM; until then every CRM path answers 404.
Base URL: your workspace's own domain, https://{workspace}.letsbot.net/api/v1/crm (the crm_base_url variable of this collection). It is not https://letsbot.net/api/v1.
Authentication — the crm scope. Send a workspace API key in the X-Zapier-Api-Key header (the crm_api_key variable; this folder sets the header for you). Create the key in the panel under Integrations → Zapier → API keys and tick the crm scope. The scope must be listed explicitly: a key with no scopes ("full access") and legacy OAuth tokens are refused with 403 and code: missing_scope. The channel lb_api_key (Bearer) used by the other sections does not work here. A key acts for the whole workspace and sees every CRM record, whatever the team permissions are.
Responses. Success: {"success": true, "data": ..., "meta"?: {current_page, last_page, per_page, total}}. Errors: {"success": false, "error": "<message>", "code": "<code>", "errors"?: {field: [messages]}} with code one of not_found (404), missing_scope (403), validation_failed (422), already_exists / conflict (409). A missing or unknown key answers 401. error follows Accept-Language (en, ar, es, pt).
Rate limit: 120 requests per minute per key (429 with Retry-After when exceeded); subscribing webhooks is also limited to 30 per minute.
Webhooks and signature. Subscribe with POST /hooks (or add a webhook in the panel under CRM → API & webhooks ). Every delivery is a POST of {"id", "event", "object", "record_id", "occurred_at", "data", "changes"?, "previous"?} where data is the record in the same shape its GET returns, with these headers:
X-LetsBot-Signature: t=<unix seconds>,v1=<hex>, where v1 = HMAC-SHA256 of <t>.<raw body> with the subscription's signing secret (whsec_…, shown once).
X-LetsBot-Event — the event name, e.g. deal.won.
X-LetsBot-Delivery — the event id (also id in the body); use it to drop duplicates.
To verify: split the header on ,, compute hmac_sha256(secret, t + "." + rawBody), compare it with v1 in constant time, and reject a t older than 5 minutes. Answer 2xx to acknowledge. Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h and 6 h; after 5 deliveries in a row fail the subscription is switched off, and an HTTP 410 answer switches it off at once.
Events: contact.created, contact.updated, contact.deleted, company.created, company.updated, company.deleted, deal.created, deal.updated, deal.deleted, deal.stage_changed, deal.won, deal.lost, task.created, task.completed, ticket.created, quote.sent, quote.viewed, quote.accepted.
GET
/api/v1/crm/contacts
Ny
Contacts through the CRM lists engine: search, filters, saved views, sort and pages. Scope: crm.
Response: data[] = contacts, meta = {current_page, last_page, per_page, total}.
WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.
whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
q
Nej
ahmed
Free-text search.
filters
Nej
{"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]}
Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view
Nej
all
A saved view id (its filters and sort apply), or `all`.
sort
Nej
created_at
Sort key (see `sorts` in …/schema).
dir
Nej
desc
`asc` or `desc`.
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/contacts" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/contacts",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle": {
"id": 2,
"name": "Lead"
},
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"company": {
"id": 7,
"name": "Example Trading Co."
},
"tags": [
"vip"
],
"custom_fields": {
"source_campaign": "spring_sale"
},
"last_activity_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
"whatsapp_bsuid": null,
"whatsapp_username": "ahmed_store",
"phone_available": true
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
Key without the crm scope403
{
"success": false,
"error": "This API key cannot use the CRM API. In LetsBot open Integrations → Zapier → API keys and create a key with the \"crm\" scope ticked.",
"code": "missing_scope"
}
GET
/api/v1/crm/contacts/schema
Ny
The lists-engine catalogue for contact lists: every field with its type, whether it can be filtered or sorted, its filter operators and options (for example the lifecycle stage ids). Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/contacts/schema" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/schema", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/schema');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/contacts/schema",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Schema200
{
"success": true,
"data": {
"fields": [
{
"key": "name",
"label": "Name",
"type": "text",
"filterable": true,
"sortable": true,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "email",
"label": "Email",
"type": "text",
"filterable": true,
"sortable": false,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "lifecycle",
"label": "Lifecycle stage",
"type": "select",
"filterable": true,
"sortable": true,
"operators": [
"is",
"is_not"
],
"options": [
{
"value": 1,
"label": "Subscriber"
},
{
"value": 2,
"label": "Lead"
},
{
"value": 3,
"label": "Customer"
}
]
}
],
"sorts": [
"name",
"created_at",
"last_activity_at"
],
"default_sort": {
"key": "last_activity_at",
"dir": "desc"
}
}
}
GET
/api/v1/crm/contacts/search
Ny
Exact lookup by phone (any format) or email, or free text q. Send one of the three. Up to 25 matches, newest first. Scope: crm.
WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.
whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
phone
Nej
+966500000000
Phone in any format.
email
Nej
ahmed@example.com
Exact e-mail.
q
Nej
Ahmed
Free text.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/contacts/search" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/search", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/search');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/contacts/search",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Matches200
{
"success": true,
"data": [
{
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle": {
"id": 2,
"name": "Lead"
},
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"company": {
"id": 7,
"name": "Example Trading Co."
},
"tags": [
"vip"
],
"custom_fields": {
"source_campaign": "spring_sale"
},
"last_activity_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
"whatsapp_bsuid": null,
"whatsapp_username": "ahmed_store",
"phone_available": true
}
]
}
POST
/api/v1/crm/contacts
Ny
Creates a contact (WhatsApp customer) by phone. Scope: crm.
Required: phone (international format). Optional: name, email, city, country, owner_user_id, lifecycle_stage_id (see …/schema), company_id, custom_fields (keyed by field key).
A phone that already exists answers 409 with code: already_exists and that contact in data.
WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.
whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.
JSON-indhold
{
"phone": "+966500000000",
"name": "Ahmed Ali",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle_stage_id": 2,
"company_id": 7,
"custom_fields": {
"source_campaign": "spring_sale"
}
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/contacts" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"phone": "+966500000000",
"name": "Ahmed Ali",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle_stage_id": 2,
"company_id": 7,
"custom_fields": {
"source_campaign": "spring_sale"
}
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"phone": "+966500000000",
"name": "Ahmed Ali",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle_stage_id": 2,
"company_id": 7,
"custom_fields": {
"source_campaign": "spring_sale"
}
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"phone": "+966500000000",
"name": "Ahmed Ali",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle_stage_id": 2,
"company_id": 7,
"custom_fields": {
"source_campaign": "spring_sale"
}
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/contacts",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"phone": "+966500000000",
"name": "Ahmed Ali",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle_stage_id": 2,
"company_id": 7,
"custom_fields": {
"source_campaign": "spring_sale",
},
},
)
print(response.json())
Svar
Created201
{
"success": true,
"data": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle": {
"id": 2,
"name": "Lead"
},
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"company": {
"id": 7,
"name": "Example Trading Co."
},
"tags": [
"vip"
],
"custom_fields": {
"source_campaign": "spring_sale"
},
"last_activity_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
"whatsapp_bsuid": null,
"whatsapp_username": "ahmed_store",
"phone_available": true
}
}
Phone already exists409
{
"success": false,
"error": "A contact with this phone already exists.",
"code": "already_exists",
"data": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle": {
"id": 2,
"name": "Lead"
},
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"company": {
"id": 7,
"name": "Example Trading Co."
},
"tags": [
"vip"
],
"custom_fields": {
"source_campaign": "spring_sale"
},
"last_activity_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
"whatsapp_bsuid": null,
"whatsapp_username": "ahmed_store",
"phone_available": true
}
}
Validation failed422
{
"success": false,
"error": "The phone field is required.",
"code": "validation_failed",
"errors": {
"phone": [
"The phone field is required."
]
}
}
GET
/api/v1/crm/contacts/{id}
Ny
One contact. Scope: crm.
WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.
whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/contacts/42" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/42", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/42');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/contacts/42",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Contact200
{
"success": true,
"data": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle": {
"id": 2,
"name": "Lead"
},
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"company": {
"id": 7,
"name": "Example Trading Co."
},
"tags": [
"vip"
],
"custom_fields": {
"source_campaign": "spring_sale"
},
"last_activity_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
"whatsapp_bsuid": null,
"whatsapp_username": "ahmed_store",
"phone_available": true
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
PATCH
/api/v1/crm/contacts/{id}
Ny
Only the fields sent change; same validation and audit as the panel. Same fields as Create a contact except phone. Scope: crm.
WhatsApp usernames (only for workspaces with WhatsApp username support switched on; absent otherwise). phone keeps its meaning.
whatsapp_bsuid — Meta's ID for a customer who hides their number behind a WhatsApp username, e.g. EG.2288384708632117. Not a phone number; null when Meta sent none.
whatsapp_username — the customer's WhatsApp @username, without the @. Display only; null when none.
phone_available — false when the customer keeps their number private: do not SMS, call or store phone as a number.
JSON-indhold
{
"name": "Ahmed Ali",
"lifecycle_stage_id": 3,
"owner_user_id": 3
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/contacts/42" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Ahmed Ali",
"lifecycle_stage_id": 3,
"owner_user_id": 3
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/42", {
method: "PATCH",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Ahmed Ali",
"lifecycle_stage_id": 3,
"owner_user_id": 3
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/42');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ahmed Ali",
"lifecycle_stage_id": 3,
"owner_user_id": 3
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"PATCH",
"https://your-workspace.letsbot.net/api/v1/crm/contacts/42",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"name": "Ahmed Ali",
"lifecycle_stage_id": 3,
"owner_user_id": 3,
},
)
print(response.json())
Svar
Updated200
{
"success": true,
"data": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"email": "ahmed@example.com",
"city": "Riyadh",
"country": "SA",
"lifecycle": {
"id": 3,
"name": "Customer"
},
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"company": {
"id": 7,
"name": "Example Trading Co."
},
"tags": [
"vip"
],
"custom_fields": {
"source_campaign": "spring_sale"
},
"last_activity_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/contacts/42",
"whatsapp_bsuid": null,
"whatsapp_username": "ahmed_store",
"phone_available": true
}
}
POST
/api/v1/crm/contacts/{id}/notes
Ny
Logs a note on the contact's CRM timeline. Scope: crm.
Body: body (required, up to 10,000 characters), title, occurred_at (ISO 8601, default now), pinned.
JSON-indhold
{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/contacts/42/notes" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/contacts/42/notes", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/contacts/42/notes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/contacts/42/notes",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": False,
},
)
print(response.json())
Svar
Note201
{
"success": true,
"data": {
"id": 88,
"subject_type": "contact",
"subject_id": 42,
"type": "note",
"title": "Delivery request",
"body": "Customer asked for a delivery date before the end of the month.",
"details": {},
"actor_user_id": null,
"source": "api",
"pinned": false,
"occurred_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00"
}
}
GET
/api/v1/crm/companies
Ny
Companies through the CRM lists engine (same query parameters as List contacts ). Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
q
Nej
ahmed
Free-text search.
filters
Nej
{"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]}
Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view
Nej
all
A saved view id (its filters and sort apply), or `all`.
sort
Nej
created_at
Sort key (see `sorts` in …/schema).
dir
Nej
desc
`asc` or `desc`.
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/companies" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/companies",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"size_range": "11-50",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 1,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
GET
/api/v1/crm/companies/schema
Ny
The lists-engine catalogue for company lists. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/companies/schema" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/schema", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/schema');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/companies/schema",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Schema200
{
"success": true,
"data": {
"fields": [
{
"key": "name",
"label": "Name",
"type": "text",
"filterable": true,
"sortable": true,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "email",
"label": "Email",
"type": "text",
"filterable": true,
"sortable": false,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "lifecycle",
"label": "Lifecycle stage",
"type": "select",
"filterable": true,
"sortable": true,
"operators": [
"is",
"is_not"
],
"options": [
{
"value": 1,
"label": "Subscriber"
},
{
"value": 2,
"label": "Lead"
},
{
"value": 3,
"label": "Customer"
}
]
}
],
"sorts": [
"name",
"created_at",
"last_activity_at"
],
"default_sort": {
"key": "last_activity_at",
"dir": "desc"
}
}
}
GET
/api/v1/crm/companies/search
Ny
Exact lookup by domain or name, or free text q. Send one of the three. Up to 25 matches. Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
domain
Nej
example.com
Exact domain.
name
Nej
Example Trading Co.
Exact name.
q
Nej
Example
Free text.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/companies/search" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/search", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/search');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/companies/search",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Matches200
{
"success": true,
"data": [
{
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"size_range": "11-50",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 1,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7"
}
]
}
POST
/api/v1/crm/companies
Ny
Creates a company (account). Scope: crm.
Required: name. Optional: domain, industry, size_range, phone, email, website, country (ISO 3166 alpha-2), city, address, owner_user_id, lifecycle.
JSON-indhold
{
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"phone": "+966512345678",
"email": "info@example.com",
"country": "SA",
"city": "Riyadh"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/companies" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"phone": "+966512345678",
"email": "info@example.com",
"country": "SA",
"city": "Riyadh"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"phone": "+966512345678",
"email": "info@example.com",
"country": "SA",
"city": "Riyadh"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"phone": "+966512345678",
"email": "info@example.com",
"country": "SA",
"city": "Riyadh"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/companies",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"phone": "+966512345678",
"email": "info@example.com",
"country": "SA",
"city": "Riyadh",
},
)
print(response.json())
Svar
Created201
{
"success": true,
"data": {
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"size_range": "11-50",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 0,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7",
"contacts": [],
"deals_count": 0,
"tickets_count": 0
}
}
GET
/api/v1/crm/companies/{id}
Ny
One company with its linked contacts. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/companies/7" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/7", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/7');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/companies/7",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Company200
{
"success": true,
"data": {
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"size_range": "11-50",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 1,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7",
"contacts": [
{
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"role": "Purchasing manager",
"is_primary": true
}
],
"deals_count": 2,
"tickets_count": 0
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
PATCH
/api/v1/crm/companies/{id}
Ny
Only the fields sent change. Scope: crm.
JSON-indhold
{
"industry": "Wholesale",
"size_range": "51-200"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/companies/7" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"industry": "Wholesale",
"size_range": "51-200"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/7", {
method: "PATCH",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"industry": "Wholesale",
"size_range": "51-200"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/7');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"industry": "Wholesale",
"size_range": "51-200"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"PATCH",
"https://your-workspace.letsbot.net/api/v1/crm/companies/7",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"industry": "Wholesale",
"size_range": "51-200",
},
)
print(response.json())
Svar
Updated200
{
"success": true,
"data": {
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Wholesale",
"size_range": "51-200",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 1,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7",
"contacts": [
{
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"role": "Purchasing manager",
"is_primary": true
}
],
"deals_count": 2,
"tickets_count": 0
}
}
DELETE
/api/v1/crm/companies/{id}
Ny
Soft-deletes the company (it can be restored in the panel). Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/companies/7" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/7", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/7');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/companies/7",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deleted200
{
"success": true,
"data": {
"id": 7,
"deleted": true
}
}
POST
/api/v1/crm/companies/{id}/contacts
Ny
Associates a contact with the company, optionally as its primary contact. Scope: crm.
Required: contact_id. Optional: role (up to 100 characters), is_primary.
JSON-indhold
{
"contact_id": 42,
"role": "Purchasing manager",
"is_primary": true
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"contact_id": 42,
"role": "Purchasing manager",
"is_primary": true
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"contact_id": 42,
"role": "Purchasing manager",
"is_primary": true
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"contact_id": 42,
"role": "Purchasing manager",
"is_primary": true
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"contact_id": 42,
"role": "Purchasing manager",
"is_primary": True,
},
)
print(response.json())
Svar
Linked200
{
"success": true,
"data": {
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"size_range": "11-50",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 1,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7",
"contacts": [
{
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000",
"role": "Purchasing manager",
"is_primary": true
}
],
"deals_count": 2,
"tickets_count": 0
}
}
DELETE
/api/v1/crm/companies/{id}/contacts/{contactId}
Ny
Removes the association; the contact itself stays. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts/42" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts/42", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts/42');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/companies/7/contacts/42",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Unlinked200
{
"success": true,
"data": {
"id": 7,
"name": "Example Trading Co.",
"domain": "example.com",
"industry": "Retail",
"size_range": "11-50",
"phone": "966512345678",
"email": "info@example.com",
"website": "https://example.com",
"country": "SA",
"city": "Riyadh",
"address": "King Fahd Road",
"lifecycle": "customer",
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"contacts_count": 0,
"custom_fields": {},
"created_at": "2026-10-01T12:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/companies/7",
"contacts": [],
"deals_count": 2,
"tickets_count": 0
}
}
POST
/api/v1/crm/companies/{id}/notes
Ny
Logs a note on the company's CRM timeline. Scope: crm.
Body: body (required, up to 10,000 characters), title, occurred_at (ISO 8601, default now), pinned.
JSON-indhold
{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/companies/7/notes" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/companies/7/notes", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/companies/7/notes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/companies/7/notes",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": False,
},
)
print(response.json())
Svar
Note201
{
"success": true,
"data": {
"id": 88,
"subject_type": "company",
"subject_id": 7,
"type": "note",
"title": "Delivery request",
"body": "Customer asked for a delivery date before the end of the month.",
"details": {},
"actor_user_id": null,
"source": "api",
"pinned": false,
"occurred_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00"
}
}
GET
/api/v1/crm/pipelines
Ny
Every sales pipeline with its stages. A stage's kind is open, won or lost. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/pipelines" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/pipelines", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/pipelines');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/pipelines",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Pipelines200
{
"success": true,
"data": [
{
"id": 1,
"name": "Sales",
"currency": "SAR",
"is_default": true,
"stages": [
{
"id": 11,
"name": "New",
"kind": "open",
"position": 1,
"probability": 10
},
{
"id": 12,
"name": "Proposal sent",
"kind": "open",
"position": 2,
"probability": 50
},
{
"id": 13,
"name": "Won",
"kind": "won",
"position": 3,
"probability": 100
},
{
"id": 14,
"name": "Lost",
"kind": "lost",
"position": 4,
"probability": 0
}
]
}
]
}
GET
/api/v1/crm/deals
Ny
Deals, newest activity first by default. Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
pipeline_id
Nej
1
Pipeline id.
stage_id
Nej
12
Stage id.
status
Nej
open
`open`, `won` or `lost`.
owner_user_id
Nej
3
Owner (team member) id.
contact_id
Nej
42
Contact id.
company_id
Nej
7
Company id.
q
Nej
epoxy
Free text.
sort
Nej
updated_at
Sort key.
dir
Nej
desc
`asc` or `desc`.
updated_since
Nej
2026-10-01T00:00:00Z
Only deals updated at or after this time (ISO 8601) — for incremental sync.
created_since
Nej
2026-10-01T00:00:00Z
Only deals created at or after this time (ISO 8601).
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/deals" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/deals",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 12,
"name": "Proposal sent"
},
"status": "open",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
GET
/api/v1/crm/deals/lost-reasons
Ny
The active lost reasons. Marking a deal lost needs one. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/deals/lost-reasons" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/lost-reasons", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/lost-reasons');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/deals/lost-reasons",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Reasons200
{
"success": true,
"data": [
{
"id": 1,
"name": "No budget"
},
{
"id": 2,
"name": "Chose a competitor"
}
]
}
GET
/api/v1/crm/deals/search
Ny
By exact title, free text q or contact_id. Send one of the three. Up to 25 matches. Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
title
Nej
Epoxy kit order — 40 units
Exact title.
q
Nej
epoxy
Free text.
contact_id
Nej
42
Contact id.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/deals/search" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/search", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/search');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/deals/search",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Matches200
{
"success": true,
"data": [
{
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 12,
"name": "Proposal sent"
},
"status": "open",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
]
}
POST
/api/v1/crm/deals
Ny
Creates a deal. Without stage_id it starts in the first open stage of pipeline_id (the default pipeline when omitted). Scope: crm.
Required: title. Optional: pipeline_id, stage_id (see List pipelines and stages ), amount, currency (3 letters), contact_id, company_id, owner_user_id, expected_close_date (YYYY-MM-DD).
JSON-indhold
{
"title": "Epoxy kit order — 40 units",
"pipeline_id": 1,
"amount": 12000,
"currency": "SAR",
"contact_id": 42,
"company_id": 7,
"expected_close_date": "2026-10-31"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/deals" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"title": "Epoxy kit order — 40 units",
"pipeline_id": 1,
"amount": 12000,
"currency": "SAR",
"contact_id": 42,
"company_id": 7,
"expected_close_date": "2026-10-31"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "Epoxy kit order — 40 units",
"pipeline_id": 1,
"amount": 12000,
"currency": "SAR",
"contact_id": 42,
"company_id": 7,
"expected_close_date": "2026-10-31"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"title": "Epoxy kit order — 40 units",
"pipeline_id": 1,
"amount": 12000,
"currency": "SAR",
"contact_id": 42,
"company_id": 7,
"expected_close_date": "2026-10-31"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/deals",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"title": "Epoxy kit order — 40 units",
"pipeline_id": 1,
"amount": 12000,
"currency": "SAR",
"contact_id": 42,
"company_id": 7,
"expected_close_date": "2026-10-31",
},
)
print(response.json())
Svar
Created201
{
"success": true,
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 11,
"name": "New"
},
"status": "open",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
}
Validation failed422
{
"success": false,
"error": "The title field is required.",
"code": "validation_failed",
"errors": {
"title": [
"The title field is required."
]
}
}
GET
/api/v1/crm/deals/{id}
Ny
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/deals/15" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deal200
{
"success": true,
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 12,
"name": "Proposal sent"
},
"status": "open",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
PATCH
/api/v1/crm/deals/{id}
Ny
Only the fields sent change (title, pipeline_id, stage_id (see List pipelines and stages ), amount, currency (3 letters), contact_id, company_id, owner_user_id, expected_close_date (YYYY-MM-DD)). A stage_id of a won or lost stage wins or loses the deal; lost also needs lost_reason_id (and optionally lost_note). Scope: crm.
JSON-indhold
{
"amount": 13500,
"expected_close_date": "2026-11-05"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/deals/15" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"amount": 13500,
"expected_close_date": "2026-11-05"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15", {
method: "PATCH",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 13500,
"expected_close_date": "2026-11-05"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"amount": 13500,
"expected_close_date": "2026-11-05"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"PATCH",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"amount": 13500,
"expected_close_date": "2026-11-05",
},
)
print(response.json())
Svar
Updated200
{
"success": true,
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 13500,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 12,
"name": "Proposal sent"
},
"status": "open",
"expected_close_date": "2026-11-05",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
}
DELETE
/api/v1/crm/deals/{id}
Ny
Soft-deletes the deal. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/deals/15" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deleted200
{
"success": true,
"data": {
"id": 15,
"deleted": true
}
}
POST
/api/v1/crm/deals/{id}/stage
Ny
Moves the deal to another stage of its own pipeline. Fires deal.stage_changed (and deal.won / deal.lost for a won or lost stage). Scope: crm.
Required: stage_id. Lost stage: also lost_reason_id, optional lost_note.
JSON-indhold
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/deals/15/stage" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"stage_id": 12
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15/stage", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"stage_id": 12
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15/stage');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"stage_id": 12
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15/stage",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"stage_id": 12,
},
)
print(response.json())
Svar
Moved200
{
"success": true,
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 12,
"name": "Proposal sent"
},
"status": "open",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": null,
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
}
POST
/api/v1/crm/deals/{id}/won
Ny
Moves the deal to its pipeline's won stage. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/deals/15/won" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15/won", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15/won');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15/won",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Won200
{
"success": true,
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 13,
"name": "Won"
},
"status": "won",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": "2026-10-08T09:30:00+03:00",
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
}
POST
/api/v1/crm/deals/{id}/lost
Ny
Moves the deal to its pipeline's lost stage. Scope: crm.
Required: lost_reason_id (see List lost reasons ). Optional: note (up to 500 characters).
JSON-indhold
{
"lost_reason_id": 2,
"note": "Chose a cheaper supplier."
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/deals/15/lost" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"lost_reason_id": 2,
"note": "Chose a cheaper supplier."
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15/lost", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"lost_reason_id": 2,
"note": "Chose a cheaper supplier."
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15/lost');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"lost_reason_id": 2,
"note": "Chose a cheaper supplier."
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15/lost",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"lost_reason_id": 2,
"note": "Chose a cheaper supplier.",
},
)
print(response.json())
Svar
Lost200
{
"success": true,
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 14,
"name": "Lost"
},
"status": "lost",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": 2,
"lost_note": "Chose a cheaper supplier.",
"won_at": null,
"lost_at": "2026-10-08T09:30:00+03:00",
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
}
}
POST
/api/v1/crm/deals/{id}/notes
Ny
Logs a note on the deal's CRM timeline. Scope: crm.
Body: body (required, up to 10,000 characters), title, occurred_at (ISO 8601, default now), pinned.
JSON-indhold
{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/deals/15/notes" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/deals/15/notes", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/deals/15/notes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": false
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/deals/15/notes",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"body": "Customer asked for a delivery date before the end of the month.",
"title": "Delivery request",
"pinned": False,
},
)
print(response.json())
Svar
Note201
{
"success": true,
"data": {
"id": 88,
"subject_type": "deal",
"subject_id": 15,
"type": "note",
"title": "Delivery request",
"body": "Customer asked for a delivery date before the end of the month.",
"details": {},
"actor_user_id": null,
"source": "api",
"pinned": false,
"occurred_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00"
}
}
GET
/api/v1/crm/tasks
Ny
Tasks, newest activity first by default. Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
status
Nej
todo
`todo`, `in_progress` or `done`.
assignee_user_id
Nej
3
Assignee (team member) id.
contact_id
Nej
42
Contact id.
deal_id
Nej
15
Deal id.
due_before
Nej
2026-10-15T00:00:00Z
Due before this time (ISO 8601).
due_after
Nej
2026-10-01T00:00:00Z
Due after this time (ISO 8601).
q
Nej
call
Free text.
sort
Nej
due_at
Sort key.
dir
Nej
asc
`asc` or `desc`.
updated_since
Nej
2026-10-01T00:00:00Z
Only tasks updated at or after this time.
created_since
Nej
2026-10-01T00:00:00Z
Only tasks created at or after this time.
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/tasks" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/tasks",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 31,
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"status": "todo",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"overdue": false,
"assignee": {
"id": 3,
"name": "Sara Ahmed"
},
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"deal": {
"id": 15,
"title": "Epoxy kit order — 40 units"
},
"recurrence": null,
"completed_at": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/tasks?task=31"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
POST
/api/v1/crm/tasks
Ny
Creates a task. Scope: crm.
Required: title. Optional: description, status (todo, in_progress, done), priority (low, normal, high, urgent), due_at, remind_at (ISO 8601), assignee_user_id, contact_id, deal_id, recurrence (daily, weekly, monthly; needs due_at).
JSON-indhold
{
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"assignee_user_id": 3,
"contact_id": 42,
"deal_id": 15
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/tasks" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"assignee_user_id": 3,
"contact_id": 42,
"deal_id": 15
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"assignee_user_id": 3,
"contact_id": 42,
"deal_id": 15
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"assignee_user_id": 3,
"contact_id": 42,
"deal_id": 15
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/tasks",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"assignee_user_id": 3,
"contact_id": 42,
"deal_id": 15,
},
)
print(response.json())
Svar
Created201
{
"success": true,
"data": {
"id": 31,
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"status": "todo",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"overdue": false,
"assignee": {
"id": 3,
"name": "Sara Ahmed"
},
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"deal": {
"id": 15,
"title": "Epoxy kit order — 40 units"
},
"recurrence": null,
"completed_at": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/tasks?task=31"
}
}
GET
/api/v1/crm/tasks/{id}
Ny
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/tasks/31" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks/31", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks/31');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/tasks/31",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Task200
{
"success": true,
"data": {
"id": 31,
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"status": "todo",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"overdue": false,
"assignee": {
"id": 3,
"name": "Sara Ahmed"
},
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"deal": {
"id": 15,
"title": "Epoxy kit order — 40 units"
},
"recurrence": null,
"completed_at": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/tasks?task=31"
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
PATCH
/api/v1/crm/tasks/{id}
Ny
Only the fields sent change (title, description, status (todo, in_progress, done), priority (low, normal, high, urgent), due_at, remind_at (ISO 8601), assignee_user_id, contact_id, deal_id, recurrence (daily, weekly, monthly; needs due_at)). Scope: crm.
JSON-indhold
{
"status": "in_progress",
"priority": "urgent"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/tasks/31" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"status": "in_progress",
"priority": "urgent"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks/31", {
method: "PATCH",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"status": "in_progress",
"priority": "urgent"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks/31');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"status": "in_progress",
"priority": "urgent"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"PATCH",
"https://your-workspace.letsbot.net/api/v1/crm/tasks/31",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"status": "in_progress",
"priority": "urgent",
},
)
print(response.json())
Svar
Updated200
{
"success": true,
"data": {
"id": 31,
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"status": "in_progress",
"priority": "urgent",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"overdue": false,
"assignee": {
"id": 3,
"name": "Sara Ahmed"
},
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"deal": {
"id": 15,
"title": "Epoxy kit order — 40 units"
},
"recurrence": null,
"completed_at": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/tasks?task=31"
}
}
DELETE
/api/v1/crm/tasks/{id}
Ny
Deletes the task. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/tasks/31" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks/31", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks/31');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/tasks/31",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deleted200
{
"success": true,
"data": {
"id": 31,
"deleted": true
}
}
POST
/api/v1/crm/tasks/{id}/complete
Ny
Marks the task done and fires task.completed. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/tasks/31/complete" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/tasks/31/complete", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/tasks/31/complete');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/tasks/31/complete",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Completed200
{
"success": true,
"data": {
"id": 31,
"title": "Call back about the quote",
"description": "Confirm delivery date.",
"status": "done",
"priority": "high",
"due_at": "2026-10-10T11:00:00+03:00",
"remind_at": "2026-10-10T10:30:00+03:00",
"overdue": false,
"assignee": {
"id": 3,
"name": "Sara Ahmed"
},
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"deal": {
"id": 15,
"title": "Epoxy kit order — 40 units"
},
"recurrence": null,
"completed_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/tasks?task=31"
}
}
GET
/api/v1/crm/activities
Ny
Timeline entries of contacts, companies and deals, newest first. Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
subject_type
Nej
contact
`contact`, `company` or `deal`.
subject_id
Nej
42
The subject's id (with `subject_type`).
type
Nej
note
Activity type, e.g. `note`, `call`, `meeting`.
updated_since
Nej
2026-10-01T00:00:00Z
Only entries updated at or after this time.
created_since
Nej
2026-10-01T00:00:00Z
Only entries created at or after this time.
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/activities" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/activities", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/activities');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/activities",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 88,
"subject_type": "contact",
"subject_id": 42,
"type": "note",
"title": "Requirements",
"body": "Needs delivery before the end of the month.",
"details": {},
"actor_user_id": null,
"source": "api",
"pinned": false,
"occurred_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
POST
/api/v1/crm/activities
Ny
Logs a note, call or meeting on a contact, company or deal. Scope: crm.
Required: subject_type (contact, company, deal), subject_id, type (note, call, meeting). body is required for a note; direction (inbound, outbound) for a call. Optional: title, occurred_at, pinned, outcome (connected, no_answer, busy, voicemail, wrong_number), duration_minutes, location.
JSON-indhold
{
"subject_type": "contact",
"subject_id": 42,
"type": "call",
"title": "Follow-up call",
"body": "Agreed on the delivery date.",
"direction": "outbound",
"outcome": "connected",
"duration_minutes": 6
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/activities" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"subject_type": "contact",
"subject_id": 42,
"type": "call",
"title": "Follow-up call",
"body": "Agreed on the delivery date.",
"direction": "outbound",
"outcome": "connected",
"duration_minutes": 6
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/activities", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"subject_type": "contact",
"subject_id": 42,
"type": "call",
"title": "Follow-up call",
"body": "Agreed on the delivery date.",
"direction": "outbound",
"outcome": "connected",
"duration_minutes": 6
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/activities');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"subject_type": "contact",
"subject_id": 42,
"type": "call",
"title": "Follow-up call",
"body": "Agreed on the delivery date.",
"direction": "outbound",
"outcome": "connected",
"duration_minutes": 6
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/activities",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"subject_type": "contact",
"subject_id": 42,
"type": "call",
"title": "Follow-up call",
"body": "Agreed on the delivery date.",
"direction": "outbound",
"outcome": "connected",
"duration_minutes": 6,
},
)
print(response.json())
Svar
Logged201
{
"success": true,
"data": {
"id": 89,
"subject_type": "contact",
"subject_id": 42,
"type": "call",
"title": "Follow-up call",
"body": "Agreed on the delivery date.",
"details": {
"direction": "outbound",
"outcome": "connected",
"duration_minutes": 6
},
"actor_user_id": null,
"source": "api",
"pinned": false,
"occurred_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00"
}
}
GET
/api/v1/crm/activities/{id}
Ny
One timeline entry. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/activities/88" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/activities/88", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/activities/88');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/activities/88",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Activity200
{
"success": true,
"data": {
"id": 88,
"subject_type": "contact",
"subject_id": 42,
"type": "note",
"title": "Requirements",
"body": "Needs delivery before the end of the month.",
"details": {},
"actor_user_id": null,
"source": "api",
"pinned": false,
"occurred_at": "2026-10-08T09:30:00+03:00",
"created_at": "2026-10-08T09:30:00+03:00"
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
GET
/api/v1/crm/quotes
Ny
Quotes through the CRM lists engine (same query parameters as List contacts ). Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
q
Nej
ahmed
Free-text search.
filters
Nej
{"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]}
Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view
Nej
all
A saved view id (its filters and sort apply), or `all`.
sort
Nej
created_at
Sort key (see `sorts` in …/schema).
dir
Nej
desc
`asc` or `desc`.
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/quotes" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/quotes", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/quotes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/quotes",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 5,
"number": "Q-2026-0005",
"status": "draft",
"currency": "SAR",
"subtotal": 12000,
"discount_total": 600,
"tax_total": 1710,
"total": 13110,
"issue_date": "2026-10-08",
"valid_until": "2026-10-22",
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"owner_user_id": 3,
"locale": "en",
"terms": "Payment within 14 days.",
"notes": null,
"buyer": {
"name": "Example Trading Co.",
"email": "info@example.com"
},
"items": [
{
"id": 9,
"product_id": 21,
"name": "Epoxy kit 20 kg",
"description": null,
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15,
"total": 13110
}
],
"view_count": 0,
"sent_at": null,
"sent_via": null,
"first_viewed_at": null,
"last_viewed_at": null,
"accepted_at": null,
"declined_at": null,
"public_url": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/quotes/5"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
GET
/api/v1/crm/quotes/schema
Ny
The lists-engine catalogue for quote lists. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/quotes/schema" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/quotes/schema", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/quotes/schema');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/quotes/schema",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Schema200
{
"success": true,
"data": {
"fields": [
{
"key": "name",
"label": "Name",
"type": "text",
"filterable": true,
"sortable": true,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "email",
"label": "Email",
"type": "text",
"filterable": true,
"sortable": false,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "lifecycle",
"label": "Lifecycle stage",
"type": "select",
"filterable": true,
"sortable": true,
"operators": [
"is",
"is_not"
],
"options": [
{
"value": 1,
"label": "Subscriber"
},
{
"value": 2,
"label": "Lead"
},
{
"value": 3,
"label": "Customer"
}
]
}
],
"sorts": [
"name",
"created_at",
"last_activity_at"
],
"default_sort": {
"key": "last_activity_at",
"dir": "desc"
}
}
}
POST
/api/v1/crm/quotes
Ny
Creates a draft quote. Sending it to the customer happens in the panel. Scope: crm.
Fields: deal_id, contact_id, company_id, currency, locale (ar, en), valid_until (YYYY-MM-DD), terms, notes, items[] = {product_id, name, description, qty, unit_price, discount_pct, tax_pct}.
JSON-indhold
{
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"currency": "SAR",
"locale": "en",
"valid_until": "2026-10-22",
"terms": "Payment within 14 days.",
"items": [
{
"product_id": 21,
"name": "Epoxy kit 20 kg",
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15
}
]
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/quotes" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"currency": "SAR",
"locale": "en",
"valid_until": "2026-10-22",
"terms": "Payment within 14 days.",
"items": [
{
"product_id": 21,
"name": "Epoxy kit 20 kg",
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15
}
]
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/quotes", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"currency": "SAR",
"locale": "en",
"valid_until": "2026-10-22",
"terms": "Payment within 14 days.",
"items": [
{
"product_id": 21,
"name": "Epoxy kit 20 kg",
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15
}
]
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/quotes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"currency": "SAR",
"locale": "en",
"valid_until": "2026-10-22",
"terms": "Payment within 14 days.",
"items": [
{
"product_id": 21,
"name": "Epoxy kit 20 kg",
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/quotes",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"currency": "SAR",
"locale": "en",
"valid_until": "2026-10-22",
"terms": "Payment within 14 days.",
"items": [
{
"product_id": 21,
"name": "Epoxy kit 20 kg",
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15,
},
],
},
)
print(response.json())
Svar
Created201
{
"success": true,
"data": {
"id": 5,
"number": "Q-2026-0005",
"status": "draft",
"currency": "SAR",
"subtotal": 12000,
"discount_total": 600,
"tax_total": 1710,
"total": 13110,
"issue_date": "2026-10-08",
"valid_until": "2026-10-22",
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"owner_user_id": 3,
"locale": "en",
"terms": "Payment within 14 days.",
"notes": null,
"buyer": {
"name": "Example Trading Co.",
"email": "info@example.com"
},
"items": [
{
"id": 9,
"product_id": 21,
"name": "Epoxy kit 20 kg",
"description": null,
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15,
"total": 13110
}
],
"view_count": 0,
"sent_at": null,
"sent_via": null,
"first_viewed_at": null,
"last_viewed_at": null,
"accepted_at": null,
"declined_at": null,
"public_url": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/quotes/5"
}
}
GET
/api/v1/crm/quotes/{id}
Ny
One quote with its items. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/quotes/5" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/quotes/5", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/quotes/5');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/quotes/5",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Quote200
{
"success": true,
"data": {
"id": 5,
"number": "Q-2026-0005",
"status": "draft",
"currency": "SAR",
"subtotal": 12000,
"discount_total": 600,
"tax_total": 1710,
"total": 13110,
"issue_date": "2026-10-08",
"valid_until": "2026-10-22",
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"owner_user_id": 3,
"locale": "en",
"terms": "Payment within 14 days.",
"notes": null,
"buyer": {
"name": "Example Trading Co.",
"email": "info@example.com"
},
"items": [
{
"id": 9,
"product_id": 21,
"name": "Epoxy kit 20 kg",
"description": null,
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15,
"total": 13110
}
],
"view_count": 0,
"sent_at": null,
"sent_via": null,
"first_viewed_at": null,
"last_viewed_at": null,
"accepted_at": null,
"declined_at": null,
"public_url": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/quotes/5"
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
PATCH
/api/v1/crm/quotes/{id}
Ny
Draft quotes only; same fields as Draft a quote . Scope: crm.
JSON-indhold
{
"valid_until": "2026-10-29"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/quotes/5" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"valid_until": "2026-10-29"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/quotes/5", {
method: "PATCH",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"valid_until": "2026-10-29"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/quotes/5');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"valid_until": "2026-10-29"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"PATCH",
"https://your-workspace.letsbot.net/api/v1/crm/quotes/5",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"valid_until": "2026-10-29",
},
)
print(response.json())
Svar
Updated200
{
"success": true,
"data": {
"id": 5,
"number": "Q-2026-0005",
"status": "draft",
"currency": "SAR",
"subtotal": 12000,
"discount_total": 600,
"tax_total": 1710,
"total": 13110,
"issue_date": "2026-10-08",
"valid_until": "2026-10-29",
"deal_id": 15,
"contact_id": 42,
"company_id": 7,
"owner_user_id": 3,
"locale": "en",
"terms": "Payment within 14 days.",
"notes": null,
"buyer": {
"name": "Example Trading Co.",
"email": "info@example.com"
},
"items": [
{
"id": 9,
"product_id": 21,
"name": "Epoxy kit 20 kg",
"description": null,
"qty": 40,
"unit_price": 300,
"discount_pct": 5,
"tax_pct": 15,
"total": 13110
}
],
"view_count": 0,
"sent_at": null,
"sent_via": null,
"first_viewed_at": null,
"last_viewed_at": null,
"accepted_at": null,
"declined_at": null,
"public_url": null,
"created_at": "2026-10-08T09:30:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/quotes/5"
}
}
DELETE
/api/v1/crm/quotes/{id}
Ny
Deletes a draft quote. A quote that was already sent answers 409 with code: conflict. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/quotes/5" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/quotes/5", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/quotes/5');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/quotes/5",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deleted200
{
"success": true,
"data": {
"id": 5,
"deleted": true
}
}
Quote already sent409
{
"success": false,
"error": "Only draft quotes can be deleted.",
"code": "conflict"
}
GET
/api/v1/crm/products
Ny
The product catalogue through the CRM lists engine (same query parameters as List contacts ). Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
q
Nej
ahmed
Free-text search.
filters
Nej
{"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]}
Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view
Nej
all
A saved view id (its filters and sort apply), or `all`.
sort
Nej
created_at
Sort key (see `sorts` in …/schema).
dir
Nej
desc
`asc` or `desc`.
page
Nej
1
Page number.
per_page
Nej
25
Rows per page, up to 100.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/products" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/products", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/products');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/products",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
One page200
{
"success": true,
"data": [
{
"id": 21,
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg",
"source": "manual",
"created_at": "2026-09-20T09:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/products/21"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
GET
/api/v1/crm/products/schema
Ny
The lists-engine catalogue for product lists. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/products/schema" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/products/schema", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/products/schema');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/products/schema",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Schema200
{
"success": true,
"data": {
"fields": [
{
"key": "name",
"label": "Name",
"type": "text",
"filterable": true,
"sortable": true,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "email",
"label": "Email",
"type": "text",
"filterable": true,
"sortable": false,
"operators": [
"contains",
"is",
"is_empty",
"is_not_empty"
],
"options": []
},
{
"key": "lifecycle",
"label": "Lifecycle stage",
"type": "select",
"filterable": true,
"sortable": true,
"operators": [
"is",
"is_not"
],
"options": [
{
"value": 1,
"label": "Subscriber"
},
{
"value": 2,
"label": "Lead"
},
{
"value": 3,
"label": "Customer"
}
]
}
],
"sorts": [
"name",
"created_at",
"last_activity_at"
],
"default_sort": {
"key": "last_activity_at",
"dir": "desc"
}
}
}
POST
/api/v1/crm/products
Ny
Adds a product to the catalogue. Scope: crm.
Required: name, price, currency (3 letters). Optional: sku, tax_pct (0–100), is_active, description, image_url.
JSON-indhold
{
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/products" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/products", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/products');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/products",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": True,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg",
},
)
print(response.json())
Svar
Created201
{
"success": true,
"data": {
"id": 21,
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg",
"source": "manual",
"created_at": "2026-09-20T09:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/products/21"
}
}
GET
/api/v1/crm/products/{id}
Ny
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/products/21" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/products/21", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/products/21');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/products/21",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Product200
{
"success": true,
"data": {
"id": 21,
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 300,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg",
"source": "manual",
"created_at": "2026-09-20T09:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/products/21"
}
}
Not found404
{
"success": false,
"error": "Not found.",
"code": "not_found"
}
PATCH
/api/v1/crm/products/{id}
Ny
Only the fields sent change (name, price, currency, sku, tax_pct (0–100), is_active, description, image_url). Scope: crm.
JSON-indhold
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X PATCH "https://your-workspace.letsbot.net/api/v1/crm/products/21" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"price": 320
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/products/21", {
method: "PATCH",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"price": 320
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/products/21');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"price": 320
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"PATCH",
"https://your-workspace.letsbot.net/api/v1/crm/products/21",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"price": 320,
},
)
print(response.json())
Svar
Updated200
{
"success": true,
"data": {
"id": 21,
"name": "Epoxy kit 20 kg",
"sku": "EPX-20",
"price": 320,
"currency": "SAR",
"tax_pct": 15,
"is_active": true,
"description": "Two-part floor epoxy.",
"image_url": "https://example.com/images/epoxy-kit.jpg",
"source": "manual",
"created_at": "2026-09-20T09:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/crm/products/21"
}
}
DELETE
/api/v1/crm/products/{id}
Ny
Removes the product from the catalogue; existing quotes keep their lines. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/products/21" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/products/21", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/products/21');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/products/21",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deleted200
{
"success": true,
"data": {
"id": 21,
"deleted": true
}
}
GET
/api/v1/crm/hooks
Ny
Subscriptions created through the API. Subscriptions made in the panel are managed there. Secrets are never returned again. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/hooks" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/hooks", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/hooks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/hooks",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Subscriptions200
{
"success": true,
"data": [
{
"id": 4,
"url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost"
],
"source": "api",
"description": "Sync won deals to the ERP",
"is_active": true,
"disabled_reason": null,
"created_at": "2026-10-08T09:30:00+03:00"
}
]
}
GET
/api/v1/crm/hooks/events
Ny
The event catalogue: every event name with its object. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/hooks/events" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/hooks/events", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/hooks/events');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/hooks/events",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Events200
{
"success": true,
"data": [
{
"event": "contact.created",
"object": "contact"
},
{
"event": "contact.updated",
"object": "contact"
},
{
"event": "contact.deleted",
"object": "contact"
},
{
"event": "company.created",
"object": "company"
},
{
"event": "company.updated",
"object": "company"
},
{
"event": "company.deleted",
"object": "company"
},
{
"event": "deal.created",
"object": "deal"
},
{
"event": "deal.updated",
"object": "deal"
},
{
"event": "deal.deleted",
"object": "deal"
},
{
"event": "deal.stage_changed",
"object": "deal"
},
{
"event": "deal.won",
"object": "deal"
},
{
"event": "deal.lost",
"object": "deal"
},
{
"event": "task.created",
"object": "task"
},
{
"event": "task.completed",
"object": "task"
},
{
"event": "ticket.created",
"object": "ticket"
},
{
"event": "quote.sent",
"object": "quote"
},
{
"event": "quote.viewed",
"object": "quote"
},
{
"event": "quote.accepted",
"object": "quote"
}
]
}
GET
/api/v1/crm/hooks/sample
Ny
One sample event built from the newest record of that object (an empty list when there is none) — for trigger setup screens in Zapier, Make or n8n. Scope: crm.
Forespørgselsparametre
Parameter Påkrævet Eksempel Beskrivelse
event
Ja
deal.won
The event name (see *List webhook events*).
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -G "https://your-workspace.letsbot.net/api/v1/crm/hooks/sample" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
--data-urlencode "event=deal.won"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/hooks/sample?event=deal.won", {
method: "GET",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/hooks/sample?event=deal.won');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"GET",
"https://your-workspace.letsbot.net/api/v1/crm/hooks/sample",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
params={
"event": "deal.won",
},
)
print(response.json())
Svar
Sample200
{
"success": true,
"data": [
{
"id": "9b1f3c2e-7a4d-4e8b-9c1a-2f3e4d5c6b7a",
"event": "deal.won",
"object": "deal",
"record_id": 15,
"occurred_at": "2026-10-08T09:30:00+03:00",
"data": {
"id": 15,
"title": "Epoxy kit order — 40 units",
"amount": 12000,
"currency": "SAR",
"pipeline_id": 1,
"stage": {
"id": 13,
"name": "Won"
},
"status": "won",
"expected_close_date": "2026-10-31",
"contact": {
"id": 42,
"name": "Ahmed Ali",
"phone": "966500000000"
},
"company_id": 7,
"owner": {
"id": 3,
"name": "Sara Ahmed"
},
"lost_reason_id": null,
"lost_note": null,
"won_at": "2026-10-08T09:30:00+03:00",
"lost_at": null,
"custom_fields": {},
"created_at": "2026-10-02T10:00:00+03:00",
"updated_at": "2026-10-08T09:30:00+03:00",
"url": "https://your-workspace.letsbot.net/panel/v2/deals?deal=15&pipeline=1"
},
"previous": {
"stage_id": 12,
"status": "open"
}
}
]
}
POST
/api/v1/crm/hooks
Ny
Zapier / Make / n8n REST-hook subscribe. Scope: crm.
Fields: target_url (or url), event (or events[]), optional source (zapier, make, n8n, api) and description. Up to 50 subscriptions per workspace; at most 30 subscribe calls per minute per key.
The answer carries the signing secret once — store it. Deliveries are signed with X-LetsBot-Signature (see the CRM section above).
JSON-indhold
{
"target_url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost"
],
"source": "api",
"description": "Sync won deals to the ERP"
}
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X POST "https://your-workspace.letsbot.net/api/v1/crm/hooks" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost"
],
"source": "api",
"description": "Sync won deals to the ERP"
}'
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/hooks", {
method: "POST",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"target_url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost"
],
"source": "api",
"description": "Sync won deals to the ERP"
}),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/hooks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"target_url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost"
],
"source": "api",
"description": "Sync won deals to the ERP"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"POST",
"https://your-workspace.letsbot.net/api/v1/crm/hooks",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"target_url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost",
],
"source": "api",
"description": "Sync won deals to the ERP",
},
)
print(response.json())
Svar
Subscribed201
{
"success": true,
"data": {
"id": 4,
"url": "https://hooks.example.com/letsbot/crm",
"events": [
"deal.won",
"deal.lost"
],
"source": "api",
"description": "Sync won deals to the ERP",
"is_active": true,
"disabled_reason": null,
"created_at": "2026-10-08T09:30:00+03:00",
"secret": "whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
URL not https422
{
"success": false,
"error": "The URL must start with https://.",
"code": "validation_failed",
"errors": {
"url": [
"The URL must start with https://."
]
}
}
DELETE
/api/v1/crm/hooks/{id}
Ny
Deletes a subscription made through the API. Scope: crm.
Eksempel på forespørgsel
cURL
JavaScript
PHP
Python
Kopiér
curl -X DELETE "https://your-workspace.letsbot.net/api/v1/crm/hooks/4" \
-H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
-H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/hooks/4", {
method: "DELETE",
headers: {
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/hooks/4');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
'Accept: application/json',
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests
response = requests.request(
"DELETE",
"https://your-workspace.letsbot.net/api/v1/crm/hooks/4",
headers={
"X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
"Accept": "application/json",
},
)
print(response.json())
Svar
Deleted200
{
"success": true,
"data": {
"id": 4,
"deleted": true
}
}