copilot
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
AdminUpdated Sep 19, 2026
POST
https://api.chatlychat.com/v1/copilot/smart-composeSuggest a Gmail/Crisp MagicType-style completion for the agent draft. Returns { suggestion: "" } on any failure — never blocks the composer.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | UUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict. |
Request body application/json
{
"conversationId": "string",
"currentDraft": "string",
"lastInboundMessage": ""
}Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/copilot/smart-compose" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"conversationId":"string","currentDraft":"string","lastInboundMessage":""}'TypeScript
const res = await fetch('https://api.chatlychat.com/v1/copilot/smart-compose', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"conversationId":"string","currentDraft":"string","lastInboundMessage":""}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://api.chatlychat.com/v1/copilot/smart-compose",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"conversationId": "string", "currentDraft": "string", "lastInboundMessage": ""},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/copilot/smart-compose", strings.NewReader(`{"conversationId":"string","currentDraft":"string","lastInboundMessage":""}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/copilot/smart-compose');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"conversationId":"string","currentDraft":"string","lastInboundMessage":""}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://api.chatlychat.com/v1/copilot/smart-compose')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"conversationId":"string","currentDraft":"string","lastInboundMessage":""}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.chatlychat.com/v1/copilot/smart-compose"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"conversationId\":\"string\",\"currentDraft\":\"string\",\"lastInboundMessage\":\"\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());POST
https://api.chatlychat.com/v1/copilot/variant-repliesReturn three reply variants (formal / friendly / brief) for the last inbound message.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | UUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict. |
Request body application/json
{
"conversationId": "string",
"lastInboundMessage": "string",
"tone": "friendly"
}Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/copilot/variant-replies" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"conversationId":"string","lastInboundMessage":"string","tone":"friendly"}'TypeScript
const res = await fetch('https://api.chatlychat.com/v1/copilot/variant-replies', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"conversationId":"string","lastInboundMessage":"string","tone":"friendly"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://api.chatlychat.com/v1/copilot/variant-replies",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"conversationId": "string", "lastInboundMessage": "string", "tone": "friendly"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/copilot/variant-replies", strings.NewReader(`{"conversationId":"string","lastInboundMessage":"string","tone":"friendly"}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/copilot/variant-replies');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"conversationId":"string","lastInboundMessage":"string","tone":"friendly"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://api.chatlychat.com/v1/copilot/variant-replies')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"conversationId":"string","lastInboundMessage":"string","tone":"friendly"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.chatlychat.com/v1/copilot/variant-replies"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"conversationId\":\"string\",\"lastInboundMessage\":\"string\",\"tone\":\"friendly\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());POST
https://api.chatlychat.com/v1/copilot/suggested-repliesReturn three one-tap chip suggestions for the latest inbound message.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | UUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict. |
Request body application/json
{
"conversationId": "string",
"lastInboundMessage": "string"
}Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/copilot/suggested-replies" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"conversationId":"string","lastInboundMessage":"string"}'TypeScript
const res = await fetch('https://api.chatlychat.com/v1/copilot/suggested-replies', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"conversationId":"string","lastInboundMessage":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://api.chatlychat.com/v1/copilot/suggested-replies",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"conversationId": "string", "lastInboundMessage": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/copilot/suggested-replies", strings.NewReader(`{"conversationId":"string","lastInboundMessage":"string"}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/copilot/suggested-replies');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"conversationId":"string","lastInboundMessage":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://api.chatlychat.com/v1/copilot/suggested-replies')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"conversationId":"string","lastInboundMessage":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.chatlychat.com/v1/copilot/suggested-replies"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"conversationId\":\"string\",\"lastInboundMessage\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());POST
https://api.chatlychat.com/v1/copilot/quality-checkCoach the current draft — short verdicts for tone/length/clarity/missing.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | UUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict. |
Request body application/json
{
"draft": "string",
"lastInboundMessage": ""
}Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/copilot/quality-check" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"draft":"string","lastInboundMessage":""}'TypeScript
const res = await fetch('https://api.chatlychat.com/v1/copilot/quality-check', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"draft":"string","lastInboundMessage":""}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://api.chatlychat.com/v1/copilot/quality-check",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"draft": "string", "lastInboundMessage": ""},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/copilot/quality-check", strings.NewReader(`{"draft":"string","lastInboundMessage":""}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/copilot/quality-check');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"draft":"string","lastInboundMessage":""}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://api.chatlychat.com/v1/copilot/quality-check')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"draft":"string","lastInboundMessage":""}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.chatlychat.com/v1/copilot/quality-check"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"draft\":\"string\",\"lastInboundMessage\":\"\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());POST
https://api.chatlychat.com/v1/copilot/suggest-articlesReturn ranked KB articles relevant to the agent draft + last inbound message.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | UUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict. |
Request body application/json
{
"workspaceId": "string",
"conversationId": "string",
"currentDraft": "",
"lastInboundMessage": ""
}Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/copilot/suggest-articles" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"string","conversationId":"string","currentDraft":"","lastInboundMessage":""}'TypeScript
const res = await fetch('https://api.chatlychat.com/v1/copilot/suggest-articles', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"workspaceId":"string","conversationId":"string","currentDraft":"","lastInboundMessage":""}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://api.chatlychat.com/v1/copilot/suggest-articles",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"workspaceId": "string", "conversationId": "string", "currentDraft": "", "lastInboundMessage": ""},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/copilot/suggest-articles", strings.NewReader(`{"workspaceId":"string","conversationId":"string","currentDraft":"","lastInboundMessage":""}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/copilot/suggest-articles');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"workspaceId":"string","conversationId":"string","currentDraft":"","lastInboundMessage":""}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://api.chatlychat.com/v1/copilot/suggest-articles')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"workspaceId":"string","conversationId":"string","currentDraft":"","lastInboundMessage":""}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.chatlychat.com/v1/copilot/suggest-articles"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"workspaceId\":\"string\",\"conversationId\":\"string\",\"currentDraft\":\"\",\"lastInboundMessage\":\"\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());POST
https://api.chatlychat.com/v1/copilot/insert-articleRender a KB article as a composer-insertable snippet.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | UUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict. |
Request body application/json
{
"articleId": "string",
"conversationId": "string"
}Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/copilot/insert-article" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"articleId":"string","conversationId":"string"}'TypeScript
const res = await fetch('https://api.chatlychat.com/v1/copilot/insert-article', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"articleId":"string","conversationId":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://api.chatlychat.com/v1/copilot/insert-article",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"articleId": "string", "conversationId": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/copilot/insert-article", strings.NewReader(`{"articleId":"string","conversationId":"string"}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/copilot/insert-article');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"articleId":"string","conversationId":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://api.chatlychat.com/v1/copilot/insert-article')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"articleId":"string","conversationId":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.chatlychat.com/v1/copilot/insert-article"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("POST", BodyPublishers.ofString("{\"articleId\":\"string\",\"conversationId\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Was this page helpful?