Skip to main content
PATCH
/
ai-agents
/
agents
/
{uid}
Update BYO Agent
curl --request PATCH \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agents/{uid} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "<string>",
  "icon": "<string>",
  "isActive": true,
  "integrateWith": "mastra",
  "integrationType": "agent",
  "integrationMeta": {
    "baseUrl": "https://my-mastra-app.example.com",
    "agentId": "weatherAgent"
  },
  "tools": [
    "<string>"
  ],
  "actions": [
    "<string>"
  ],
  "metaData": {
    "greetingMessage": "<string>",
    "introductoryMessage": "<string>",
    "suggestedMessages": [
      "<string>"
    ]
  }
}
'
{
  "success": true
}

Authorizations

apikey
string
header
required

API Key (i.e. Rest API Key from the Dashboard).

Headers

chatApiVersion
string
default:v3.0

Chat API version. Defaults to v3.0.

Path Parameters

uid
string
required

Unique identifier of the agent

Body

application/json
name
string

Name of the agent

icon
string<url>

URL to the icon/avatar of the agent

isActive
boolean
default:true

Whether the agent is active

integrateWith
enum<string>

Integration platform identifier

Available options:
mastra
integrationType
enum<string>

Type of connection

Available options:
agent
integrationMeta
object

Mastra-specific configuration

tools
string[]

List of tool names (must exist in the app's tools)

actions
string[]

List of action names (must exist in the app's actions)

metaData
object

Metadata for the agent

Response

200 - application/json

Agent updated successfully

success
boolean
required

Indicates whether the operation was successful

Example:

true