Black Friday Black Friday: nowe pakiety LetsBot pozwalają zaoszczędzić do 60% — tylko do 30 listopada. Zobacz pakiety Zobacz pakiety
LetsBot Menu
Zacznij teraz Polski Język

Zweryfikowany Meta Tech Provider Spółka zarejestrowana w Wielkiej Brytanii

Język

Live Chat · endpoint API

GET /api/v1/live_chat/teams Nowy

List teams

The workspace's active teams (departments) with their ids, for transfer conversation to team.

The workspace's active teams (departments) with their ids, for transfer conversation to team. transfer_available is true when departments (Routing) are enabled in the workspace.

Answers {"message": "success", "data": {"teams": [{"id", "name"}], "transfer_available": true}}.

Przykładowe żądanie

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

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

print(response.json())

Gotowi, kiedy Ty jesteś

Wypróbuj ten endpoint na własnym numerze

API działa w okresie bezpłatnego testu. Załóż konto, połącz swój numer WhatsApp i skopiuj klucz z API → Dane uwierzytelniania.