Get webchat configuration by id
curl --request GET \
--url https://your-instance.example.com/api/webchats/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://your-instance.example.com/api/webchats/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://your-instance.example.com/api/webchats/{id}', 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://your-instance.example.com/api/webchats/{id}",
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>"
],
]);
$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://your-instance.example.com/api/webchats/{id}"
req, _ := http.NewRequest("GET", url, nil)
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://your-instance.example.com/api/webchats/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webchats/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"_id": "67d3a0b0c0d0e0f0a0b0c0d0",
"name": "Marketing site widget",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"isEnabled": true,
"primaryColor": "#1F2937"
}
}{
"error": "Webchat configuration not found",
"details": "NOT_FOUND"
}{
"error": "Webchat configuration not found",
"details": "NOT_FOUND"
}{
"error": "Webchat configuration not found",
"details": "NOT_FOUND"
}Webchats
Get webchat configuration by id
Fetch a single webchat configuration by _id. Used by the widget management UI.
GET
/
api
/
webchats
/
{id}
Get webchat configuration by id
curl --request GET \
--url https://your-instance.example.com/api/webchats/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://your-instance.example.com/api/webchats/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://your-instance.example.com/api/webchats/{id}', 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://your-instance.example.com/api/webchats/{id}",
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>"
],
]);
$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://your-instance.example.com/api/webchats/{id}"
req, _ := http.NewRequest("GET", url, nil)
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://your-instance.example.com/api/webchats/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webchats/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"_id": "67d3a0b0c0d0e0f0a0b0c0d0",
"name": "Marketing site widget",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"isEnabled": true,
"primaryColor": "#1F2937"
}
}{
"error": "Webchat configuration not found",
"details": "NOT_FOUND"
}{
"error": "Webchat configuration not found",
"details": "NOT_FOUND"
}{
"error": "Webchat configuration not found",
"details": "NOT_FOUND"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Webchat configuration returned
Response from GET /api/webchats/{id}.
Stored webchat configuration document. The icon field, when present, is a freshly-signed URL pointing at the R2-hosted asset (the database stores the storage key).
Show child attributes
Show child attributes
Example:
{
"_id": "67d3a0b0c0d0e0f0a0b0c0d0",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"userId": "65b1f0a2c3d4e5f6a7b8c9d0",
"createdBy": "65b1f0a2c3d4e5f6a7b8c9d0",
"name": "Marketing site widget",
"description": "Bottom-right widget on the marketing site",
"starterMessage": "Hi! Looking for pricing?",
"backgroundColor": "#FFFFFF",
"primaryColor": "#1F2937",
"secondaryColor": "#3B82F6",
"icon": "https://r2.example.com/orgs/65a0.../webchat/icon.png?token=...",
"promptId": "65b2a1c3d4e5f6a7b8c9d0e1",
"allowedDomains": ["https://example.com"],
"pipelineId": "66f0a0b0c0d0e0f0a0b0c0d0",
"initialStage": "new",
"isAutopilot": true,
"isEnabled": true,
"position": "bottom-right",
"offsetX": 24,
"offsetY": 24,
"zIndex": 9999,
"createdAt": "2026-03-12T10:00:00.000Z",
"updatedAt": "2026-05-18T14:00:00.000Z"
}
⌘I