LetsBot Menu
Mulai Sekarang Bahasa Indonesia Bahasa

Meta Business Partner Perusahaan Terdaftar di Inggris

Bahasa

Developer · API v1

Referensi API LetsBot

Kirim pesan, template, dan media WhatsApp, kelola percakapan dan kontak, serta baca riwayat pesan — lewat HTTPS dan JSON.

154 endpoint terdokumentasi · 79 di antaranya tidak ada di halaman Postman lama · Ringkasan developer

POST /api/v1/message/send
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=السلام عليكم"
URL dasar https://letsbot.net/api/v1 · setiap endpoint di bawah punya kode siap salin.

Dasar

Sebelum permintaan pertama Anda

URL dasar, cara autentikasi, bentuk error, batas permintaan, dan cara mengulang pengiriman dengan aman.

URL dasar

https://letsbot.net/api/v1

API CRM berada di domain milik workspace Anda: https://{workspace}.letsbot.net/api/v1/crm

Autentikasi

Dapatkan kunci API Anda

  1. Masuk ke panel LetsBot sebagai pemilik akun.
  2. Buka API → Data Autentikasi.
  3. Salin kunci nomor yang akan mengirim, lalu kirim di header ini: Authorization: Bearer <lb_api_key>

API berfungsi selama uji coba gratis atau dengan add-on API Access. Setiap nomor yang terhubung punya kunci sendiri, dan kunci menentukan nomor mana yang mengirim.

API CRM memakai kunci workspace: Integrasi → Zapier → Kunci API, dengan cakupan crm dicentang. X-Zapier-Api-Key: <key>

Batas permintaan

1.000 permintaan per menit per kunci API. Di atas itu Anda mendapat 429 dengan header Retry-After.

Error

JSON with Status: false and a Message. 401 means a missing or wrong key; 402 means the subscription or API add-on is not active. Validation failures are not uniform by default: most endpoints answer HTTP 202 with "Status": 0 and the first error in Message (a historic contract, for example message/send without a body), and the Live Chat endpoints answer 422 with "message": "error". We recommend strict validation: send the header X-LetsBot-Validation: strict (or Prefer: validation=strict) and those endpoints answer HTTP 422 with {"message": ..., "errors": {...}} listing every failing field. Without the header nothing changes. Read Status in the body, not only the HTTP code. Each endpoint lists its own responses.

Ringkasan kode status

StatusArtinyaYang harus dilakukan
202
"Status": 0
Permintaan ditolak oleh validasi (mode bawaan). Body berisi "Status": 0 dan error pertama. Baca Message. Kirim X-LetsBot-Validation: strict untuk mendapat 422 dengan semua field yang salah.
401
lb_api_key Incorrect
Kunci API tidak ada atau salah. Kirim Authorization: Bearer dengan kunci dari API → Data Autentikasi.
402
SUBSCRIPTION_EXPIRED · API_ADDON_REQUIRED
Langganan berakhir, atau paket tidak memiliki add-on API Access. Perpanjang langganan atau tambahkan API Access di panel.
403
No tenant associated with this channel
Kunci tidak terhubung ke workspace aktif, atau tindakan tidak diizinkan. Pastikan Anda memakai kunci yang benar; hubungi dukungan jika berlanjut.
409
idempotency_request_in_progress · idempotency_outcome_unknown
Permintaan dengan Idempotency-Key yang sama masih berjalan, atau hasilnya tidak diketahui. Tunggu detik Retry-After lalu ulangi dengan kunci yang sama, atau periksa status pesan.
422
errors{} · idempotency_key_reused
Validasi ketat gagal, atau Idempotency-Key dipakai ulang untuk permintaan lain. Perbaiki field di errors, atau gunakan kunci baru untuk pesan baru.
429
Retry-After · automation_daily_limit_reached
Terlalu banyak permintaan, atau batas kirim harian workspace tercapai. Tunggu detik Retry-After. Batas harian dapat diubah di panel.

Pengulangan idempoten

Tambahkan header Idempotency-Key pada pengiriman dan ulangi pada setiap percobaan: pesan tidak pernah terkirim dua kali. Aturan lengkapnya:

Retrying a send after a timeout or a dropped connection can deliver the message twice. To prevent that, send an Idempotency-Key: <your-unique-id> header on the original request and repeat the same key on every retry of it. It works on every endpoint that sends a message, forwards a message or shares a catalog. A key can be any string (a UUID works well); it is scoped to your workspace and lasts 24 hours from first use. Without the header nothing changes.

  • Retry of a request that was sent: the original response is returned again with the header Idempotent-Replayed: true. Nothing is sent a second time.
  • Same key, different request (another phone, text, file, channel or endpoint): 422 with "code": "idempotency_key_reused". Nothing is sent. Use a new key for a new message.
  • First request still running: 409 with "code": "idempotency_request_in_progress" and a Retry-After header. Retry with the same key after that many seconds to get its result.
  • First request failed with a 5xx: 409 with "code": "idempotency_outcome_unknown". It may or may not have been sent, so nothing is sent now. Check the message status, or send with a new key.
  • First request was refused (a 4xx, or a body with "Status": false or 0 — including the 202 validation failure): the key is released and the retry is sent normally.

Event

Webhook

LetsBot mengirim HTTP POST ke URL Anda saat pesan masuk, status berubah, atau pesanan bergerak.

Atur URL di panel pada API → Webhook. Setiap pengiriman tercatat di API → Log webhook.

Setiap pengiriman berupa JSON dengan bentuk ini:

POST https://your-server.example/webhook
Content-Type: application/json
Signature: <hex HMAC-SHA256 of the raw body, key "Letsbot">

{
  "event": "message_notification",
  "data": { ... }
}

Header Signature sama untuk semua workspace, jadi tidak membuktikan pengirim. Tambahkan header kustom rahasia ke webhook dan periksa di server Anda.

Asisten AI

Hubungkan Claude atau ChatGPT (MCP)

API yang sama sebagai server MCP: Claude dan ChatGPT dapat membaca dan bertindak di workspace LetsBot Anda tanpa kode.

URL server MCP

https://letsbot.net/mcp
  • Claude: buka direktori konektor di Claude, cari LetsBot, lalu tambahkan.
  • ChatGPT: tambahkan aplikasi LetsBot dari direktori aplikasi ChatGPT.
  • Klien MCP lain: gunakan URL di atas dengan Authorization: Bearer dan kunci API Anda.

Bagian dari add-on API + MCP, dan tersedia selama uji coba gratis.

Endpoint

Semua endpoint /api/v1

Dikelompokkan per area, masing-masing dengan parameter, kode dalam empat bahasa, dan contoh respons.

Messages

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

POST /api/v1/send/file

Media › send file message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send Image message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send video message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send gif message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send audio message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send location message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send ptt (push to talk) message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send contact #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Media › send buttons (alias of /button) #

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

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

Channels: official WhatsApp Cloud API and QR channels.

Body JSON

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

Contoh permintaan

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

Message › send text message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Message › send sticker #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Message › send reaction #

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

Field formulir

FieldContoh
phone{{phone}}
reaction❤️
messageIdBAE5F2C25476F607

Contoh permintaan

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())

Respons

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

Message › send reply #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Message › send mention #

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

Field formulir

FieldContoh
phone{{phone}}
mention{{phone}}

Contoh permintaan

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())

Respons

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

Message › send disappearing message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Message › send share catalog message #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Message › get message by Id #

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

Parameter kueri

ParameterWajibContohDeskripsi
phone Ya {{phone}} phone number with country code
messageID Ya BAE5690364E55771 Message Id

Contoh permintaan

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())

Respons

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

Message › Fetch messages #

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.

Contoh permintaan

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())

Respons

Fetch Messages200
(body kosong)
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

Message › delete message by Id #

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

Parameter kueri

ParameterWajibContohDeskripsi
phone Ya {{phone}}
messageID Ya BAE509D204172AC0

Field formulir

FieldContoh
phone{{phone}}
messageIDBAE509D204172AC0

Contoh permintaan

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())

Respons

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

Message › forward message #

Forward a stored message to another phone number.

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

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

Field formulir

FieldContoh
phone{{phone}}
messageId3EB0C4F1A2B3D4E5F6

Contoh permintaan

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

Buttons › send buttons message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons › send button with image message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons › send buttons with video message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons › send buttons with location message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons › send buttons with document message #

You can send message templates via whatsapp with this api

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons › send carousel (Messenger / Instagram) #

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

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

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

Channels: Messenger and Instagram channels only; not WhatsApp.

Body 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"
    }
  ]
}

Contoh permintaan

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

Buttons Templates › send buttons template message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons Templates › send buttons template with image message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons Templates › send buttons template with document message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons Templates › send buttons template with video messag #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Buttons Templates › send buttons template with location messag #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

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

Send List Message › send list message #

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

Field formulir

FieldContoh
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

Contoh permintaan

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())

Respons

Success Response200
(body kosong)
Failed Response202
(body kosong)

group

POST /api/v1/invite/code

Invite to group › generate Invite code #

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

Field formulir

FieldContoh
jid120363057244685240@g.us

Contoh permintaan

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())

Respons

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

Invite to group › revoke Invite code #

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

Field formulir

FieldContoh
jid120363057244685240@g.us

Contoh permintaan

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())

Respons

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

Invite to group › send invite link #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Invite to group › proup get Invite Info #

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

Parameter kueri

ParameterWajibContohDeskripsi
code Ya KXDixa04zE73bgj5LIWhJ7

Contoh permintaan

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())

Respons

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

Group Participant › demote group participant #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Group Participant › add group participant #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Group Participant › remove group participant #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

Group Participant › promote group participant #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

group settings › get display picture #

get group image by jid parameter value must be group id

Parameter kueri

ParameterWajibContohDeskripsi
jid Ya 120363061829425867@g.us

Contoh permintaan

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())

Respons

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

group settings › set display picture #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

group settings › rename group #

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

Field formulir

FieldContoh
jid120363057244685240@g.us
subjectTest Group 2

Contoh permintaan

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())

Respons

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

group settings › set group description #

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

Field formulir

FieldContoh
jid120363057244685240@g.us
descriptionThis is test group

Contoh permintaan

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())

Respons

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

group settings › change group settings #

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

Field formulir

FieldContoh
jid120363057244685240@g.us
settingsnot_announcement

Contoh permintaan

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())

Respons

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

get group list #

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

Contoh permintaan

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())

Respons

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

get group conversation #

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

Parameter kueri

ParameterWajibContohDeskripsi
jid Ya {{jid1}}

Contoh permintaan

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())

Respons

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

get group metadata #

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

Parameter kueri

ParameterWajibContohDeskripsi
jid Ya {{jid}}

Contoh permintaan

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())

Respons

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

create group #

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

Field formulir

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

Contoh permintaan

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())

Respons

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

join group #

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

Field formulir

FieldContoh
code{{code}}

Contoh permintaan

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())

Respons

Success Response200
(body kosong)
Failed Response200
(body kosong)

Chat

GET /api/v1/chat/list

get chat list for phone #

List conversations, most recent first.

Official WhatsApp Cloud API numbers: served from your LetsBot workspace — every conversation with at least one message, newest last_message_date first, with cursor pagination (limit, cursor, next_cursor). Each item: id (chat id), contact_id, phone, name, platform, is_group, is_archived, is_pinned, last_message_date (ISO-8601, UTC).

QR (WhatsApp Web) numbers: unchanged — the chats of the WhatsApp session.

To read the messages themselves use Message Archive → Get messages by date (phone narrows it to one conversation).

Parameter kueri

ParameterWajibContohDeskripsi
platform Tidak all Optional, official numbers only. Same as on `contacts`: default is the platform of the channel whose key you use; `all` for every platform.
limit Tidak 50 Optional, official numbers only. Page size, default 50, maximum 200.
cursor Tidak Optional, official numbers only. Pass `next_cursor` from the previous response, unchanged.

Contoh permintaan

curl -G "https://letsbot.net/api/v1/chat/list" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/chat/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/chat/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/chat/list",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Respons

200 — official number200
{
    "success": true,
    "Status": true,
    "source": "archive",
    "channel": {
        "id": 2,
        "global_id": "8f0c2a4e-5b1d-4c3a-9e7f-0a1b2c3d4e5f",
        "phone": "966500000000",
        "platform": "whatsapp",
        "is_official": true
    },
    "data": [
        {
            "id": "966512345678@s.whatsapp.net",
            "contact_id": 184,
            "phone": "966512345678",
            "name": "Karim Store",
            "platform": "whatsapp",
            "is_group": false,
            "is_archived": false,
            "is_pinned": false,
            "last_message_date": "2026-09-29T09:14:02+00:00"
        }
    ],
    "next_cursor": null
}
GET /api/v1/chat/conversation

get chat conversation for phone #

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

Channels: QR (WhatsApp Web) channels only. On an official WhatsApp Cloud API number this request answers 409 with "error_code": "USE_MESSAGES_ARCHIVE" and a ready-made use.example URL — call that instead.

To read stored messages on any channel, use Message Archive → Get messages by date with phone=<number>.

Parameter kueri

ParameterWajibContohDeskripsi
phone Ya {{phone2}}
limit Ya 25
cursorId Ya REDACTED
cursorFromMe Ya true

Contoh permintaan

curl -G "https://letsbot.net/api/v1/chat/conversation" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone={{phone2}}" \
  --data-urlencode "limit=25" \
  --data-urlencode "cursorId=REDACTED" \
  --data-urlencode "cursorFromMe=true"
const response = await fetch("https://letsbot.net/api/v1/chat/conversation?phone=%7B%7Bphone2%7D%7D&limit=25&cursorId=REDACTED&cursorFromMe=true", {
  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/chat/conversation?phone=%7B%7Bphone2%7D%7D&limit=25&cursorId=REDACTED&cursorFromMe=true');

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/chat/conversation",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    params={
        "phone": "{{phone2}}",
        "limit": "25",
        "cursorId": "REDACTED",
        "cursorFromMe": "true",
    },
)

print(response.json())

Respons

success response200
(body kosong)
409 — official number409
{
    "success": false,
    "Status": false,
    "error_code": "USE_MESSAGES_ARCHIVE",
    "Message": "GET /api/v1/chat/conversation 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"
    }
}
GET /api/v1/contacts

get contacts #

List the contacts of your workspace.

Official WhatsApp Cloud API numbers: served from your LetsBot workspace (the same contacts you see in Live Chat), with search, an incremental-sync filter (updated_since) and cursor pagination. The response says "source": "archive" and includes channel, the number whose key made the request.

QR (WhatsApp Web) numbers: unchanged — the phone's address book as the WhatsApp session reports it (id = WhatsApp id, name, notify = profile name, image when available). The filters below do not apply there.

Contacts are workspace-wide: one customer is one contact whichever of your numbers they wrote to.

Each contact (official numbers)

  • id — the WhatsApp chat id (<number>@s.whatsapp.net); contact_id — the LetsBot contact id.
  • phone — the customer's number, or null when WhatsApp only gave us a private identity (a customer who hides their number behind a username).
  • name, notify (WhatsApp profile name), lb_name (name saved in LetsBot), email, image.
  • platform, is_group, is_archived, is_blocked.
  • last_message_date, created_at, updated_at — ISO-8601, UTC.

Pagination: ordered by contact_id. Repeat the request with cursor=<next_cursor> until next_cursor is null.

Errors: 422 for an invalid parameter or cursor; 401 for a missing or wrong key; 402 when the subscription or API add-on is not active.

Parameter kueri

ParameterWajibContohDeskripsi
search Tidak Karim Optional, at least 2 characters. Matches the contact's name, saved name, WhatsApp profile name or number.
phone Tidak {{phone}} Optional. One contact by number (international format, digits; a leading `+` is accepted).
updated_since Tidak 2026-09-01 Optional. Only contacts created or changed since this moment. `YYYY-MM-DD` or an ISO-8601 datetime, read in `timezone`. For an incremental sync, store the newest `updated_at` you received and pass it next time.
timezone Tidak UTC Optional, default `UTC`. IANA timezone used to read `updated_since`. Returned timestamps are always UTC.
include_groups Tidak 1 Optional. `1` also returns WhatsApp groups. By default only people are returned.
platform Tidak all Optional. Default: the platform of the channel whose key you use (WhatsApp for a WhatsApp number). `messenger`, `instagram`, `telegram`, ... for one platform, or `all`.
limit Tidak 50 Optional. Page size, default 50, maximum 200.
cursor Tidak Optional. Pass `next_cursor` from the previous response, unchanged, to get the next page. `null` means there are no more pages.

Contoh permintaan

curl -G "https://letsbot.net/api/v1/contacts" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/contacts", {
  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/contacts');

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/contacts",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Respons

200 — official number (first page)200
{
    "success": true,
    "Status": true,
    "source": "archive",
    "channel": {
        "id": 2,
        "global_id": "8f0c2a4e-5b1d-4c3a-9e7f-0a1b2c3d4e5f",
        "phone": "966500000000",
        "platform": "whatsapp",
        "is_official": true
    },
    "data": [
        {
            "id": "966512345678@s.whatsapp.net",
            "contact_id": 184,
            "phone": "966512345678",
            "name": "Karim Store",
            "notify": "Karim",
            "lb_name": "Karim Store",
            "email": null,
            "image": null,
            "platform": "whatsapp",
            "is_group": false,
            "is_archived": false,
            "is_blocked": false,
            "last_message_date": "2026-09-29T09:14:02+00:00",
            "created_at": "2026-05-02T11:40:00+00:00",
            "updated_at": "2026-09-29T09:14:02+00:00"
        }
    ],
    "next_cursor": "eyJpIjoxODR9"
}
POST /api/v1/chat/typing

set typing #

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

Field formulir

FieldContoh
chat{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/typing" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "chat=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/typing", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "chat": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/typing');

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([
        'chat' => '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/chat/typing",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "chat": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

set recording #

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

Field formulir

FieldContoh
chat{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/recording" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "chat=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/recording", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "chat": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/recording');

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([
        'chat' => '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/chat/recording",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "chat": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

read chat #

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/read" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/read", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/read');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/read",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

unread chat #

You can un read phone chat number.

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/unread" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/unread", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/unread');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/unread",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

archive chat #

You can archive chat phone number.

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/archive" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/archive", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/archive');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/archive",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

unarchive chat #

You can un archive chat phone number.

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/unarchive" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/unarchive", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/unarchive');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/unarchive",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

mute chat #

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

Field formulir

FieldContoh
phone{{phone}}
duration60

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/mute" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "duration=60"
const response = await fetch("https://letsbot.net/api/v1/chat/mute", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "duration": "60",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/mute');

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',
        '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/chat/mute",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "duration": "60",
    },
)

print(response.json())

Respons

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

unmute chat #

You can un mute phone chat number.

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/unmute" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/unmute", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/unmute');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/unmute",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

pin chat #

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/pin" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/chat/pin", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/pin');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/pin",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

unpin chat #

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

Field formulir

FieldContoh
phone{{phone}}
phone{{GROUP_TEST}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/chat/unpin" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "phone={{GROUP_TEST}}"
const response = await fetch("https://letsbot.net/api/v1/chat/unpin", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "{{GROUP_TEST}}",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/chat/unpin');

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' => '{{GROUP_TEST}}',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/chat/unpin",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "{{GROUP_TEST}}",
    },
)

print(response.json())

Respons

Success Response200
(body kosong)
POST /api/v1/check/phone Baru

check phone on WhatsApp #

Check whether a phone number has a WhatsApp account.

Required: phone (international format, digits).

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/check/phone" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/check/phone", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/check/phone');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/check/phone",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Users

POST /api/v1/user/presence Baru

presence user #

Get user presence status.

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/presence" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/user/presence", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/presence');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/user/presence",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

disply picture by user #

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

Parameter kueri

ParameterWajibContohDeskripsi
phone Ya {{phone}}
phone Ya {{phone}}

Contoh permintaan

curl -G "https://letsbot.net/api/v1/user/display/picture" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone=9665xxxxxxxx" \
  --data-urlencode "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/user/display/picture?phone=%7B%7Bphone%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/user/display/picture?phone=%7B%7Bphone%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/user/display/picture",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    params={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

block number #

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

Field formulir

FieldContoh
phone{{phone2}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/block" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone2}}"
const response = await fetch("https://letsbot.net/api/v1/user/block", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "{{phone2}}",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/block');

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' => '{{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/user/block",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "{{phone2}}",
    },
)

print(response.json())

Respons

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

unblock number #

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

Field formulir

FieldContoh
phone{{phone2}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/unblock" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone2}}"
const response = await fetch("https://letsbot.net/api/v1/user/unblock", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "{{phone2}}",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/unblock');

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' => '{{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/user/unblock",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "{{phone2}}",
    },
)

print(response.json())

Respons

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

user business profile #

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/business" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/user/business", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/business');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/user/business",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

set profile name #

You can set profile name of phone number.

Field formulir

FieldContoh
phone{{phone2}}
nameProfile Name

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/set/name" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone={{phone2}}" \
  -F "name=Profile Name"
const response = await fetch("https://letsbot.net/api/v1/user/set/name", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "{{phone2}}",
    "name": "Profile Name",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/set/name');

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' => '{{phone2}}',
        'name' => 'Profile Name',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/user/set/name",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "{{phone2}}",
        "name": "Profile Name",
    },
)

print(response.json())

Respons

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

get user status #

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

Required: phone.

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/user/status", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/status');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/user/status",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())
POST /api/v1/user/set/status Baru

set my status #

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

Required: status.

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

Field formulir

FieldContoh
statusAvailable 9:00–18:00

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/set/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "status=Available 9:00–18:00"
const response = await fetch("https://letsbot.net/api/v1/user/set/status", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "status": "Available 9:00–18:00",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/set/status');

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([
        'status' => 'Available 9:00–18:00',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/user/set/status",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "status": "Available 9:00–18:00",
    },
)

print(response.json())
POST /api/v1/user/set/display/picture Baru

set my display picture #

Set the profile picture of your connected number.

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

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

Field formulir

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

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/user/set/display/picture" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "image=https://example.com/logo.jpg"
const response = await fetch("https://letsbot.net/api/v1/user/set/display/picture", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "image": "https://example.com/logo.jpg",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/user/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([
        'phone' => '9665xxxxxxxx',
        'image' => 'https://example.com/logo.jpg',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/user/set/display/picture",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "image": "https://example.com/logo.jpg",
    },
)

print(response.json())

Live Chat

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

GET /api/v1/live_chat/contact

get contact #

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

Required: phone.

Response: data = {id, phone, labels[], moderators[]}, plus whatsapp_bsuid, whatsapp_username and phone_available where WhatsApp usernames are on (see below).

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.

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

Parameter kueri

ParameterWajibContohDeskripsi
phone Ya {{phone}} Contact phone number

Contoh permintaan

curl -G "https://letsbot.net/api/v1/live_chat/contact" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/live_chat/contact?phone=%7B%7Bphone%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/live_chat/contact?phone=%7B%7Bphone%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/live_chat/contact",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    params={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

Contact200
{
  "data": {
    "id": 42,
    "phone": "966500000000",
    "labels": [
      {
        "id": 5,
        "name": "VIP",
        "name_translations": {
          "en": "VIP"
        },
        "color": "#6D28D9",
        "status": null
      }
    ],
    "moderators": [
      {
        "id": 3,
        "name": "Sara Ahmed",
        "email": "sara@example.com",
        "phone": "966511111111",
        "is_ai_agent": false
      }
    ],
    "whatsapp_bsuid": null,
    "whatsapp_username": "ahmed_store",
    "phone_available": true
  }
}
GET /api/v1/live_chat/moderators

list team members #

List the team members who can be assigned to conversations.

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

Contoh permintaan

curl -G "https://letsbot.net/api/v1/live_chat/moderators" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/live_chat/moderators", {
  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/live_chat/moderators');

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/live_chat/moderators",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())
POST /api/v1/live_chat/set-moderator

assign team member to contact #

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

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

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

Field formulir

FieldContoh
phone{{phone}}
moderator_id3

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/live_chat/set-moderator" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "moderator_id=3"
const response = await fetch("https://letsbot.net/api/v1/live_chat/set-moderator", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "moderator_id": "3",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/live_chat/set-moderator');

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',
        'moderator_id' => '3',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/live_chat/set-moderator",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "moderator_id": "3",
    },
)

print(response.json())
GET /api/v1/live_chat/labels

list labels #

List contact labels.

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

Contoh permintaan

curl -G "https://letsbot.net/api/v1/live_chat/labels" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/live_chat/labels", {
  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/live_chat/labels');

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/live_chat/labels",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())
POST /api/v1/live_chat/set-label

add label to contact #

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

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

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

Field formulir

FieldContoh
phone{{phone}}
label_id5

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/live_chat/set-label" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "label_id=5"
const response = await fetch("https://letsbot.net/api/v1/live_chat/set-label", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "label_id": "5",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/live_chat/set-label');

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',
        'label_id' => '5',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/live_chat/set-label",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "label_id": "5",
    },
)

print(response.json())

Instances

GET /api/v1/instance/status

status #

Get the connection state of your WhatsApp number (connected or not) — no fields needed.

Contoh permintaan

curl -G "https://letsbot.net/api/v1/instance/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/instance/status", {
  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/instance/status');

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/instance/status",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Respons

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

set status #

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

Field formulir

FieldContoh
status343434

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/instance/set/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "status=343434"
const response = await fetch("https://letsbot.net/api/v1/instance/set/status", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "status": "343434",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/instance/set/status');

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([
        'status' => '343434',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/instance/set/status",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "status": "343434",
    },
)

print(response.json())

Respons

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

set Settings #

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

Field formulir

FieldContoh
markOnlineOnConnect1

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/instance/set/settings" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "markOnlineOnConnect=1"
const response = await fetch("https://letsbot.net/api/v1/instance/set/settings", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "markOnlineOnConnect": "1",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/instance/set/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([
        'markOnlineOnConnect' => '1',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/instance/set/settings",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "markOnlineOnConnect": "1",
    },
)

print(response.json())

Respons

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

set presence #

Show a presence state in one chat (online, typing, recording…). Required: phone (the customer's number, e.g. 9665xxxxxxxx, or a group id xxxxxxx@g.us) and presence (one of unavailable, available, composing, recording, paused).

Field formulir

FieldContoh
presenceavailable
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/instance/set/presence" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "presence=available" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/instance/set/presence", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "presence": "available",
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/instance/set/presence');

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([
        'presence' => 'available',
        'phone' => '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/instance/set/presence",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "presence": "available",
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

pending query broadcast #

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

Field formulir

FieldContoh
broadcasttest

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/instance/query/broadcast" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "broadcast=test"
const response = await fetch("https://letsbot.net/api/v1/instance/query/broadcast", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "broadcast": "test",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/instance/query/broadcast');

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([
        'broadcast' => 'test',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/instance/query/broadcast",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "broadcast": "test",
    },
)

print(response.json())

Respons

Success Response200
(body kosong)
Failed Response202
(body kosong)

product

POST /api/v1/product Baru

get products #

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/product" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/product", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/product');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/product",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

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

get products by id #

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

Parameter kueri

ParameterWajibContohDeskripsi
phone Ya {{phone}} phone number with country code
productId Ya 6198355910228429

Contoh permintaan

curl -G "https://letsbot.net/api/v1/product/id" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone=9665xxxxxxxx" \
  --data-urlencode "productId=6198355910228429"
const response = await fetch("https://letsbot.net/api/v1/product/id?phone=%7B%7Bphone%7D%7D&productId=6198355910228429", {
  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/product/id?phone=%7B%7Bphone%7D%7D&productId=6198355910228429');

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/product/id",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    params={
        "phone": "9665xxxxxxxx",
        "productId": "6198355910228429",
    },
)

print(response.json())

Respons

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

create products #

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

Field formulir

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

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/product/create" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "name=product name" \
  -F "description=product description" \
  -F "price=1000" \
  -F "currency=EGP" \
  -F "isHidden=0" \
  -F "images[0][url]=https://letsbot.net/public/uploads/8fe87007-20f4-4730-96e9-f6a9bc806dbc/groupMessages/60/soca-company-112923571820220811041023AM.jpg"
const response = await fetch("https://letsbot.net/api/v1/product/create", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "name": "product name",
    "description": "product description",
    "price": "1000",
    "currency": "EGP",
    "isHidden": "0",
    "images[0][url]": "https://letsbot.net/public/uploads/8fe87007-20f4-4730-96e9-f6a9bc806dbc/groupMessages/60/soca-company-112923571820220811041023AM.jpg",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/product/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([
        'phone' => '9665xxxxxxxx',
        'name' => 'product name',
        'description' => 'product description',
        'price' => '1000',
        'currency' => 'EGP',
        'isHidden' => '0',
        'images[0][url]' => 'https://letsbot.net/public/uploads/8fe87007-20f4-4730-96e9-f6a9bc806dbc/groupMessages/60/soca-company-112923571820220811041023AM.jpg',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/product/create",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "name": "product name",
        "description": "product description",
        "price": "1000",
        "currency": "EGP",
        "isHidden": "0",
        "images[0][url]": "https://letsbot.net/public/uploads/8fe87007-20f4-4730-96e9-f6a9bc806dbc/groupMessages/60/soca-company-112923571820220811041023AM.jpg",
    },
)

print(response.json())

Respons

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

get order #

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

Field formulir

FieldContoh
phone{{phone}}
orderID456
orderToken

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/product/get/order" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx" \
  -F "orderID=456" \
  -F "orderToken="
const response = await fetch("https://letsbot.net/api/v1/product/get/order", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
    "orderID": "456",
    "orderToken": "",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/product/get/order');

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',
        'orderID' => '456',
        'orderToken' => '',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/product/get/order",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
        "orderID": "456",
        "orderToken": "",
    },
)

print(response.json())

Respons

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

get collections #

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

Field formulir

FieldContoh
phone{{phone}}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/product/get/collections" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -F "phone=9665xxxxxxxx"
const response = await fetch("https://letsbot.net/api/v1/product/get/collections", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
  },
  body: new URLSearchParams({
    "phone": "9665xxxxxxxx",
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/product/get/collections');

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',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "POST",
    "https://letsbot.net/api/v1/product/get/collections",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    data={
        "phone": "9665xxxxxxxx",
    },
)

print(response.json())

Respons

Success Response200
(body kosong)

QR

POST /api/v1/qr Baru

qr #

here you can query check your QRCode

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/qr" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/qr", {
  method: "POST",
  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/qr');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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(
    "POST",
    "https://letsbot.net/api/v1/qr",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Respons

success response200
(body kosong)

Sessions

POST /api/v1/session/find Baru

find session #

in this query you can find your session

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/session/find" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/session/find", {
  method: "POST",
  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/session/find');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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(
    "POST",
    "https://letsbot.net/api/v1/session/find",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Respons

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

session status #

use this link to check your session is authenticated

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/session/status" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://letsbot.net/api/v1/session/status", {
  method: "POST",
  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/session/status');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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(
    "POST",
    "https://letsbot.net/api/v1/session/status",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Respons

success response200
(body kosong)
failed response200
(body kosong)

Templates (Official API)

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

Important Notes:

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

Send Template Message (Full Featured) #

Send any WhatsApp template message with full component support.

Supports:

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

Example for added_to_course template:

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

Body JSON

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

Contoh permintaan

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

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/template/send');

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",
        "template_name": "added_to_course",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "text",
                "parameters": [
                    {
                        "type": "text",
                        "text": "تأكيد التسجيل"
                    }
                ]
            },
            "body": [
                "أحمد",
                "دورة البرمجة المتقدمة"
            ],
            "buttons": [
                {
                    "index": 0,
                    "sub_type": "url",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "app/course/123"
                        }
                    ]
                },
                {
                    "index": 1,
                    "sub_type": "url",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "store/app/456"
                        }
                    ]
                }
            ]
        }
    }
    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/template/send",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "phone": "9665xxxxxxxx",
        "template_name": "added_to_course",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "text",
                "parameters": [
                    {
                        "type": "text",
                        "text": "تأكيد التسجيل",
                    },
                ],
            },
            "body": [
                "أحمد",
                "دورة البرمجة المتقدمة",
            ],
            "buttons": [
                {
                    "index": 0,
                    "sub_type": "url",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "app/course/123",
                        },
                    ],
                },
                {
                    "index": 1,
                    "sub_type": "url",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "store/app/456",
                        },
                    ],
                },
            ],
        },
    },
)

print(response.json())

Respons

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

Send Simple Template (Body Only) #

Send a simple template message with only body parameters.

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

Body JSON

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

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/template/simple" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "9665xxxxxxxx",
  "template_name": "order_confirmation",
  "template_language": "ar",
  "components": {
    "body": [
      "أحمد",
      "ORD-12345",
      "150 ريال"
    ]
  }
}'
const response = await fetch("https://letsbot.net/api/v1/template/simple", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phone": "9665xxxxxxxx",
    "template_name": "order_confirmation",
    "template_language": "ar",
    "components": {
      "body": [
        "أحمد",
        "ORD-12345",
        "150 ريال"
      ]
    }
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/template/simple');

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",
        "template_name": "order_confirmation",
        "template_language": "ar",
        "components": {
            "body": [
                "أحمد",
                "ORD-12345",
                "150 ريال"
            ]
        }
    }
    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/template/simple",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "phone": "9665xxxxxxxx",
        "template_name": "order_confirmation",
        "template_language": "ar",
        "components": {
            "body": [
                "أحمد",
                "ORD-12345",
                "150 ريال",
            ],
        },
    },
)

print(response.json())
POST /api/v1/template/image Baru

Send Template with Image Header #

Send a template message with an image header.

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

Body JSON

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

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/template/image" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "9665xxxxxxxx",
  "template_name": "product_promotion",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "image",
      "image": {
        "link": "https://example.com/product-image.jpg"
      }
    },
    "body": [
      "خصم 50%",
      "المنتج الجديد"
    ]
  }
}'
const response = await fetch("https://letsbot.net/api/v1/template/image", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phone": "9665xxxxxxxx",
    "template_name": "product_promotion",
    "template_language": "ar",
    "components": {
      "header": {
        "type": "image",
        "image": {
          "link": "https://example.com/product-image.jpg"
        }
      },
      "body": [
        "خصم 50%",
        "المنتج الجديد"
      ]
    }
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/template/image');

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",
        "template_name": "product_promotion",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "image",
                "image": {
                    "link": "https://example.com/product-image.jpg"
                }
            },
            "body": [
                "خصم 50%",
                "المنتج الجديد"
            ]
        }
    }
    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/template/image",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "phone": "9665xxxxxxxx",
        "template_name": "product_promotion",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "image",
                "image": {
                    "link": "https://example.com/product-image.jpg",
                },
            },
            "body": [
                "خصم 50%",
                "المنتج الجديد",
            ],
        },
    },
)

print(response.json())
POST /api/v1/template/document Baru

Send Template with Document Header #

Send a template message with a document/PDF header.

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

Body JSON

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

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/template/document" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "9665xxxxxxxx",
  "template_name": "invoice_template",
  "template_language": "ar",
  "components": {
    "header": {
      "type": "document",
      "document": {
        "link": "https://example.com/invoice.pdf",
        "filename": "فاتورة_12345.pdf"
      }
    },
    "body": [
      "ORD-12345",
      "500 ريال"
    ]
  }
}'
const response = await fetch("https://letsbot.net/api/v1/template/document", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phone": "9665xxxxxxxx",
    "template_name": "invoice_template",
    "template_language": "ar",
    "components": {
      "header": {
        "type": "document",
        "document": {
          "link": "https://example.com/invoice.pdf",
          "filename": "فاتورة_12345.pdf"
        }
      },
      "body": [
        "ORD-12345",
        "500 ريال"
      ]
    }
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/template/document');

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",
        "template_name": "invoice_template",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "document",
                "document": {
                    "link": "https://example.com/invoice.pdf",
                    "filename": "فاتورة_12345.pdf"
                }
            },
            "body": [
                "ORD-12345",
                "500 ريال"
            ]
        }
    }
    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/template/document",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "phone": "9665xxxxxxxx",
        "template_name": "invoice_template",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "document",
                "document": {
                    "link": "https://example.com/invoice.pdf",
                    "filename": "فاتورة_12345.pdf",
                },
            },
            "body": [
                "ORD-12345",
                "500 ريال",
            ],
        },
    },
)

print(response.json())
POST /api/v1/template/video Baru

Send Template with Video Header #

Send a template message with a video header.

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

Body JSON

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

Contoh permintaan

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

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/template/video');

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",
        "template_name": "course_preview",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "video",
                "video": {
                    "link": "https://example.com/course-preview.mp4"
                }
            },
            "body": [
                "دورة البرمجة",
                "30 يوم"
            ]
        }
    }
    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/template/video",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "phone": "9665xxxxxxxx",
        "template_name": "course_preview",
        "template_language": "ar",
        "components": {
            "header": {
                "type": "video",
                "video": {
                    "link": "https://example.com/course-preview.mp4",
                },
            },
            "body": [
                "دورة البرمجة",
                "30 يوم",
            ],
        },
    },
)

print(response.json())

Message Archive (read by date)

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

GET /api/v1/messages Baru

Get messages by date #

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

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

Every number: this endpoint reads the whole workspace, so one key returns the messages of all your numbers and channels. To read one number, add channel_id (the channel.id a message or webhook reports) or business_phone (that number's digits). WhatsApp messages record their number from 2026-09-30; older messages record it only where it could be attributed without guessing (a workspace with a single WhatsApp number), and a message that records no number is not returned under these filters.

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

Each message

  • from_me — true for messages you sent, false for messages from the customer.
  • sent_by — where an outgoing message came from (live_chat, bot, api, ...); null for incoming.
  • agent — {id, name} of the team member who typed the message; null for automated and incoming messages. Use this, not sent_by, to identify human replies.
  • contact — {id, phone, chat_id, name} of the customer, or null.
  • type — text, image, video, audio, file, template_text, ...
  • status / status_text — the last status we recorded for the message (Pending, Sent, Delivered, Viewed, FAILED). It is not proof of delivery on every channel.
  • message_date — ISO-8601 with offset, in the requested timezone.
  • channel_platform — whatsapp, messenger, instagram, email, ...
  • channel — {id, global_id, phone, platform, is_official} of the workspace channel the message belongs to, when the message records it; null otherwise (never guessed). WhatsApp messages record their number from 2026-09-30.
  • referral — for an incoming message that started from a Click-to-WhatsApp ad, the ad it came from: {source_type, ad_id, source_url, headline, body, media_type, media_url, ctwa_clid}. source_type is always ad; ad_id is Meta's ad id (Meta calls it source_id); media_type is image or video and media_url its image, video or thumbnail URL; ctwa_clid is Meta's click id, for the Conversions API. Any field Meta did not send is null. referral is null for every other message, including everything you sent. Available on past messages too. Count leads per ad by grouping incoming messages on referral.ad_id.

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

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

Errors: 422 with {"Status": false, "Message": "..."} for invalid parameters (including a channel_id or business_phone that matches none of your channels, or the two naming different numbers); 401 for a missing or wrong key; 402 when the subscription or API add-on is not active.

Example

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

Parameter kueri

ParameterWajibContohDeskripsi
date_from Ya 2026-09-09 Required. Start of the range. `YYYY-MM-DD` covers the whole day; a full ISO-8601 datetime (e.g. `2026-09-09T08:00:00+03:00`) is an exact, inclusive bound.
date_to Ya 2026-09-09 Required. End of the range. `YYYY-MM-DD` covers the whole day (`date_from=date_to` is one full day); a full ISO-8601 datetime is an exact, inclusive bound. Must not be before `date_from`.
timezone Ya Europe/Kyiv Optional, default `UTC`. IANA timezone used to read bare dates and to format every `message_date` (always returned with its offset).
from_me Ya 1 Optional. `1`/`true` = outgoing only, `0`/`false` = incoming only. Omit for both directions.
sent_by Tidak live_chat Optional. Only messages from this source: `live_chat`, `bot`, `api`, `mcp`, `send_bulk`, `zapier`, `salla`, `zid`, `woocommerce`, `shopify`, `hubspot`, `pipedrive`, `stripe`, `magento`, `agent`, `drip`, `cart`, `system`, `ai`. `ai` (an AI assistant reply) is written only for workspaces that enabled the AI/rule split; elsewhere AI replies are `bot`, so filter on both to get every bot reply.
phone Tidak {{phone}} Optional. Only messages with this customer (international format, digits; a leading `+` is accepted).
channel_id Tidak 12 Optional. Only messages on this workspace channel — the `channel.id` a message or a webhook reports (one of your numbers). `422` when no channel with this id exists in the workspace.
business_phone Tidak 966501234567 Optional. Only messages on your WhatsApp number with these digits, international format (`+`, spaces and dashes are ignored). `422` when none of the workspace's WhatsApp numbers matches. Sent together with `channel_id`, both must name the same number.
limit Tidak 50 Optional. Page size, default 50, maximum 200.
cursor Tidak Optional. Pass `next_cursor` from the previous response, unchanged, to get the next page. A `null` `next_cursor` means there are no more pages.

Contoh permintaan

curl -G "https://letsbot.net/api/v1/messages" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "date_from=2026-09-09" \
  --data-urlencode "date_to=2026-09-09" \
  --data-urlencode "timezone=Europe/Kyiv" \
  --data-urlencode "from_me=1"
const response = await fetch("https://letsbot.net/api/v1/messages?date_from=2026-09-09&date_to=2026-09-09&timezone=Europe%2FKyiv&from_me=1", {
  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/messages?date_from=2026-09-09&date_to=2026-09-09&timezone=Europe%2FKyiv&from_me=1');

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/messages",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
    },
    params={
        "date_from": "2026-09-09",
        "date_to": "2026-09-09",
        "timezone": "Europe/Kyiv",
        "from_me": "1",
    },
)

print(response.json())

Respons

200 — outgoing Live Chat replies for one day (Kyiv time)200
{
    "Status": true,
    "timezone": "Europe/Kyiv",
    "data": [
        {
            "id": 4812,
            "message_id": "wamid.HBgMMzgwOTM1MDAwMDAxFQIAERgSN0Y0QjM2QjI5RjA1MDFEQjQ4AA==",
            "from_me": true,
            "sent_by": "live_chat",
            "agent": {
                "id": 3,
                "name": "Olena (Sales)"
            },
            "contact": {
                "id": 127,
                "phone": "380935000001",
                "chat_id": "380935000001@s.whatsapp.net",
                "name": "Customer name"
            },
            "group_id": null,
            "type": "text",
            "body": "Good afternoon! The 20 kg epoxy kit ships tomorrow.",
            "caption": null,
            "attachment": null,
            "status": 3,
            "status_text": "Viewed",
            "message_date": "2026-09-09T12:45:49+03:00",
            "channel_platform": "whatsapp",
            "channel": null,
            "referral": null
        },
        {
            "id": 4815,
            "message_id": "wamid.HBgMMzgwOTM1MDAwMDAxFQIAERgSQzE5RDA4NjM0MzhFRkY3M0Q1AA==",
            "from_me": true,
            "sent_by": "live_chat",
            "agent": {
                "id": 3,
                "name": "Olena (Sales)"
            },
            "contact": {
                "id": 127,
                "phone": "380935000001",
                "chat_id": "380935000001@s.whatsapp.net",
                "name": "Customer name"
            },
            "group_id": null,
            "type": "image",
            "body": null,
            "caption": "Colour sample",
            "attachment": {
                "url": "https://example.com/media/sample.jpg",
                "mimetype": "image/jpeg"
            },
            "status": 2,
            "status_text": "Delivered",
            "message_date": "2026-09-09T13:14:51+03:00",
            "channel_platform": "whatsapp",
            "channel": null,
            "referral": null
        },
        {
            "id": 4816,
            "message_id": "wamid.HBgMMzgwOTM1MDAwMDAyFQIAEhggQTFCMkMzRDRFNUY2QTdCOEM5RDBFMUYyQTNCNEM1RDYA",
            "from_me": false,
            "sent_by": null,
            "agent": null,
            "contact": {
                "id": 128,
                "phone": "966512345678",
                "chat_id": "966512345678@s.whatsapp.net",
                "name": "New lead"
            },
            "group_id": null,
            "type": "text",
            "body": "Hello! Is this kit still available?",
            "caption": null,
            "attachment": null,
            "status": 2,
            "status_text": "Delivered",
            "message_date": "2026-09-09T13:20:07+03:00",
            "channel_platform": "whatsapp",
            "channel": null,
            "referral": {
                "source_type": "ad",
                "ad_id": "120212345678900123",
                "source_url": "https://fb.me/3abcDEF",
                "headline": "Epoxy kit 20 kg",
                "body": "Message us on WhatsApp",
                "media_type": "image",
                "media_url": "https://scontent.xx.fbcdn.net/ad-image.jpg",
                "ctwa_clid": "ARAkLkA8rmlFeiCktEJQ-QTwRiyYHAFDLMNDBH0CD3qpjd0HR4irJ6LEkR7JwFF4XvnO2E4Nx0"
            }
        }
    ],
    "next_cursor": "eyJkIjoiMjAyNi0wOS0wOSAxMzoyMDowNyIsImkiOjQ4MTZ9"
}
422 — date_to before date_from422
{
    "Status": false,
    "Message": "The date to must not be before the date from.",
    "errors": {}
}
422 — date_from missing422
{
    "Status": false,
    "Message": "The date from field is required.",
    "errors": {
        "date_from": [
            "The date from field is required."
        ]
    }
}
401 — wrong or missing lb_api_key401
{
    "Status": false,
    "Message": "lb_api_key Incorrect"
}
402 — API add-on not active402
{
    "Status": false,
    "Message": "API access is not included in your current subscription. Please upgrade your plan or add the API addon.",
    "error_code": "API_ADDON_REQUIRED"
}

Orders (order journey)

For merchants whose orders live in their own system (not Salla / Zid): record each order to start its order journey (automation reminders N days after the order) and send its invoice; cancel it to stop the journey.

POST /api/v1/orders Baru

Record an order #

Records an order from your own store system (not Salla / Zid) and starts its order journey: every active automation reminder on «Order placed» (panel → Automation reminders) goes to this customer N days after ordered_at — rating request, discount, marketing.

Required: order_id (letters, digits, ., _, -; max 64) and phone (international format, e.g. 966501234567). Optional: customer_name, ordered_at (ISO-8601, within the last 365 days, not in the future; default now), total, currency, order_url (https), store_name, language (ar, en, es, pt), invoice_number, invoice_url (https page) or invoice_pdf_url (https PDF), products (up to 20, each name + optional https url).

When invoice_url or invoice_pdf_url is sent, the invoice goes out at once, once per order, through your invoice templates (panel → Invoices). Recording an order sends nothing else by itself.

journey.reachable is false when this customer never wrote to you and your number is QR-linked: journey messages will not reach them (cold messages go out only from an official Cloud API number). invoice is one of not_requested, sent, skipped, failed, duplicate, off.

Answers 201 when recorded, 422 on validation errors ({"Status": false, "Message": ..., "errors": {...}}), 403 when no workspace is linked to the key, 409 while a new workspace is still being prepared.

Body JSON

{
  "order_id": "ORD-1042",
  "phone": "966501234567",
  "customer_name": "Sara",
  "ordered_at": "2026-10-20T14:30:00+03:00",
  "total": 249.5,
  "currency": "SAR",
  "order_url": "https://shop.example.com/orders/ORD-1042",
  "store_name": "Example Store",
  "language": "ar",
  "invoice_number": "INV-1042",
  "invoice_pdf_url": "https://shop.example.com/invoices/INV-1042.pdf",
  "products": [
    {
      "name": "Arabic coffee 500g",
      "url": "https://shop.example.com/p/coffee"
    }
  ]
}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/orders" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "ORD-1042",
  "phone": "966501234567",
  "customer_name": "Sara",
  "ordered_at": "2026-10-20T14:30:00+03:00",
  "total": 249.5,
  "currency": "SAR",
  "order_url": "https://shop.example.com/orders/ORD-1042",
  "store_name": "Example Store",
  "language": "ar",
  "invoice_number": "INV-1042",
  "invoice_pdf_url": "https://shop.example.com/invoices/INV-1042.pdf",
  "products": [
    {
      "name": "Arabic coffee 500g",
      "url": "https://shop.example.com/p/coffee"
    }
  ]
}'
const response = await fetch("https://letsbot.net/api/v1/orders", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "order_id": "ORD-1042",
    "phone": "966501234567",
    "customer_name": "Sara",
    "ordered_at": "2026-10-20T14:30:00+03:00",
    "total": 249.5,
    "currency": "SAR",
    "order_url": "https://shop.example.com/orders/ORD-1042",
    "store_name": "Example Store",
    "language": "ar",
    "invoice_number": "INV-1042",
    "invoice_pdf_url": "https://shop.example.com/invoices/INV-1042.pdf",
    "products": [
      {
        "name": "Arabic coffee 500g",
        "url": "https://shop.example.com/p/coffee"
      }
    ]
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/orders');

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'
    {
        "order_id": "ORD-1042",
        "phone": "966501234567",
        "customer_name": "Sara",
        "ordered_at": "2026-10-20T14:30:00+03:00",
        "total": 249.5,
        "currency": "SAR",
        "order_url": "https://shop.example.com/orders/ORD-1042",
        "store_name": "Example Store",
        "language": "ar",
        "invoice_number": "INV-1042",
        "invoice_pdf_url": "https://shop.example.com/invoices/INV-1042.pdf",
        "products": [
            {
                "name": "Arabic coffee 500g",
                "url": "https://shop.example.com/p/coffee"
            }
        ]
    }
    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/orders",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "order_id": "ORD-1042",
        "phone": "966501234567",
        "customer_name": "Sara",
        "ordered_at": "2026-10-20T14:30:00+03:00",
        "total": 249.5,
        "currency": "SAR",
        "order_url": "https://shop.example.com/orders/ORD-1042",
        "store_name": "Example Store",
        "language": "ar",
        "invoice_number": "INV-1042",
        "invoice_pdf_url": "https://shop.example.com/invoices/INV-1042.pdf",
        "products": [
            {
                "name": "Arabic coffee 500g",
                "url": "https://shop.example.com/p/coffee",
            },
        ],
    },
)

print(response.json())

Respons

Order recorded201
{
  "Status": true,
  "Message": "Order recorded.",
  "order_id": "ORD-1042",
  "journey": {
    "recorded": true,
    "ordered_at": "2026-10-20T14:30:00+03:00",
    "reachable": true
  },
  "invoice": "sent"
}
Validation error422
{
  "Status": false,
  "Message": "The order id field is required.",
  "errors": {
    "order_id": [
      "The order id field is required."
    ]
  }
}
POST /api/v1/orders/{orderId}/cancel Baru

Cancel an order (stop its journey) #

Stops the order journey for a cancelled or refunded order: no further journey messages are sent for it. Send the same customer phone used when the order was recorded. cancelled is false when no open order matches this id and phone.

Body JSON

{
  "phone": "966501234567"
}

Contoh permintaan

curl -X POST "https://letsbot.net/api/v1/orders/ORD-1042/cancel" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "phone": "966501234567"
}'
const response = await fetch("https://letsbot.net/api/v1/orders/ORD-1042/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_LB_API_KEY",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phone": "966501234567"
  }),
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://letsbot.net/api/v1/orders/ORD-1042/cancel');

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": "966501234567"
    }
    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/orders/ORD-1042/cancel",
    headers={
        "Authorization": "Bearer YOUR_LB_API_KEY",
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    json={
        "phone": "966501234567",
    },
)

print(response.json())

Respons

Cancelled200
{
  "Status": true,
  "Message": "No further messages will be sent for this order.",
  "cancelled": true
}
No open order200
{
  "Status": true,
  "Message": "No open order with this id and phone.",
  "cancelled": false
}

Webhooks (event payloads)

LetsBot calls your URL when something happens in your workspace. Add a webhook in the panel → API → Webhooks and choose its events. Webhooks are workspace-wide: one webhook receives the events of every number and channel of the workspace.

Every delivery is a POST with the JSON body {"event": "<type>", "data": {...}} and a Signature header (HMAC-SHA256 of the body with your webhook's signing secret). Events: message_notification, ack_notification, chat_notification, label_notifications, contact_notifications, order_notifications.

Which of my numbers? message_notification (incoming messages, messages you send from LetsBot, and replies typed in the WhatsApp Business App on a Coexistence number) and ack_notification (delivery / read receipts) carry a channel object:

"channel": {
  "id": 2,
  "global_id": "8f0c2a4e-5b1d-4c3a-9e7f-0a1b2c3d4e5f",
  "phone": "966500000000",
  "platform": "whatsapp",
  "is_official": true
}
  • phone — your business number, digits only (null for Messenger / Instagram and other non-phone channels).
  • global_id — the stable id of the channel; id — the channel id shown in the panel.
  • is_official — true on the official WhatsApp Cloud API, false on a QR (WhatsApp Web) number.
  • channel is null when the event does not identify its channel. It is never guessed.

Which ad brought this lead? message_notification also carries referral. It is the Click-to-WhatsApp ad an incoming message came from, in the same shape as referral on GET /messages:

"referral": {
  "source_type": "ad",
  "ad_id": "120212345678900123",
  "source_url": "https://fb.me/3abcDEF",
  "headline": "Epoxy kit 20 kg",
  "body": "Message us on WhatsApp",
  "media_type": "image",
  "media_url": "https://scontent.xx.fbcdn.net/ad-image.jpg",
  "ctwa_clid": "ARAkLkA8..."
}

referral is null on every message that did not come from an ad, including messages you send. Meta attaches it to the first message of a conversation started from the ad.

channel was added on 2026-09-30 and referral on 2026-10-01; every other key of these payloads is unchanged. Ignore keys you do not know, so future additions never break your parser.

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 Baru

Contacts › List contacts #

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.

Parameter kueri

ParameterWajibContohDeskripsi
q Tidak ahmed Free-text search.
filters Tidak {"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]} Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view Tidak all A saved view id (its filters and sort apply), or `all`.
sort Tidak created_at Sort key (see `sorts` in …/schema).
dir Tidak desc `asc` or `desc`.
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Contacts › Contact fields, filters and sorts #

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.

Contoh permintaan

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())

Respons

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 Baru

Contacts › Find contacts #

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.

Parameter kueri

ParameterWajibContohDeskripsi
phone Tidak +966500000000 Phone in any format.
email Tidak ahmed@example.com Exact e-mail.
q Tidak Ahmed Free text.

Contoh permintaan

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())

Respons

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 Baru

Contacts › Create a contact #

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.

Body 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"
  }
}

Contoh permintaan

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())

Respons

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} Baru

Contacts › Get a contact #

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.

Contoh permintaan

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())

Respons

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} Baru

Contacts › Update a contact #

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.

Body JSON

{
  "name": "Ahmed Ali",
  "lifecycle_stage_id": 3,
  "owner_user_id": 3
}

Contoh permintaan

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())

Respons

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 Baru

Contacts › Add a note to a contact #

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.

Body JSON

{
  "body": "Customer asked for a delivery date before the end of the month.",
  "title": "Delivery request",
  "pinned": false
}

Contoh permintaan

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())

Respons

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 Baru

Companies › List companies #

Companies through the CRM lists engine (same query parameters as List contacts). Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
q Tidak ahmed Free-text search.
filters Tidak {"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]} Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view Tidak all A saved view id (its filters and sort apply), or `all`.
sort Tidak created_at Sort key (see `sorts` in …/schema).
dir Tidak desc `asc` or `desc`.
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Companies › Company fields, filters and sorts #

The lists-engine catalogue for company lists. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Companies › Find companies #

Exact lookup by domain or name, or free text q. Send one of the three. Up to 25 matches. Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
domain Tidak example.com Exact domain.
name Tidak Example Trading Co. Exact name.
q Tidak Example Free text.

Contoh permintaan

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())

Respons

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 Baru

Companies › Create a company #

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.

Body JSON

{
  "name": "Example Trading Co.",
  "domain": "example.com",
  "industry": "Retail",
  "phone": "+966512345678",
  "email": "info@example.com",
  "country": "SA",
  "city": "Riyadh"
}

Contoh permintaan

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())

Respons

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} Baru

Companies › Get a company #

One company with its linked contacts. Scope: crm.

Contoh permintaan

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())

Respons

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} Baru

Companies › Update a company #

Only the fields sent change. Scope: crm.

Body JSON

{
  "industry": "Wholesale",
  "size_range": "51-200"
}

Contoh permintaan

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())

Respons

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} Baru

Companies › Delete a company #

Soft-deletes the company (it can be restored in the panel). Scope: crm.

Contoh permintaan

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())

Respons

Deleted200
{
  "success": true,
  "data": {
    "id": 7,
    "deleted": true
  }
}
POST /api/v1/crm/companies/{id}/contacts Baru

Companies › Link a contact to a company #

Associates a contact with the company, optionally as its primary contact. Scope: crm.

Required: contact_id. Optional: role (up to 100 characters), is_primary.

Body JSON

{
  "contact_id": 42,
  "role": "Purchasing manager",
  "is_primary": true
}

Contoh permintaan

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())

Respons

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
  }
}
POST /api/v1/crm/companies/{id}/notes Baru

Companies › Add a note to a company #

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.

Body JSON

{
  "body": "Customer asked for a delivery date before the end of the month.",
  "title": "Delivery request",
  "pinned": false
}

Contoh permintaan

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())

Respons

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 Baru

Deals › List pipelines and stages #

Every sales pipeline with its stages. A stage's kind is open, won or lost. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Deals › List deals #

Deals, newest activity first by default. Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
pipeline_id Tidak 1 Pipeline id.
stage_id Tidak 12 Stage id.
status Tidak open `open`, `won` or `lost`.
owner_user_id Tidak 3 Owner (team member) id.
contact_id Tidak 42 Contact id.
company_id Tidak 7 Company id.
q Tidak epoxy Free text.
sort Tidak updated_at Sort key.
dir Tidak desc `asc` or `desc`.
updated_since Tidak 2026-10-01T00:00:00Z Only deals updated at or after this time (ISO 8601) — for incremental sync.
created_since Tidak 2026-10-01T00:00:00Z Only deals created at or after this time (ISO 8601).
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Deals › List lost reasons #

The active lost reasons. Marking a deal lost needs one. Scope: crm.

Contoh permintaan

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())

Respons

Reasons200
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "No budget"
    },
    {
      "id": 2,
      "name": "Chose a competitor"
    }
  ]
}
GET /api/v1/crm/deals/search Baru

Deals › Find deals #

By exact title, free text q or contact_id. Send one of the three. Up to 25 matches. Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
title Tidak Epoxy kit order — 40 units Exact title.
q Tidak epoxy Free text.
contact_id Tidak 42 Contact id.

Contoh permintaan

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())

Respons

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 Baru

Deals › Create a deal #

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).

Body 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"
}

Contoh permintaan

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())

Respons

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} Baru

Deals › Get a deal #

One deal. Scope: crm.

Contoh permintaan

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())

Respons

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} Baru

Deals › Update a deal #

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.

Body JSON

{
  "amount": 13500,
  "expected_close_date": "2026-11-05"
}

Contoh permintaan

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())

Respons

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} Baru

Deals › Delete a deal #

Soft-deletes the deal. Scope: crm.

Contoh permintaan

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())

Respons

Deleted200
{
  "success": true,
  "data": {
    "id": 15,
    "deleted": true
  }
}
POST /api/v1/crm/deals/{id}/stage Baru

Deals › Move a deal to a stage #

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.

Body JSON

{
  "stage_id": 12
}

Contoh permintaan

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())

Respons

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 Baru

Deals › Mark a deal won #

Moves the deal to its pipeline's won stage. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Deals › Mark a deal lost #

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).

Body JSON

{
  "lost_reason_id": 2,
  "note": "Chose a cheaper supplier."
}

Contoh permintaan

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())

Respons

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 Baru

Deals › Add a note to a deal #

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.

Body JSON

{
  "body": "Customer asked for a delivery date before the end of the month.",
  "title": "Delivery request",
  "pinned": false
}

Contoh permintaan

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())

Respons

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 Baru

Tasks › List tasks #

Tasks, newest activity first by default. Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
status Tidak todo `todo`, `in_progress` or `done`.
assignee_user_id Tidak 3 Assignee (team member) id.
contact_id Tidak 42 Contact id.
deal_id Tidak 15 Deal id.
due_before Tidak 2026-10-15T00:00:00Z Due before this time (ISO 8601).
due_after Tidak 2026-10-01T00:00:00Z Due after this time (ISO 8601).
q Tidak call Free text.
sort Tidak due_at Sort key.
dir Tidak asc `asc` or `desc`.
updated_since Tidak 2026-10-01T00:00:00Z Only tasks updated at or after this time.
created_since Tidak 2026-10-01T00:00:00Z Only tasks created at or after this time.
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Tasks › Create a task #

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).

Body 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
}

Contoh permintaan

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())

Respons

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} Baru

Tasks › Get a task #

One task. Scope: crm.

Contoh permintaan

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())

Respons

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} Baru

Tasks › Update a task #

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.

Body JSON

{
  "status": "in_progress",
  "priority": "urgent"
}

Contoh permintaan

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())

Respons

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} Baru

Tasks › Delete a task #

Deletes the task. Scope: crm.

Contoh permintaan

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())

Respons

Deleted200
{
  "success": true,
  "data": {
    "id": 31,
    "deleted": true
  }
}
POST /api/v1/crm/tasks/{id}/complete Baru

Tasks › Complete a task #

Marks the task done and fires task.completed. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Activities › List activities #

Timeline entries of contacts, companies and deals, newest first. Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
subject_type Tidak contact `contact`, `company` or `deal`.
subject_id Tidak 42 The subject's id (with `subject_type`).
type Tidak note Activity type, e.g. `note`, `call`, `meeting`.
updated_since Tidak 2026-10-01T00:00:00Z Only entries updated at or after this time.
created_since Tidak 2026-10-01T00:00:00Z Only entries created at or after this time.
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Activities › Log an activity #

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.

Body 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
}

Contoh permintaan

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())

Respons

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} Baru

Activities › Get an activity #

One timeline entry. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Quotes › List quotes #

Quotes through the CRM lists engine (same query parameters as List contacts). Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
q Tidak ahmed Free-text search.
filters Tidak {"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]} Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view Tidak all A saved view id (its filters and sort apply), or `all`.
sort Tidak created_at Sort key (see `sorts` in …/schema).
dir Tidak desc `asc` or `desc`.
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Quotes › Quote fields, filters and sorts #

The lists-engine catalogue for quote lists. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Quotes › Draft a quote #

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}.

Body 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
    }
  ]
}

Contoh permintaan

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())

Respons

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} Baru

Quotes › Get a quote #

One quote with its items. Scope: crm.

Contoh permintaan

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())

Respons

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} Baru

Quotes › Update a quote #

Draft quotes only; same fields as Draft a quote. Scope: crm.

Body JSON

{
  "valid_until": "2026-10-29"
}

Contoh permintaan

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())

Respons

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} Baru

Quotes › Delete a draft quote #

Deletes a draft quote. A quote that was already sent answers 409 with code: conflict. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Products › List products #

The product catalogue through the CRM lists engine (same query parameters as List contacts). Scope: crm.

Parameter kueri

ParameterWajibContohDeskripsi
q Tidak ahmed Free-text search.
filters Tidak {"match":"and","conditions":[{"field":"email","op":"is_not_empty"}]} Lists-engine filter as JSON. The …/schema endpoint lists the fields and operators.
view Tidak all A saved view id (its filters and sort apply), or `all`.
sort Tidak created_at Sort key (see `sorts` in …/schema).
dir Tidak desc `asc` or `desc`.
page Tidak 1 Page number.
per_page Tidak 25 Rows per page, up to 100.

Contoh permintaan

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())

Respons

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 Baru

Products › Product fields, filters and sorts #

The lists-engine catalogue for product lists. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Products › Create a product #

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.

Body 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"
}

Contoh permintaan

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())

Respons

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} Baru

Products › Get a product #

One product. Scope: crm.

Contoh permintaan

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())

Respons

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} Baru

Products › Update a product #

Only the fields sent change (name, price, currency, sku, tax_pct (0–100), is_active, description, image_url). Scope: crm.

Body JSON

{
  "price": 320
}

Contoh permintaan

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())

Respons

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} Baru

Products › Delete a product #

Removes the product from the catalogue; existing quotes keep their lines. Scope: crm.

Contoh permintaan

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())

Respons

Deleted200
{
  "success": true,
  "data": {
    "id": 21,
    "deleted": true
  }
}
GET /api/v1/crm/hooks Baru

Webhooks (REST hooks) › List API webhook subscriptions #

Subscriptions created through the API. Subscriptions made in the panel are managed there. Secrets are never returned again. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Webhooks (REST hooks) › List webhook events #

The event catalogue: every event name with its object. Scope: crm.

Contoh permintaan

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())

Respons

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 Baru

Webhooks (REST hooks) › Sample webhook payload #

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.

Parameter kueri

ParameterWajibContohDeskripsi
event Ya deal.won The event name (see *List webhook events*).

Contoh permintaan

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())

Respons

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 Baru

Webhooks (REST hooks) › Subscribe a webhook (REST hook) #

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).

Body JSON

{
  "target_url": "https://hooks.example.com/letsbot/crm",
  "events": [
    "deal.won",
    "deal.lost"
  ],
  "source": "api",
  "description": "Sync won deals to the ERP"
}

Contoh permintaan

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())

Respons

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} Baru

Webhooks (REST hooks) › Unsubscribe a webhook (REST hook) #

Deletes a subscription made through the API. Scope: crm.

Contoh permintaan

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())

Respons

Deleted200
{
  "success": true,
  "data": {
    "id": 4,
    "deleted": true
  }
}

Siap kapan pun Anda siap

Dapatkan kunci API Anda

API berfungsi selama uji coba atau dengan add-on API Access. Kunci Anda ada di panel pada API → Data Autentikasi.