curl --request GET \
--url https://api.izap.ai/api/v1/chats \
--header 'Authorization: Bearer <token>' \
--header 'business-id: <business-id>'import requests
url = "https://api.izap.ai/api/v1/chats"
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'business-id': '<business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.izap.ai/api/v1/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.izap.ai/api/v1/chats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"business-id: <business-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/chats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.izap.ai/api/v1/chats")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/chats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chats": [
{
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"messages": [
"<unknown>"
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"consumer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nickname": "<string>",
"phone_number": "<string>"
},
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_instructions": [
"<unknown>"
],
"instructions": [
"<unknown>"
],
"kind": "real",
"last_message": {
"content": "<string>",
"status": "<string>",
"no_reply": false
},
"refine_reviewed": false,
"refine_verdict": "<string>"
}
],
"pagination": {
"has_next": true,
"has_previous": true,
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
}
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}List a business's chats
Returns the business’s conversations with paging, and optional filters for kind and assistant. The business is taken from the business-id header rather than the URL; the path-scoped form of this operation is deprecated.
curl --request GET \
--url https://api.izap.ai/api/v1/chats \
--header 'Authorization: Bearer <token>' \
--header 'business-id: <business-id>'import requests
url = "https://api.izap.ai/api/v1/chats"
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'business-id': '<business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.izap.ai/api/v1/chats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.izap.ai/api/v1/chats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"business-id: <business-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/chats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.izap.ai/api/v1/chats")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/chats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chats": [
{
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"messages": [
"<unknown>"
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"consumer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nickname": "<string>",
"phone_number": "<string>"
},
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_instructions": [
"<unknown>"
],
"instructions": [
"<unknown>"
],
"kind": "real",
"last_message": {
"content": "<string>",
"status": "<string>",
"no_reply": false
},
"refine_reviewed": false,
"refine_verdict": "<string>"
}
],
"pagination": {
"has_next": true,
"has_previous": true,
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
}
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Authorizations
Personal access token (izap_pat_…) sent as Authorization: Bearer ; dashboard session JWTs are also accepted.
Headers
UUID of the business the request is scoped to. Required on this route; the deprecated /businesses/{business_id}/... form takes it from the path instead.
Query Parameters
Filter by Chat.kind. 'trainer' (default) returns sandbox conversations from the AI Trainer UI; 'real' returns customer conversations created from WhatsApp webhooks; 'all' returns both. The default is 'trainer' to preserve the historical behavior of this endpoint, which was trainer-only via a consumer-nickname heuristic.
1-based page number for chat pagination (used by the trainer's infinite scroll).
x >= 1Number of chats to return per page (default 30, max 100).
1 <= x <= 100How many of the most-recent messages to embed per chat. Defaults to 1, which is enough for the list's last-message preview and ordering. Full conversation threads should be fetched on demand from GET /chats/{chat_id}/messages (paginated) rather than over-fetched here — embedding the whole thread for every chat on the page made this endpoint load thousands of messages per request.
1 <= x <= 200Refine trainer queue filter for kind=real. 'pending' = no OK review and no issues; 'reviewed' = has OK review or any issue.
Optional assistant ID to filter chats by (per-assistant trainer from dash).
ISO-8601 timestamp. When set, only chats whose last activity (the same timestamp this list orders by) is strictly newer than since are returned — exclusive, not inclusive, so polling with since=<last seen timestamp> never returns a chat already seen. For incremental sync: pass the newest timestamp from the previous response as since on the next poll instead of refetching and diffing a full page client-side.