API Docs

bots

AdminUpdated Sep 19, 2026
GEThttps://api.chatlychat.com/v1/bots
List configured AI bots in this workspace (cursor-paginated)
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 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.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/bots" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/bots",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/bots", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	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/bots');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/bots
Create a new AI bot (hand-built; no template provenance)
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 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
{
  "name": "string",
  "slug": "string",
  "description": "string",
  "systemPrompt": "string",
  "model": "string",
  "status": "active",
  "enabledTools": [
    "string"
  ],
  "kbScope": {
    "collectionIds": [
      "string"
    ]
  },
  "maxToolCalls": 0,
  "guardrails": {
    "maxOutputChars": 0,
    "bannedKeywords": [
      "string"
    ],
    "piiPolicy": "allow"
  },
  "personaMeta": {
    "tone": "string",
    "language": "string",
    "tagline": "string",
    "avatarUrl": "string"
  },
  "escalationRules": [
    {
      "id": "string",
      "triggerType": "sentiment_negative",
      "trigger": "string",
      "action": "human.handoff",
      "actionArgs": {}
    }
  ]
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/bots" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","slug":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name":"string","slug":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/bots",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"name": "string", "slug": "string", "description": "string", "systemPrompt": "string", "model": "string", "status": "active", "enabledTools": ["string"], "kbScope": {"collectionIds": ["string"]}, "maxToolCalls": 0, "guardrails": {"maxOutputChars": 0, "bannedKeywords": ["string"], "piiPolicy": "allow"}, "personaMeta": {"tone": "string", "language": "string", "tagline": "string", "avatarUrl": "string"}, "escalationRules": [{"id": "string", "triggerType": "sentiment_negative", "trigger": "string", "action": "human.handoff", "actionArgs": {}}]},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/bots", strings.NewReader(`{"name":"string","slug":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}`))
	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/bots');
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, '{"name":"string","slug":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"name":"string","slug":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"name\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"systemPrompt\":\"string\",\"model\":\"string\",\"status\":\"active\",\"enabledTools\":[\"string\"],\"kbScope\":{\"collectionIds\":[\"string\"]},\"maxToolCalls\":0,\"guardrails\":{\"maxOutputChars\":0,\"bannedKeywords\":[\"string\"],\"piiPolicy\":\"allow\"},\"personaMeta\":{\"tone\":\"string\",\"language\":\"string\",\"tagline\":\"string\",\"avatarUrl\":\"string\"},\"escalationRules\":[{\"id\":\"string\",\"triggerType\":\"sentiment_negative\",\"trigger\":\"string\",\"action\":\"human.handoff\",\"actionArgs\":{}}]}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/bots/{id}
Read one AI bot by id
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/bots/{id}" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/bots/{id}",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/bots/{id}", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	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/bots/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
DELETEhttps://api.chatlychat.com/v1/bots/{id}
Delete an AI bot
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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.
Responses
204
Code samples
cURL
curl -X DELETE "https://api.chatlychat.com/v1/bots/{id}" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}', {
  method: 'DELETE',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://api.chatlychat.com/v1/bots/{id}",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.chatlychat.com/v1/bots/{id}", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	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/bots/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}')
req = Net::HTTP::Delete.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}"))
    .header("Idempotency-Key", "<value>")
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
PATCHhttps://api.chatlychat.com/v1/bots/{id}
Update an AI bot (partial)
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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
{
  "name": "string",
  "description": "string",
  "systemPrompt": "string",
  "model": "string",
  "status": "active",
  "enabledTools": [
    "string"
  ],
  "kbScope": {
    "collectionIds": [
      "string"
    ]
  },
  "maxToolCalls": 0,
  "guardrails": {
    "maxOutputChars": 0,
    "bannedKeywords": [
      "string"
    ],
    "piiPolicy": "allow"
  },
  "personaMeta": {
    "tone": "string",
    "language": "string",
    "tagline": "string",
    "avatarUrl": "string"
  },
  "escalationRules": [
    {
      "id": "string",
      "triggerType": "sentiment_negative",
      "trigger": "string",
      "action": "human.handoff",
      "actionArgs": {}
    }
  ]
}
Responses
200
Code samples
cURL
curl -X PATCH "https://api.chatlychat.com/v1/bots/{id}" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}', {
  method: 'PATCH',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PATCH",
    "https://api.chatlychat.com/v1/bots/{id}",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"name": "string", "description": "string", "systemPrompt": "string", "model": "string", "status": "active", "enabledTools": ["string"], "kbScope": {"collectionIds": ["string"]}, "maxToolCalls": 0, "guardrails": {"maxOutputChars": 0, "bannedKeywords": ["string"], "piiPolicy": "allow"}, "personaMeta": {"tone": "string", "language": "string", "tagline": "string", "avatarUrl": "string"}, "escalationRules": [{"id": "string", "triggerType": "sentiment_negative", "trigger": "string", "action": "human.handoff", "actionArgs": {}}]},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("PATCH", "https://api.chatlychat.com/v1/bots/{id}", strings.NewReader(`{"name":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}`))
	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/bots/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}')
req = Net::HTTP::Patch.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"name":"string","description":"string","systemPrompt":"string","model":"string","status":"active","enabledTools":["string"],"kbScope":{"collectionIds":["string"]},"maxToolCalls":0,"guardrails":{"maxOutputChars":0,"bannedKeywords":["string"],"piiPolicy":"allow"},"personaMeta":{"tone":"string","language":"string","tagline":"string","avatarUrl":"string"},"escalationRules":[{"id":"string","triggerType":"sentiment_negative","trigger":"string","action":"human.handoff","actionArgs":{}}]}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"name\":\"string\",\"description\":\"string\",\"systemPrompt\":\"string\",\"model\":\"string\",\"status\":\"active\",\"enabledTools\":[\"string\"],\"kbScope\":{\"collectionIds\":[\"string\"]},\"maxToolCalls\":0,\"guardrails\":{\"maxOutputChars\":0,\"bannedKeywords\":[\"string\"],\"piiPolicy\":\"allow\"},\"personaMeta\":{\"tone\":\"string\",\"language\":\"string\",\"tagline\":\"string\",\"avatarUrl\":\"string\"},\"escalationRules\":[{\"id\":\"string\",\"triggerType\":\"sentiment_negative\",\"trigger\":\"string\",\"action\":\"human.handoff\",\"actionArgs\":{}}]}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/bots/{id}/duplicate
Clone a bot inside the same workspace (drafts, never live)
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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.
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/bots/{id}/duplicate" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}/duplicate', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/bots/{id}/duplicate",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/bots/{id}/duplicate", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	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/bots/{id}/duplicate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}/duplicate')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}/duplicate"))
    .header("Idempotency-Key", "<value>")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/bots/{id}/template-diff
Compare a template-installed bot against the current template content
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/bots/{id}/template-diff" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}/template-diff', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/bots/{id}/template-diff",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/bots/{id}/template-diff", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	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/bots/{id}/template-diff');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}/template-diff')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}/template-diff"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/bots/{id}/sync-template
Reset a template-installed bot back to its template defaults (preserves name)
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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.
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/bots/{id}/sync-template" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}/sync-template', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/bots/{id}/sync-template",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/bots/{id}/sync-template", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	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/bots/{id}/sync-template');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}/sync-template')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}/sync-template"))
    .header("Idempotency-Key", "<value>")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/bots/{id}/playground/turn
Run one shot through the autonomous loop without writing to a real conversation
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 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
{
  "messages": [
    {
      "role": "user",
      "content": "string"
    }
  ],
  "scenarioId": "string"
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/bots/{id}/playground/turn" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"string"}],"scenarioId":"string"}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/bots/{id}/playground/turn', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"messages":[{"role":"user","content":"string"}],"scenarioId":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/bots/{id}/playground/turn",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"messages": [{"role": "user", "content": "string"}], "scenarioId": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/bots/{id}/playground/turn", strings.NewReader(`{"messages":[{"role":"user","content":"string"}],"scenarioId":"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/bots/{id}/playground/turn');
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, '{"messages":[{"role":"user","content":"string"}],"scenarioId":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/bots/{id}/playground/turn')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"messages":[{"role":"user","content":"string"}],"scenarioId":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
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/bots/{id}/playground/turn"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"messages\":[{\"role\":\"user\",\"content\":\"string\"}],\"scenarioId\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Was this page helpful?