Update Agent
PATCH/api/v1/agents/{id}
Overview#
Update an existing agent's configuration.
Request Header
Authorizationapi key
Your 7en API key. Example: Api-Key 43NKLN3LKN4nlkn
Path Parameters#
Parameter
idint
Unique identifier of the agent to retrieve. Example: "34"
Request#
Request Body
namestring
Name of the agent. Example: "Updated Agent"
descriptionstring
Description of the agent's purpose.
systemPromptstring
Custom system prompt for the agent.
appearanceobjectoptional
Visual appearance settings for the agent.
behaviorobjectoptional
Behavior and interaction settings for the agent.
modelobjectoptional
AI model configuration for the agent.
Error Response#
404
{
"error": {
"code": "agent_not_found",
"message": "Agent not found.",
"status": 404
}
}Request
curl -X PUT 'https://api.7en.ai/api/v1/agents/{id}' \
-H 'Authorization: Api-Key YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Support Bot",
"description": "Enhanced AI agent for customer support",
"appearance": {
"primaryColor": "#0e1215",
"secondaryColor": "#ffffff",
"fontFamily": "Inter",
"chatbotName": "AI Assistant",
"welcomeMessage": "",
"buttonText": "",
"position": "bottom-right",
"avatar": {
"type": "default",
"src": ""
}
},
"behavior": {
"suggestions": [],
"guidelines": {
"dos": [],
"donts": []
},
"expertHandoff": false,
"aiToAiHandoff": true,
"autoTicketReply": false,
"email": null,
"ticketType": "email",
"escalationPrompt": "",
"agentHandoffPrompt": "- if user asks about Pujan, transfer to {{doc}}",
"followupCount": 2,
"followupInterval": 5,
"followupMessages": [
"I\'m available to help. Where are you ?",
"Seems like you are offline."
]
},
"model": {
"response_model": "gpt-5.2",
"temperature": 0.7
},
"agentType": "General Assistant",
"agent_category": "Assistant",
"systemPrompt": "You are a helpful AI assistant. Be friendly, professional, and provide accurate information.",
"default_ticketing_provider": null,
"is_slack_enabled": false
}'Response200
{
"message": "Resource updated successfully",
"status": "success",
"data": {
"id": 689,
"owner": 2,
"name": "Updated Customer Support Agent",
"description": "Enhanced AI agent for customer support",
"status": "Idle",
"appearance": {
"avatar": "https://example.com/new-avatar.png",
"theme": "green"
},
"behavior": {
"greeting": "Welcome! I'm here to help you."
},
"model": {
"display_model": null
},
"agentType": "chatbot",
"agent_category": "Assistant",
"systemPrompt": "You are an expert customer support assistant with extensive product knowledge.",
"knowledge_sources": [],
"created_at": "2026-03-09T07:28:11.656646Z",
"updated_at": "2026-03-09T07:30:18.694454Z",
"conversations": 0,
"ticketing_providers": [],
"default_ticketing_provider": null,
"is_slack_enabled": false,
"privacy_url": null,
"gdpr_settings": {
"data_retention_days": null,
"data_retention_message": null,
"gdpr_message_display": false
},
"is_white_label": true,
"total_training_usage_bytes": 0,
"max_training_usage_bytes": 51200000,
"character_limit": 200000
}
}