curl --request PUT \
--url https://api.closebot.com/bot/{id} \
--header 'Content-Type: application/json' \
--header 'X-CB-KEY: <api-key>' \
--data '
{
"favorite": true,
"trash": true,
"locked": true,
"rescheduling": true,
"name": "<string>",
"folderId": "<string>",
"category": "<string>",
"followUpActive": true,
"followUpSequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"smartFollowUp": true,
"followUpRepeat": true,
"followUpVarianceMinutes": 123,
"followUpExtraPrompt": "<string>",
"followUpStates": [
{
"name": "<string>",
"isDefault": true,
"sequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"repeatFinal": true,
"extraPrompt": "<string>",
"order": 123
}
]
}
'import requests
url = "https://api.closebot.com/bot/{id}"
payload = {
"favorite": True,
"trash": True,
"locked": True,
"rescheduling": True,
"name": "<string>",
"folderId": "<string>",
"category": "<string>",
"followUpActive": True,
"followUpSequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"smartFollowUp": True,
"followUpRepeat": True,
"followUpVarianceMinutes": 123,
"followUpExtraPrompt": "<string>",
"followUpStates": [
{
"name": "<string>",
"isDefault": True,
"sequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"repeatFinal": True,
"extraPrompt": "<string>",
"order": 123
}
]
}
headers = {
"X-CB-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-CB-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
favorite: true,
trash: true,
locked: true,
rescheduling: true,
name: '<string>',
folderId: '<string>',
category: '<string>',
followUpActive: true,
followUpSequences: [{order: 123, duration: 123, unit: '<string>'}],
smartFollowUp: true,
followUpRepeat: true,
followUpVarianceMinutes: 123,
followUpExtraPrompt: '<string>',
followUpStates: [
{
name: '<string>',
isDefault: true,
sequences: [{order: 123, duration: 123, unit: '<string>'}],
repeatFinal: true,
extraPrompt: '<string>',
order: 123
}
]
})
};
fetch('https://api.closebot.com/bot/{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://api.closebot.com/bot/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'favorite' => true,
'trash' => true,
'locked' => true,
'rescheduling' => true,
'name' => '<string>',
'folderId' => '<string>',
'category' => '<string>',
'followUpActive' => true,
'followUpSequences' => [
[
'order' => 123,
'duration' => 123,
'unit' => '<string>'
]
],
'smartFollowUp' => true,
'followUpRepeat' => true,
'followUpVarianceMinutes' => 123,
'followUpExtraPrompt' => '<string>',
'followUpStates' => [
[
'name' => '<string>',
'isDefault' => true,
'sequences' => [
[
'order' => 123,
'duration' => 123,
'unit' => '<string>'
]
],
'repeatFinal' => true,
'extraPrompt' => '<string>',
'order' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CB-KEY: <api-key>"
],
]);
$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://api.closebot.com/bot/{id}"
payload := strings.NewReader("{\n \"favorite\": true,\n \"trash\": true,\n \"locked\": true,\n \"rescheduling\": true,\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"category\": \"<string>\",\n \"followUpActive\": true,\n \"followUpSequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"smartFollowUp\": true,\n \"followUpRepeat\": true,\n \"followUpVarianceMinutes\": 123,\n \"followUpExtraPrompt\": \"<string>\",\n \"followUpStates\": [\n {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"sequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"repeatFinal\": true,\n \"extraPrompt\": \"<string>\",\n \"order\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-CB-KEY", "<api-key>")
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.put("https://api.closebot.com/bot/{id}")
.header("X-CB-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"favorite\": true,\n \"trash\": true,\n \"locked\": true,\n \"rescheduling\": true,\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"category\": \"<string>\",\n \"followUpActive\": true,\n \"followUpSequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"smartFollowUp\": true,\n \"followUpRepeat\": true,\n \"followUpVarianceMinutes\": 123,\n \"followUpExtraPrompt\": \"<string>\",\n \"followUpStates\": [\n {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"sequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"repeatFinal\": true,\n \"extraPrompt\": \"<string>\",\n \"order\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.closebot.com/bot/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-CB-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"favorite\": true,\n \"trash\": true,\n \"locked\": true,\n \"rescheduling\": true,\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"category\": \"<string>\",\n \"followUpActive\": true,\n \"followUpSequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"smartFollowUp\": true,\n \"followUpRepeat\": true,\n \"followUpVarianceMinutes\": 123,\n \"followUpExtraPrompt\": \"<string>\",\n \"followUpStates\": [\n {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"sequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"repeatFinal\": true,\n \"extraPrompt\": \"<string>\",\n \"order\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"modifiedAt": "<string>",
"modifiedBy": "<string>",
"versions": [
{
"version": "<string>",
"name": "<string>",
"published": true,
"modifiedAt": "2023-11-07T05:31:56Z",
"modifiedBy": "<string>"
}
],
"sources": [
{
"id": "<string>",
"category": "<string>",
"key": "<string>",
"name": "<string>",
"tags": [
{
"name": "<string>",
"approveDeny": true,
"id": "<string>"
}
],
"tagFilterConfig": {
"operator": "<string>",
"groups": [
{
"operator": "<string>",
"rules": [
{
"tagName": "<string>",
"tagId": "<string>",
"condition": "<string>"
}
]
}
]
},
"channelList": [
"<string>"
],
"personaNameOverride": "<string>",
"enabled": true,
"flowVariableValues": {}
}
],
"personaIds": [
"<string>"
],
"favorited": true,
"locked": true,
"reschedulingEnabled": true,
"category": "<string>",
"folderId": "<string>",
"followUpActive": true,
"followUpSequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"smartFollowUp": true,
"followUpRepeat": true,
"followUpVarianceMinutes": 123,
"followUpExtraPrompt": "<string>",
"tools": [
{
"id": "<string>",
"type": "<string>",
"enabled": true,
"options": {}
}
],
"followUpStates": [
{
"id": 123,
"name": "<string>",
"isDefault": true,
"sequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"repeatFinal": true,
"extraPrompt": "<string>",
"order": 123
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Update a bot
Updates fields in a bot.
Only non-null fields are updated. Any missing or null field is ignored.
curl --request PUT \
--url https://api.closebot.com/bot/{id} \
--header 'Content-Type: application/json' \
--header 'X-CB-KEY: <api-key>' \
--data '
{
"favorite": true,
"trash": true,
"locked": true,
"rescheduling": true,
"name": "<string>",
"folderId": "<string>",
"category": "<string>",
"followUpActive": true,
"followUpSequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"smartFollowUp": true,
"followUpRepeat": true,
"followUpVarianceMinutes": 123,
"followUpExtraPrompt": "<string>",
"followUpStates": [
{
"name": "<string>",
"isDefault": true,
"sequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"repeatFinal": true,
"extraPrompt": "<string>",
"order": 123
}
]
}
'import requests
url = "https://api.closebot.com/bot/{id}"
payload = {
"favorite": True,
"trash": True,
"locked": True,
"rescheduling": True,
"name": "<string>",
"folderId": "<string>",
"category": "<string>",
"followUpActive": True,
"followUpSequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"smartFollowUp": True,
"followUpRepeat": True,
"followUpVarianceMinutes": 123,
"followUpExtraPrompt": "<string>",
"followUpStates": [
{
"name": "<string>",
"isDefault": True,
"sequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"repeatFinal": True,
"extraPrompt": "<string>",
"order": 123
}
]
}
headers = {
"X-CB-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-CB-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
favorite: true,
trash: true,
locked: true,
rescheduling: true,
name: '<string>',
folderId: '<string>',
category: '<string>',
followUpActive: true,
followUpSequences: [{order: 123, duration: 123, unit: '<string>'}],
smartFollowUp: true,
followUpRepeat: true,
followUpVarianceMinutes: 123,
followUpExtraPrompt: '<string>',
followUpStates: [
{
name: '<string>',
isDefault: true,
sequences: [{order: 123, duration: 123, unit: '<string>'}],
repeatFinal: true,
extraPrompt: '<string>',
order: 123
}
]
})
};
fetch('https://api.closebot.com/bot/{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://api.closebot.com/bot/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'favorite' => true,
'trash' => true,
'locked' => true,
'rescheduling' => true,
'name' => '<string>',
'folderId' => '<string>',
'category' => '<string>',
'followUpActive' => true,
'followUpSequences' => [
[
'order' => 123,
'duration' => 123,
'unit' => '<string>'
]
],
'smartFollowUp' => true,
'followUpRepeat' => true,
'followUpVarianceMinutes' => 123,
'followUpExtraPrompt' => '<string>',
'followUpStates' => [
[
'name' => '<string>',
'isDefault' => true,
'sequences' => [
[
'order' => 123,
'duration' => 123,
'unit' => '<string>'
]
],
'repeatFinal' => true,
'extraPrompt' => '<string>',
'order' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CB-KEY: <api-key>"
],
]);
$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://api.closebot.com/bot/{id}"
payload := strings.NewReader("{\n \"favorite\": true,\n \"trash\": true,\n \"locked\": true,\n \"rescheduling\": true,\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"category\": \"<string>\",\n \"followUpActive\": true,\n \"followUpSequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"smartFollowUp\": true,\n \"followUpRepeat\": true,\n \"followUpVarianceMinutes\": 123,\n \"followUpExtraPrompt\": \"<string>\",\n \"followUpStates\": [\n {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"sequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"repeatFinal\": true,\n \"extraPrompt\": \"<string>\",\n \"order\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-CB-KEY", "<api-key>")
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.put("https://api.closebot.com/bot/{id}")
.header("X-CB-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"favorite\": true,\n \"trash\": true,\n \"locked\": true,\n \"rescheduling\": true,\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"category\": \"<string>\",\n \"followUpActive\": true,\n \"followUpSequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"smartFollowUp\": true,\n \"followUpRepeat\": true,\n \"followUpVarianceMinutes\": 123,\n \"followUpExtraPrompt\": \"<string>\",\n \"followUpStates\": [\n {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"sequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"repeatFinal\": true,\n \"extraPrompt\": \"<string>\",\n \"order\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.closebot.com/bot/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-CB-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"favorite\": true,\n \"trash\": true,\n \"locked\": true,\n \"rescheduling\": true,\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"category\": \"<string>\",\n \"followUpActive\": true,\n \"followUpSequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"smartFollowUp\": true,\n \"followUpRepeat\": true,\n \"followUpVarianceMinutes\": 123,\n \"followUpExtraPrompt\": \"<string>\",\n \"followUpStates\": [\n {\n \"name\": \"<string>\",\n \"isDefault\": true,\n \"sequences\": [\n {\n \"order\": 123,\n \"duration\": 123,\n \"unit\": \"<string>\"\n }\n ],\n \"repeatFinal\": true,\n \"extraPrompt\": \"<string>\",\n \"order\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"modifiedAt": "<string>",
"modifiedBy": "<string>",
"versions": [
{
"version": "<string>",
"name": "<string>",
"published": true,
"modifiedAt": "2023-11-07T05:31:56Z",
"modifiedBy": "<string>"
}
],
"sources": [
{
"id": "<string>",
"category": "<string>",
"key": "<string>",
"name": "<string>",
"tags": [
{
"name": "<string>",
"approveDeny": true,
"id": "<string>"
}
],
"tagFilterConfig": {
"operator": "<string>",
"groups": [
{
"operator": "<string>",
"rules": [
{
"tagName": "<string>",
"tagId": "<string>",
"condition": "<string>"
}
]
}
]
},
"channelList": [
"<string>"
],
"personaNameOverride": "<string>",
"enabled": true,
"flowVariableValues": {}
}
],
"personaIds": [
"<string>"
],
"favorited": true,
"locked": true,
"reschedulingEnabled": true,
"category": "<string>",
"folderId": "<string>",
"followUpActive": true,
"followUpSequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"smartFollowUp": true,
"followUpRepeat": true,
"followUpVarianceMinutes": 123,
"followUpExtraPrompt": "<string>",
"tools": [
{
"id": "<string>",
"type": "<string>",
"enabled": true,
"options": {}
}
],
"followUpStates": [
{
"id": 123,
"name": "<string>",
"isDefault": true,
"sequences": [
{
"order": 123,
"duration": 123,
"unit": "<string>"
}
],
"repeatFinal": true,
"extraPrompt": "<string>",
"order": 123
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
CloseBot API Key Authorization
Path Parameters
The bot ID.
Body
Whether the bot is favorited
Whether the bot is trashed
Whether the bot is locked
Whether the bot has conversation rescheduling enabled
The name of the bot
The folder ID of the bot
The category of the bot
Whether the bot does follow-ups
The follow-up sequences of the bot
Show child attributes
Show child attributes
Whether the bot does smart follow-ups
Whether the bot repeats the last follow-up sequence
The variance minutes for the follow-ups
The extra prompt for the follow-ups
The follow-up states (multi-cadence) for the bot
Show child attributes
Show child attributes
Response
Success
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

