LetsBot Menu
Get Started English Language

Meta Business Partner UK Registered Company

Language

Live Chat · API endpoint

GET /api/v1/live_chat/contact

Get contact

Get a contact with its labels and assigned team members.

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

Query parameters

ParameterRequiredExampleDescription
phone Yes {{phone}} Contact phone number

Example request

curl -G "https://letsbot.net/api/v1/live_chat/contact" \
  -H "Authorization: Bearer YOUR_LB_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "phone=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())

Responses

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

Ready when you are

Try this endpoint on your own number

The API works during the free trial. Create an account, connect your WhatsApp number and copy your key from API → Authentication Data.