Actualizar agente
PUT
/ai-agents/{id}
const url = 'https://api.matiasimpulso.com/ai-agents/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"effort":"low","modelCatalogId":2,"name":"example","zone":"example","buffer":1,"description":"example","timezone":"example","color":"example","isEnabled":true,"showInChat":true,"instructions":{"tone":"profesional","style":"respuestas cortas","personality":"amigable","objective":"el objetivo siempre es ayudar al cliente","language":"Neutral Latin American Spanish","emojis":true,"preferredFormat":"texto","maxWords":80,"avoidTopics":["política","religión"],"respondOnlyIfKnows":true,"customPrompt":"You have access to our product catalog. When users ask about products, provide detailed information including features and benefits.","useChainOfThought":false,"outputFormat":{"requireGreeting":true,"requireClosing":true,"maxSentences":1,"bulletPoints":true,"numbered":true},"conversationExamples":[{"userMessage":"¿Cuánto cuesta?","agentResponse":"Para información sobre precios, contáctanos en ventas@empresa.com"}],"maintainToneBetweenMessages":true,"greeting":"example"},"persona":{"name":"example","role":"example","speaksInFirstPerson":true,"isHuman":true},"rules":{"doNotMentionPrices":true,"doNotDiagnose":true,"doNotRespondOutsideHours":true,"noAnswer":"example","serviceError":"example","doNotUnderstand":"example"},"ragConfig":{"ragMode":"tool","minScore":0.35,"enabled":true},"modelConfig":{"modelId":"example","temperature":1,"maxTokens":1,"topP":1,"topK":1},"businessContext":{"companyName":"ChatikPro","businessDescription":"Plataforma de automatización de WhatsApp para empresas LATAM","products":["WhatsApp Business API","Chatbots","AI Agents"],"website":"https://chatikpro.com","supportEmail":"soporte@chatikpro.com"},"schedules":[{"id":1,"dayOfWeek":1,"startTime":"example","endTime":"example","isActive":true}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.matiasimpulso.com/ai-agents/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "effort": "low", "modelCatalogId": 2, "name": "example", "zone": "example", "buffer": 1, "description": "example", "timezone": "example", "color": "example", "isEnabled": true, "showInChat": true, "instructions": { "tone": "profesional", "style": "respuestas cortas", "personality": "amigable", "objective": "el objetivo siempre es ayudar al cliente", "language": "Neutral Latin American Spanish", "emojis": true, "preferredFormat": "texto", "maxWords": 80, "avoidTopics": [ "política", "religión" ], "respondOnlyIfKnows": true, "customPrompt": "You have access to our product catalog. When users ask about products, provide detailed information including features and benefits.", "useChainOfThought": false, "outputFormat": { "requireGreeting": true, "requireClosing": true, "maxSentences": 1, "bulletPoints": true, "numbered": true }, "conversationExamples": [ { "userMessage": "¿Cuánto cuesta?", "agentResponse": "Para información sobre precios, contáctanos en ventas@empresa.com" } ], "maintainToneBetweenMessages": true, "greeting": "example" }, "persona": { "name": "example", "role": "example", "speaksInFirstPerson": true, "isHuman": true }, "rules": { "doNotMentionPrices": true, "doNotDiagnose": true, "doNotRespondOutsideHours": true, "noAnswer": "example", "serviceError": "example", "doNotUnderstand": "example" }, "ragConfig": { "ragMode": "tool", "minScore": 0.35, "enabled": true }, "modelConfig": { "modelId": "example", "temperature": 1, "maxTokens": 1, "topP": 1, "topK": 1 }, "businessContext": { "companyName": "ChatikPro", "businessDescription": "Plataforma de automatización de WhatsApp para empresas LATAM", "products": [ "WhatsApp Business API", "Chatbots", "AI Agents" ], "website": "https://chatikpro.com", "supportEmail": "soporte@chatikpro.com" }, "schedules": [ { "id": 1, "dayOfWeek": 1, "startTime": "example", "endTime": "example", "isActive": true } ] }'Authorizations
Sección titulada « Authorizations »Parameters
Sección titulada « Parameters »Path Parameters
Sección titulada « Path Parameters » id
required
number
Request Bodyrequired
Sección titulada « Request Bodyrequired » Media type application/json
object
effort
Effort fijo del agente (runtimeConfig.turn.effort, §3.6). null = automático.
string
modelCatalogId
Modelo del agente (AiModelCatalog.id). Se escribe con el resto, en una transacción.
number
Example
2 name
string
zone
string
buffer
number
description
string
timezone
string
color
string
isEnabled
boolean
showInChat
boolean
instructions
object
tone
required
string
Example
profesional style
string
Example
respuestas cortas personality
string
Example
amigable objective
required
string
Example
el objetivo siempre es ayudar al cliente language
required
string
Example
Neutral Latin American Spanish emojis
required
boolean
Example
true preferredFormat
string
Example
texto maxWords
required
number
Example
80 avoidTopics
required
Array<string>
Example
[ "política", "religión"] respondOnlyIfKnows
boolean
Example
true customPrompt
Custom prompt to add specific business instructions
string
Example
You have access to our product catalog. When users ask about products, provide detailed information including features and benefits. useChainOfThought
Enable chain of thought reasoning for better responses
boolean
Example
false outputFormat
object
requireGreeting
boolean
requireClosing
boolean
maxSentences
number
bulletPoints
boolean
numbered
boolean
conversationExamples
Examples of ideal conversation interactions (few-shot learning)
array
Example
[ { "userMessage": "¿Cuánto cuesta?", "agentResponse": "Para información sobre precios, contáctanos en ventas@empresa.com" }] maintainToneBetweenMessages
boolean
greeting
string
persona
object
name
required
string
role
required
string
speaksInFirstPerson
required
boolean
isHuman
required
boolean
rules
object
doNotMentionPrices
required
boolean
doNotDiagnose
required
boolean
doNotRespondOutsideHours
required
boolean
noAnswer
required
string
serviceError
required
string
doNotUnderstand
required
string
ragConfig
object
ragMode
S4 (§5.3): cómo llega el conocimiento. tool (por defecto) solo por
buscar_conocimiento; passive RAG automático en el contexto; both,
las dos. updateAgent sustituye ragConfig entero: quien lo guarde debe
reenviar estos campos.
string
Example
tool minScore
S4: umbral de relevancia de buscar_conocimiento (0..1).
number
Example
0.35 enabled
required
boolean
modelConfig
object
modelId
required
string
temperature
required
number
maxTokens
required
number
topP
number
topK
number
businessContext
object
companyName
required
string
Example
ChatikPro businessDescription
string
Example
Plataforma de automatización de WhatsApp para empresas LATAM products
Array<string>
Example
[ "WhatsApp Business API", "Chatbots", "AI Agents"] website
string format: uri
Example
https://chatikpro.com supportEmail
string format: email
Example
soporte@chatikpro.com schedules
Array<object>
object
id
ID del horario existente; null o ausente si es nuevo
number
dayOfWeek
required
number
startTime
required
string
endTime
required
string
isActive
boolean
Responses
Sección titulada « Responses »Agente actualizado
Agente no encontrado