curl --request PUT \
--url https://api.botpress.cloud/v1/admin/bots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"url": "<string>",
"configuration": {
"data": {},
"schema": {}
},
"tags": {},
"blocked": true,
"maxExecutionTime": 123,
"alwaysAlive": true,
"user": {
"tags": {}
},
"message": {
"tags": {}
},
"conversation": {
"tags": {}
},
"events": {},
"actions": {},
"states": {},
"recurringEvents": {},
"integrations": {},
"plugins": {},
"code": "<string>",
"name": "<string>",
"description": "<string>",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"secrets": {},
"layers": [
"<string>"
],
"shouldMergePlugins": true
}
'import requests
url = "https://api.botpress.cloud/v1/admin/bots/{id}"
payload = {
"url": "<string>",
"configuration": {
"data": {},
"schema": {}
},
"tags": {},
"blocked": True,
"maxExecutionTime": 123,
"alwaysAlive": True,
"user": { "tags": {} },
"message": { "tags": {} },
"conversation": { "tags": {} },
"events": {},
"actions": {},
"states": {},
"recurringEvents": {},
"integrations": {},
"plugins": {},
"code": "<string>",
"name": "<string>",
"description": "<string>",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"secrets": {},
"layers": ["<string>"],
"shouldMergePlugins": True
}
headers = {
"x-workspace-id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-workspace-id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: '<string>',
configuration: {data: {}, schema: {}},
tags: {},
blocked: true,
maxExecutionTime: 123,
alwaysAlive: true,
user: {tags: {}},
message: {tags: {}},
conversation: {tags: {}},
events: {},
actions: {},
states: {},
recurringEvents: {},
integrations: {},
plugins: {},
code: '<string>',
name: '<string>',
description: '<string>',
medias: [{url: '<string>', name: '<string>'}],
secrets: {},
layers: ['<string>'],
shouldMergePlugins: true
})
};
fetch('https://api.botpress.cloud/v1/admin/bots/{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.botpress.cloud/v1/admin/bots/{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([
'url' => '<string>',
'configuration' => [
'data' => [
],
'schema' => [
]
],
'tags' => [
],
'blocked' => true,
'maxExecutionTime' => 123,
'alwaysAlive' => true,
'user' => [
'tags' => [
]
],
'message' => [
'tags' => [
]
],
'conversation' => [
'tags' => [
]
],
'events' => [
],
'actions' => [
],
'states' => [
],
'recurringEvents' => [
],
'integrations' => [
],
'plugins' => [
],
'code' => '<string>',
'name' => '<string>',
'description' => '<string>',
'medias' => [
[
'url' => '<string>',
'name' => '<string>'
]
],
'secrets' => [
],
'layers' => [
'<string>'
],
'shouldMergePlugins' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.botpress.cloud/v1/admin/bots/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"configuration\": {\n \"data\": {},\n \"schema\": {}\n },\n \"tags\": {},\n \"blocked\": true,\n \"maxExecutionTime\": 123,\n \"alwaysAlive\": true,\n \"user\": {\n \"tags\": {}\n },\n \"message\": {\n \"tags\": {}\n },\n \"conversation\": {\n \"tags\": {}\n },\n \"events\": {},\n \"actions\": {},\n \"states\": {},\n \"recurringEvents\": {},\n \"integrations\": {},\n \"plugins\": {},\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"medias\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"secrets\": {},\n \"layers\": [\n \"<string>\"\n ],\n \"shouldMergePlugins\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.botpress.cloud/v1/admin/bots/{id}")
.header("x-workspace-id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"configuration\": {\n \"data\": {},\n \"schema\": {}\n },\n \"tags\": {},\n \"blocked\": true,\n \"maxExecutionTime\": 123,\n \"alwaysAlive\": true,\n \"user\": {\n \"tags\": {}\n },\n \"message\": {\n \"tags\": {}\n },\n \"conversation\": {\n \"tags\": {}\n },\n \"events\": {},\n \"actions\": {},\n \"states\": {},\n \"recurringEvents\": {},\n \"integrations\": {},\n \"plugins\": {},\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"medias\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"secrets\": {},\n \"layers\": [\n \"<string>\"\n ],\n \"shouldMergePlugins\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.botpress.cloud/v1/admin/bots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-workspace-id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"configuration\": {\n \"data\": {},\n \"schema\": {}\n },\n \"tags\": {},\n \"blocked\": true,\n \"maxExecutionTime\": 123,\n \"alwaysAlive\": true,\n \"user\": {\n \"tags\": {}\n },\n \"message\": {\n \"tags\": {}\n },\n \"conversation\": {\n \"tags\": {}\n },\n \"events\": {},\n \"actions\": {},\n \"states\": {},\n \"recurringEvents\": {},\n \"integrations\": {},\n \"plugins\": {},\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"medias\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"secrets\": {},\n \"layers\": [\n \"<string>\"\n ],\n \"shouldMergePlugins\": true\n}"
response = http.request(request)
puts response.read_body{
"bot": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signingSecret": "<string>",
"integrations": {},
"plugins": {},
"user": {
"tags": {}
},
"conversation": {
"tags": {}
},
"message": {
"tags": {}
},
"states": {},
"configuration": {
"data": {},
"schema": {}
},
"events": {},
"recurringEvents": {},
"subscriptions": {
"events": {}
},
"actions": {},
"tags": {},
"name": "<string>",
"dev": true,
"secrets": [
"<string>"
],
"alwaysAlive": true,
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"maxExecutionTime": 123,
"description": "<string>",
"deployedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}{
"bot": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signingSecret": "<string>",
"integrations": {},
"plugins": {},
"user": {
"tags": {}
},
"conversation": {
"tags": {}
},
"message": {
"tags": {}
},
"states": {},
"configuration": {
"data": {},
"schema": {}
},
"events": {},
"recurringEvents": {},
"subscriptions": {
"events": {}
},
"actions": {},
"tags": {},
"name": "<string>",
"dev": true,
"secrets": [
"<string>"
],
"alwaysAlive": true,
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"maxExecutionTime": 123,
"description": "<string>",
"deployedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}Update bot
curl --request PUT \
--url https://api.botpress.cloud/v1/admin/bots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"url": "<string>",
"configuration": {
"data": {},
"schema": {}
},
"tags": {},
"blocked": true,
"maxExecutionTime": 123,
"alwaysAlive": true,
"user": {
"tags": {}
},
"message": {
"tags": {}
},
"conversation": {
"tags": {}
},
"events": {},
"actions": {},
"states": {},
"recurringEvents": {},
"integrations": {},
"plugins": {},
"code": "<string>",
"name": "<string>",
"description": "<string>",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"secrets": {},
"layers": [
"<string>"
],
"shouldMergePlugins": true
}
'import requests
url = "https://api.botpress.cloud/v1/admin/bots/{id}"
payload = {
"url": "<string>",
"configuration": {
"data": {},
"schema": {}
},
"tags": {},
"blocked": True,
"maxExecutionTime": 123,
"alwaysAlive": True,
"user": { "tags": {} },
"message": { "tags": {} },
"conversation": { "tags": {} },
"events": {},
"actions": {},
"states": {},
"recurringEvents": {},
"integrations": {},
"plugins": {},
"code": "<string>",
"name": "<string>",
"description": "<string>",
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"secrets": {},
"layers": ["<string>"],
"shouldMergePlugins": True
}
headers = {
"x-workspace-id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-workspace-id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: '<string>',
configuration: {data: {}, schema: {}},
tags: {},
blocked: true,
maxExecutionTime: 123,
alwaysAlive: true,
user: {tags: {}},
message: {tags: {}},
conversation: {tags: {}},
events: {},
actions: {},
states: {},
recurringEvents: {},
integrations: {},
plugins: {},
code: '<string>',
name: '<string>',
description: '<string>',
medias: [{url: '<string>', name: '<string>'}],
secrets: {},
layers: ['<string>'],
shouldMergePlugins: true
})
};
fetch('https://api.botpress.cloud/v1/admin/bots/{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.botpress.cloud/v1/admin/bots/{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([
'url' => '<string>',
'configuration' => [
'data' => [
],
'schema' => [
]
],
'tags' => [
],
'blocked' => true,
'maxExecutionTime' => 123,
'alwaysAlive' => true,
'user' => [
'tags' => [
]
],
'message' => [
'tags' => [
]
],
'conversation' => [
'tags' => [
]
],
'events' => [
],
'actions' => [
],
'states' => [
],
'recurringEvents' => [
],
'integrations' => [
],
'plugins' => [
],
'code' => '<string>',
'name' => '<string>',
'description' => '<string>',
'medias' => [
[
'url' => '<string>',
'name' => '<string>'
]
],
'secrets' => [
],
'layers' => [
'<string>'
],
'shouldMergePlugins' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.botpress.cloud/v1/admin/bots/{id}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"configuration\": {\n \"data\": {},\n \"schema\": {}\n },\n \"tags\": {},\n \"blocked\": true,\n \"maxExecutionTime\": 123,\n \"alwaysAlive\": true,\n \"user\": {\n \"tags\": {}\n },\n \"message\": {\n \"tags\": {}\n },\n \"conversation\": {\n \"tags\": {}\n },\n \"events\": {},\n \"actions\": {},\n \"states\": {},\n \"recurringEvents\": {},\n \"integrations\": {},\n \"plugins\": {},\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"medias\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"secrets\": {},\n \"layers\": [\n \"<string>\"\n ],\n \"shouldMergePlugins\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.botpress.cloud/v1/admin/bots/{id}")
.header("x-workspace-id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"configuration\": {\n \"data\": {},\n \"schema\": {}\n },\n \"tags\": {},\n \"blocked\": true,\n \"maxExecutionTime\": 123,\n \"alwaysAlive\": true,\n \"user\": {\n \"tags\": {}\n },\n \"message\": {\n \"tags\": {}\n },\n \"conversation\": {\n \"tags\": {}\n },\n \"events\": {},\n \"actions\": {},\n \"states\": {},\n \"recurringEvents\": {},\n \"integrations\": {},\n \"plugins\": {},\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"medias\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"secrets\": {},\n \"layers\": [\n \"<string>\"\n ],\n \"shouldMergePlugins\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.botpress.cloud/v1/admin/bots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-workspace-id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"configuration\": {\n \"data\": {},\n \"schema\": {}\n },\n \"tags\": {},\n \"blocked\": true,\n \"maxExecutionTime\": 123,\n \"alwaysAlive\": true,\n \"user\": {\n \"tags\": {}\n },\n \"message\": {\n \"tags\": {}\n },\n \"conversation\": {\n \"tags\": {}\n },\n \"events\": {},\n \"actions\": {},\n \"states\": {},\n \"recurringEvents\": {},\n \"integrations\": {},\n \"plugins\": {},\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"medias\": [\n {\n \"url\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"secrets\": {},\n \"layers\": [\n \"<string>\"\n ],\n \"shouldMergePlugins\": true\n}"
response = http.request(request)
puts response.read_body{
"bot": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signingSecret": "<string>",
"integrations": {},
"plugins": {},
"user": {
"tags": {}
},
"conversation": {
"tags": {}
},
"message": {
"tags": {}
},
"states": {},
"configuration": {
"data": {},
"schema": {}
},
"events": {},
"recurringEvents": {},
"subscriptions": {
"events": {}
},
"actions": {},
"tags": {},
"name": "<string>",
"dev": true,
"secrets": [
"<string>"
],
"alwaysAlive": true,
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"maxExecutionTime": 123,
"description": "<string>",
"deployedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}{
"bot": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"signingSecret": "<string>",
"integrations": {},
"plugins": {},
"user": {
"tags": {}
},
"conversation": {
"tags": {}
},
"message": {
"tags": {}
},
"states": {},
"configuration": {
"data": {},
"schema": {}
},
"events": {},
"recurringEvents": {},
"subscriptions": {
"events": {}
},
"actions": {},
"tags": {},
"name": "<string>",
"dev": true,
"secrets": [
"<string>"
],
"alwaysAlive": true,
"medias": [
{
"url": "<string>",
"name": "<string>"
}
],
"maxExecutionTime": 123,
"description": "<string>",
"deployedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Workspace ID
Whether the client supports bots with multiple instances of the same integration. Set to "true" to receive integration instances keyed by their alias instead of their id. This header will be removed in the future, and the API will always return multiple instances keyed by alias.
Path Parameters
Bot ID
Body
Bot metadata
Show child attributes
Show child attributes
Maximum execution time (in seconds).
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
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A mapping of plugin aliases to their configuration
Show child attributes
Show child attributes
Show child attributes
Show child attributes
JavaScript code of the bot
Optional name for the bot, if not provided will be auto-generated
1Optional description for the bot
2000Secrets are values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing.
Show child attributes
Show child attributes
UNUSED. Please ignore this field. It will be removed in the near future.
Response
Success
Show child attributes
Show child attributes
Was this page helpful?