Base URL: https://api.cornerspot.net
Authentication: requests use a bearer token, for example Authorization: Bearer YOUR_API_KEY.
List chat domains
GET /c/api/v1/chat_domains
Returns a paginated list of the team's allowed chat-widget embedding domains. Requires chat_read scope and the Live Chat module.
Query parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
query | string | Search term matched against hostname. |
filter[enabled] | string | Filter by enabled status: true or false. |
sort | string | Sort column, - prefix for descending. One of hostname, enabled, created_at, updated_at. Default hostname. |
page | integer | 1-based page number. |
per_page | integer | Page size (1–100, default 25). |
Code samples
curl --request GET \
--url 'https://api.cornerspot.net/c/api/v1/chat_domains' \
--header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/chat_domains"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, headers=headers, method="GET")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/chat_domains")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/chat_domains',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
200 OK | a page of chat domains |
401 Unauthorized | missing or invalid API key |
402 Payment Required | the team's plan doesn't include the Live Chat module |
403 Forbidden | the key lacks the chat_read scope |
Create a chat domain
POST /c/api/v1/chat_domains
Adds a hostname to the team's live-chat embedding allowlist. Requires chat_write scope and the Live Chat module.
Request body
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
chat_domain | object | |
chat_domain.hostname | string · required | Required — the hostname to whitelist (no scheme, no path). |
chat_domain.include_subdomains | boolean | When true, all subdomains of hostname are also whitelisted. |
chat_domain.enabled | boolean | Whether this entry should be immediately active (default true). |
chat_domain.note | string | Optional operator note. |
Code samples
curl --request POST \
--url 'https://api.cornerspot.net/c/api/v1/chat_domains' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
})
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
})
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/chat_domains"
payload = json.dumps({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
}).encode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, data=payload, headers=headers, method="POST")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/chat_domains")
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/chat_domains',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => json_encode([
'chat_domain' => [
'hostname' => 'string',
'include_subdomains' => true,
'enabled' => true,
'note' => 'string',
],
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
201 Created | created |
401 Unauthorized | missing or invalid API key |
402 Payment Required | the team's plan doesn't include the Live Chat module |
403 Forbidden | the key lacks the chat_write scope |
422 Unprocessable Content | validation errors (e.g. blank or invalid hostname) |
Get a chat domain
GET /c/api/v1/chat_domains/{id}
Path parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
id | string · required | Chat domain id. |
Code samples
curl --request GET \
--url 'https://api.cornerspot.net/c/api/v1/chat_domains/abc123' \
--header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains/abc123', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains/abc123', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/chat_domains/abc123"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, headers=headers, method="GET")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/chat_domains/abc123")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/chat_domains/abc123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
200 OK | the chat domain |
401 Unauthorized | missing or invalid API key |
402 Payment Required | the team's plan doesn't include the Live Chat module |
403 Forbidden | the key lacks the chat_read scope |
404 Not Found | no such chat domain in this team |
Update a chat domain
PATCH /c/api/v1/chat_domains/{id}
Updates the hostname entry. Any subset of permitted attributes may be sent.
Path parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
id | string · required | Chat domain id. |
Request body
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
chat_domain | object | |
chat_domain.hostname | string | |
chat_domain.include_subdomains | boolean | |
chat_domain.enabled | boolean | |
chat_domain.note | string |
Code samples
curl --request PATCH \
--url 'https://api.cornerspot.net/c/api/v1/chat_domains/abc123' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
}'
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains/abc123', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
})
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains/abc123', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
})
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/chat_domains/abc123"
payload = json.dumps({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
}).encode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, data=payload, headers=headers, method="PATCH")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/chat_domains/abc123")
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer YOUR_API_KEY"
request.body = JSON.generate({
"chat_domain": {
"hostname": "string",
"include_subdomains": true,
"enabled": true,
"note": "string"
}
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/chat_domains/abc123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => json_encode([
'chat_domain' => [
'hostname' => 'string',
'include_subdomains' => true,
'enabled' => true,
'note' => 'string',
],
]),
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
200 OK | updated |
401 Unauthorized | missing or invalid API key |
402 Payment Required | the team's plan doesn't include the Live Chat module |
403 Forbidden | the key lacks the chat_write scope |
404 Not Found | no such chat domain in this team |
422 Unprocessable Content | validation errors (e.g. invalid hostname format) |
Delete a chat domain
DELETE /c/api/v1/chat_domains/{id}
Permanently removes the hostname from the team's embedding allowlist.
Path parameters
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
id | string · required | Chat domain id. |
Code samples
curl --request DELETE \
--url 'https://api.cornerspot.net/c/api/v1/chat_domains/abc123' \
--header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains/abc123', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
// Node.js 18+ (native fetch)
const response = await fetch('https://api.cornerspot.net/c/api/v1/chat_domains/abc123', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
import json
import urllib.request
url = "https://api.cornerspot.net/c/api/v1/chat_domains/abc123"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
request = urllib.request.Request(url, headers=headers, method="DELETE")
with urllib.request.urlopen(request) as response:
data = json.loads(response.read().decode("utf-8"))
print(data)
require "json"
require "net/http"
uri = URI("https://api.cornerspot.net/c/api/v1/chat_domains/abc123")
request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts JSON.parse(response.body)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cornerspot.net/c/api/v1/chat_domains/abc123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$data = json_decode($response, true);
print_r($data);
Responses
| STATUS | DESCRIPTION |
|---|---|
204 No Content | deleted |
401 Unauthorized | missing or invalid API key |
402 Payment Required | the team's plan doesn't include the Live Chat module |
403 Forbidden | the key lacks the chat_write scope |
404 Not Found | no such chat domain in this team |
