LetsBot Μενού
Ξεκινήστε Ελληνικά Γλώσσα

Meta Business Partner Εταιρεία εγγεγραμμένη στο Ηνωμένο Βασίλειο

Γλώσσα

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.

Παράμετροι ερωτήματος

ΠαράμετροςΥποχρεωτικόΠαράδειγμαΠεριγραφή
search Όχι Karim Optional, at least 2 characters. Matches the contact's name, saved name, WhatsApp profile name or number.
phone Όχι {{phone}} Optional. One contact by number (international format, digits; a leading `+` is accepted).
updated_since Όχι 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 Όχι UTC Optional, default `UTC`. IANA timezone used to read `updated_since`. Returned timestamps are always UTC.
include_groups Όχι 1 Optional. `1` also returns WhatsApp groups. By default only people are returned.
platform Όχι 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 Όχι 50 Optional. Page size, default 50, maximum 200.
cursor Όχι Optional. Pass `next_cursor` from the previous response, unchanged, to get the next page. `null` means there are no more pages.

Παράδειγμα αιτήματος

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

Απαντήσεις

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

Έτοιμοι όποτε είστε κι εσείς

Δοκιμάστε αυτό το endpoint με τον δικό σας αριθμό

Το API λειτουργεί κατά τη δωρεάν δοκιμή. Δημιουργήστε λογαριασμό, συνδέστε τον αριθμό WhatsApp σας και αντιγράψτε το κλειδί σας από API → Δεδομένα ταυτοποίησης.