PATCH
/
platform
/
api
/
v1
/
agent_bots
/
{id}
Update an agent bot
curl --request PATCH \
  --url https://app.chatwoot.com/platform/api/v1/agent_bots/{id} \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '{
  "name": "My Agent Bot",
  "description": "This is a sample agent bot",
  "outgoing_url": "https://example.com/webhook",
  "account_id": 1,
  "avatar_url": "https://example.com/avatar.png"
}'
{
  "id": 123,
  "name": "<string>",
  "description": "<string>",
  "thumbnail": "<string>",
  "outgoing_url": "<string>",
  "bot_type": "<string>",
  "bot_config": {},
  "account_id": 123,
  "access_token": "<string>",
  "system_bot": true
}

Authorizations

api_access_token
string
header
required

This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles.

Path Parameters

id
integer
required

The ID of the agentbot to be updated

Body

application/json
name
string

The name of the agent bot

Example:

"My Agent Bot"

description
string

The description of the agent bot

Example:

"This is a sample agent bot"

outgoing_url
string

The webhook URL for the bot

Example:

"https://example.com/webhook"

account_id
integer

The account ID to associate the agent bot with

Example:

1

avatar
file

Send the form data with the avatar image binary or use the avatar_url

avatar_url
string

The url to a jpeg, png file for the agent bot avatar

Example:

"https://example.com/avatar.png"

Response

Success

id
number

ID of the agent bot

name
string

The name of the agent bot

description
string

The description about the agent bot

thumbnail
string

The thumbnail of the agent bot

outgoing_url
string

The webhook URL for the bot

bot_type
string

The type of the bot

bot_config
object

The configuration of the bot

account_id
number

Account ID if it's an account specific bot

access_token
string

The access token for the bot

system_bot
boolean

Whether the bot is a system bot