跳转到主要内容
POST
/
api
/
routes
/
update
Update a route
curl --request POST \
  --url http://localhost:8080/api/routes/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_bot_id": 123,
  "target_bot_id": 123,
  "action": "<string>",
  "id": 123,
  "condition_type": "<string>",
  "condition_value": "<string>",
  "target_chat_id": 123,
  "enabled": true,
  "description": "<string>"
}
'
{
  "id": 123,
  "source_bot_id": 123,
  "target_bot_id": 123,
  "condition_type": "<string>",
  "condition_value": "<string>",
  "action": "<string>",
  "target_chat_id": 123,
  "enabled": true,
  "description": "<string>"
}

授权

Authorization
string
header
必填

API key with bmx_ prefix. Obtain via /api/auth/api-keys.

请求体

application/json
source_bot_id
integer
必填

Source bot ID

target_bot_id
integer
必填

Target bot ID

action
string
必填

Routing action

id
integer
必填

Route ID to update

condition_type
string

Condition type (chat_id, user_id, keyword, all)

condition_value
string

Value for the condition

target_chat_id
integer

Target chat ID

enabled
boolean
默认值:true

Start enabled

description
string

Human-readable description

响应

Route updated

id
integer

Route ID

source_bot_id
integer

Source bot that receives messages

target_bot_id
integer

Target bot that forwards messages

condition_type
string

Condition to match (e.g., chat_id, user_id, keyword, all)

condition_value
string

Value to match for the condition

action
string

Action to take (forward, copy, etc.)

target_chat_id
integer

Target chat to route messages to

enabled
boolean

Whether this route is active

description
string

Human-readable description of this route