GET Widget Chat
curl --request POST \
--url https://zeplo.ai/api/widget/chat \
--header 'Content-Type: application/json' \
--data '
{
"siteId": 123,
"conversationId": "<string>",
"message": "<string>",
"contactInfo": {},
"reason": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>"
}
'import requests
url = "https://zeplo.ai/api/widget/chat"
payload = {
"siteId": 123,
"conversationId": "<string>",
"message": "<string>",
"contactInfo": {},
"reason": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
siteId: 123,
conversationId: '<string>',
message: '<string>',
contactInfo: {},
reason: '<string>',
name: '<string>',
email: '<string>',
phone: '<string>'
})
};
fetch('https://zeplo.ai/api/widget/chat', 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://zeplo.ai/api/widget/chat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'siteId' => 123,
'conversationId' => '<string>',
'message' => '<string>',
'contactInfo' => [
],
'reason' => '<string>',
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zeplo.ai/api/widget/chat"
payload := strings.NewReader("{\n \"siteId\": 123,\n \"conversationId\": \"<string>\",\n \"message\": \"<string>\",\n \"contactInfo\": {},\n \"reason\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://zeplo.ai/api/widget/chat")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": 123,\n \"conversationId\": \"<string>\",\n \"message\": \"<string>\",\n \"contactInfo\": {},\n \"reason\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zeplo.ai/api/widget/chat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": 123,\n \"conversationId\": \"<string>\",\n \"message\": \"<string>\",\n \"contactInfo\": {},\n \"reason\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"conversationId": "conv_widget_123",
"response": "Hi! How can we help you today?",
"isAiResponse": true,
"agentRequested": false
}
}
Knowledge Base & Training
GET Widget Chat
Chat widget public API endpoints.
POST
/
api
/
widget
/
chat
GET Widget Chat
curl --request POST \
--url https://zeplo.ai/api/widget/chat \
--header 'Content-Type: application/json' \
--data '
{
"siteId": 123,
"conversationId": "<string>",
"message": "<string>",
"contactInfo": {},
"reason": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>"
}
'import requests
url = "https://zeplo.ai/api/widget/chat"
payload = {
"siteId": 123,
"conversationId": "<string>",
"message": "<string>",
"contactInfo": {},
"reason": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
siteId: 123,
conversationId: '<string>',
message: '<string>',
contactInfo: {},
reason: '<string>',
name: '<string>',
email: '<string>',
phone: '<string>'
})
};
fetch('https://zeplo.ai/api/widget/chat', 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://zeplo.ai/api/widget/chat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'siteId' => 123,
'conversationId' => '<string>',
'message' => '<string>',
'contactInfo' => [
],
'reason' => '<string>',
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://zeplo.ai/api/widget/chat"
payload := strings.NewReader("{\n \"siteId\": 123,\n \"conversationId\": \"<string>\",\n \"message\": \"<string>\",\n \"contactInfo\": {},\n \"reason\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://zeplo.ai/api/widget/chat")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": 123,\n \"conversationId\": \"<string>\",\n \"message\": \"<string>\",\n \"contactInfo\": {},\n \"reason\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://zeplo.ai/api/widget/chat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": 123,\n \"conversationId\": \"<string>\",\n \"message\": \"<string>\",\n \"contactInfo\": {},\n \"reason\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"conversationId": "conv_widget_123",
"response": "Hi! How can we help you today?",
"isAiResponse": true,
"agentRequested": false
}
}
Send chat message
POST /api/widget/chat
Public API endpoints for the embeddable chat widget.
These endpoints do not require authentication. They are designed for use by the JavaScript widget on your website.
Body parameters
integer
required
Site ID.
string
Existing conversation ID, or
null to start a new conversation.string
required
Chat message from the visitor.
object
Visitor contact information (name, email, phone).
{
"siteId": 1,
"conversationId": null,
"message": "Hello, I need help",
"contactInfo": {
"name": "Website Visitor",
"email": "visitor@example.com",
"phone": "919876543210"
}
}
{
"success": true,
"data": {
"conversationId": "conv_widget_123",
"response": "Hi! How can we help you today?",
"isAiResponse": true,
"agentRequested": false
}
}
Request human agent
POST /api/widget/request-agent
Body parameters
string
required
Conversation ID to escalate.
string
Reason for requesting a human agent.
{
"conversationId": "conv_widget_123",
"reason": "Need to speak with a real person"
}
Get conversation history
GET /api/widget/conversation/:conversationId
string
required
Conversation ID.
Save contact from widget
POST /api/widget/contacts
Body parameters
integer
required
Site ID.
string
Visitor name.
string
Visitor email.
string
Visitor phone number.
{
"siteId": 1,
"name": "John Visitor",
"email": "john@example.com",
"phone": "919876543210"
}
Get widget config
GET /api/widget/config/:siteId
integer
required
Site ID.
Get knowledge base
GET /api/widget/kb/:siteId
integer
required
Site ID.
Get Q&A pairs
GET /api/widget/qa/:siteId
integer
required
Site ID.
Get article
GET /api/widget/article/:articleId
integer
required
Article ID.
