Skip to main content
PATCH
/
v2.0
/
aiagents
/
{aiAgentId}
updates an AI Agent
curl --request PATCH \
  --url https://api-trial.cognigy.ai/new/v2.0/aiagents/{aiAgentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "Cognigy AI Agent",
  "image": "https://cognigy.com/ai-agent.png",
  "imageOptimizedFormat": true,
  "knowledgeReferenceId": "c7b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
  "description": "I am a virtual assistant that can help you with your questions.",
  "speakingStyle": {
    "completeness": "concise",
    "formality": "formal"
  },
  "voiceConfigs": {
    "ttsVoice": "Xb7hH8MSUJpSbSDYk0k2",
    "ttsLanguage": "zh",
    "ttsVendor": "Elevenlabs",
    "ttsModel": "eleven_multilingual_v2",
    "ttsLabel": "microsoft US",
    "ttsDisableCache": false
  },
  "enableVoiceConfigs": false,
  "safetySettings": {
    "avoidHarmfulContent": true,
    "avoidUngroundedContent": true,
    "avoidCopyrightInfringements": true,
    "preventJailbreakAndManipulation": true
  },
  "contactProfilesOption": "selectedProfileFields",
  "contactProfilesSelected": [
    "name",
    "email"
  ],
  "instructions": "I can help you with your questions, provide information and much more."
}'
This response does not have an example.

Authorizations

X-API-Key
string
header
required

Supply the API Key in the HTTP-Header

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

api_key
string
query
required

Supply the API Key in the Url-Query

Headers

Accept
enum<string>

The default media type is application/hal+json. Use application/json for pure data results.

Available options:
application/json,
application/hal+json,
application/xml,
text/xml,
text/csv

Path Parameters

aiAgentId
string
required

The Id of the Ai Agent

Required string length: 24

Body

application/json
name
string
Example:

"Cognigy AI Agent"

image
string

Avatar of the AI Agent.

Example:

"https://cognigy.com/ai-agent.png"

imageOptimizedFormat
boolean

Whether the optimized image format defined by Cognigy is used.

Example:

true

knowledgeReferenceId
string<uuid> | null

A referenceId of a Knowledge Store this Agent will use as base knowledge or null.

Example:

"c7b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b"

description
string

A short description of the AI Agent, up to 1000 characters.

Maximum length: 1000
Example:

"I am a virtual assistant that can help you with your questions."

speakingStyle
object
Example:
{
"completeness": "concise",
"formality": "formal"
}
voiceConfigs
object
Example:
{
"ttsVoice": "Xb7hH8MSUJpSbSDYk0k2",
"ttsLanguage": "zh",
"ttsVendor": "Elevenlabs",
"ttsModel": "eleven_multilingual_v2",
"ttsLabel": "microsoft US",
"ttsDisableCache": false
}
enableVoiceConfigs
boolean

Enables the use of voice configuration.

Example:

false

safetySettings
object
contactProfilesOption
enum<string>

Option to enable or customize Contact profiles selection for the AI Agent.

Available options:
none,
selectedProfileFields,
completeProfile,
profileMemoriesOnly
Example:

"selectedProfileFields"

contactProfilesSelected
string[]

Selected contact profiles for the AI Agent, it is used only when contactProfilesOption is set to 'selectedProfileFields'.

Example:
["name", "email"]
instructions
string

Instructions for the AI Agent.

Maximum length: 1000
Example:

"I can help you with your questions, provide information and much more."

Response

Successfully updated agent assist config

I