Skip to main content
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
agent_bots
/
{id}
Update an agent bot
curl --request PATCH \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/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",
  "avatar_url": "https://example.com/avatar.png",
  "bot_type": 0,
  "bot_config": {}
}'
{
  "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 visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

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"

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"

bot_type
integer

The type of the bot (0 for webhook)

Example:

0

bot_config
object

The configuration for the bot

Example:
{}

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

I