Перейти к содержимому

Update Bot

PATCH
/v1/bots/{bot_id}
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 не удаляет бота и не отзывает токен — он просто перестаёт отвечать, и это обратимо. Незаданные поля не трогаются.

bot_id
required
Bot Id
string format: uuid
Media typeapplication/json
BotUpdateIn

Правка бота. None — поле не трогаем (частичное обновление).

object
agent_slug
Any of:
string
<= 64 characters
allowlist
Any of:
Array<integer>
enabled
Any of:
boolean
title
Any of:
string
<= 120 characters
Examplegenerated
{
"agent_slug": "example",
"allowlist": [
1
],
"enabled": true,
"title": "example"
}

Successful Response

Media typeapplication/json
BotOut

Карточка бота для экрана «Боты» и мастера.

object
agent_slug
required
Agent Slug
string
allowlist_count
Allowlist Count
integer
0
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>
ValidationError
object
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"
}
]
}