Black Friday Black Friday: nové balíky LetsBot ušetria až 60% — len do 30. novembra. Pozrieť balíky Pozrieť balíky
LetsBot Menu
Začať Slovenčina Jazyk

Overený Meta Tech Provider Spoločnosť registrovaná vo Veľkej Británii

Jazyk

Live Chat · endpoint API

GET /api/v1/live_chat/teams Nový

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

Ukážková požiadavka

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

Pripravení, keď budete vy

Vyskúšajte tento endpoint na vlastnom čísle

API funguje počas bezplatnej skúšobnej verzie. Vytvorte si účet, pripojte svoje číslo WhatsApp a skopírujte kľúč v časti API → Overovacie údaje.