Update Bot
PATCH
/v1/bots/{bot_id}
const url = 'https://api.cloud.agentums.ru/v1/bots/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent_slug":"example","allowlist":[1],"enabled":true,"title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.cloud.agentums.ru/v1/bots/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "agent_slug": "example", "allowlist": [ 1 ], "enabled": true, "title": "example" }'Настроить бота: роль ассистента (agent_slug), название, включение и список
допущенных.
enabled=false не удаляет бота и не отзывает токен — он просто перестаёт отвечать,
и это обратимо. Незаданные поля не трогаются.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»bot_id
required
Bot Id
string format: uuid
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
BotUpdateIn
Правка бота. None — поле не трогаем (частичное обновление).
object
Examplegenerated
{ "agent_slug": "example", "allowlist": [ 1 ], "enabled": true, "title": "example"}Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
BotOut
Карточка бота для экрана «Боты» и мастера.
object
agent_slug
required
Agent Slug
string
allowlist_count
Allowlist Count
integer
can_read_all_messages
Can Read All Messages
boolean
created_at
Created At
string
deep_link
Deep Link
string
enabled
required
Enabled
boolean
id
required
Id
string
owner_bound
required
Owner Bound
boolean
provider
required
Provider
string
title
required
Title
string
username
required
Username
string
webhook_set
required
Webhook Set
boolean
Example
{ "allowlist_count": 0, "can_read_all_messages": false, "created_at": "", "deep_link": ""}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}