Black Friday Black Friday: các gói LetsBot mới tiết kiệm đến 60% — chỉ đến 30 tháng 11. Xem các gói Xem các gói
LetsBot Menu
Bắt đầu Tiếng Việt Ngôn ngữ

Đối tác kinh doanh của Meta Công ty đăng ký tại Vương quốc Anh

Ngôn ngữ

Chat · Endpoint API

GET /api/v1/contacts

Get contacts

List the contacts of your workspace.

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.

Tham số truy vấn

Tham sốBắt buộcVí dụMô tả
search Không Karim Optional, at least 2 characters. Matches the contact's name, saved name, WhatsApp profile name or number.
phone Không {{phone}} Optional. One contact by number (international format, digits; a leading `+` is accepted).
updated_since Không 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 Không UTC Optional, default `UTC`. IANA timezone used to read `updated_since`. Returned timestamps are always UTC.
include_groups Không 1 Optional. `1` also returns WhatsApp groups. By default only people are returned.
platform Không 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 Không 50 Optional. Page size, default 50, maximum 200.
cursor Không Optional. Pass `next_cursor` from the previous response, unchanged, to get the next page. `null` means there are no more pages.

Ví dụ yêu cầu

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

Phản hồi

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

Sẵn sàng khi bạn sẵn sàng

Dùng thử endpoint này với số của bạn

API hoạt động trong thời gian dùng thử miễn phí. Tạo tài khoản, kết nối số WhatsApp và sao chép khóa của bạn tại API → Dữ liệu xác thực.