Documentation Index
Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt
Use this file to discover all available pages before exploring further.
Updates a specific agent version by versionId. Supports updating nodes, edges, variables, and configuration.
PATCH https://services.leadconnectorhq.com/agent-studio/agent/versions/{versionId}
Autorizacion
Bearer token generado desde el portal Leadway. Ver Autenticacion.
Version
string
default:"2021-07-28"
required
Version de la API.
Path parameters
versionId
string
default:"v1a2b3c4d5e6f7g8h9i0"
required
Query parameters
Body
locationId
string
default:"C2QujeCh8ZnC7al2InWR"
required
Account ID for authorization
versionName
string
default:"Customer Support Agent v2"
Version name
Description of the version
Complete array of nodes for the agent workflow. Provide all nodes including unchanged ones.
Complete array of edges connecting the nodes. Provide all edges including unchanged ones.
Global variables accessible throughout the agent workflow
Input variables required from user at execution time
Runtime variables generated during agent execution
Global configuration including prompts and settings
userId
string
default:"usr_abc123def456"
User ID performing the update
User name performing the update
Respuestas
200 - Version updated successfully
success
boolean
default:"True"
required
Success status
message
string
default:"Agent updated successfully"
required
Response message
Updated agent or version data
{
"success": true,
"message": "Agent updated successfully",
"data": {
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionId": "v1a2b3c4d5e6f7g8h9i0",
"name": "Updated Customer Support Agent",
"description": "Updated AI agent with enhanced customer support capabilities",
"status": "active",
"updatedAt": "2024-02-27T11:45:00.000Z"
}
}
422 - Unprocessable Entity
500 - Internal Server Error
message
string
default:"Internal Server Error"
{
"statusCode": 500,
"message": "Internal Server Error"
}
Ejemplo
curl -X PATCH 'https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "C2QujeCh8ZnC7al2InWR",
"versionName": "Customer Support Agent v2",
"description": "Updated version with improved customer handling logic",
"nodes": [
{
"nodeId": "node_1",
"nodeName": "Start",
"type": "start",
"isStartNode": true
},
{
"nodeId": "node_2",
"nodeName": "LLM Node",
"type": "llm",
"nodeConfig": {
"prompt": "How can I help you?",
"llmProvider": "openai",
"llmModel": "gpt-4"
}
}
],
"edges": [
{
"startNode": "node_1",
"endNode": "node_2"
}
],
"globalVariables": [
{
"key": "apiKey",
"type": "string",
"value": "your-api-key"
}
],
"inputVariables": [
{
"key": "customerName",
"type": "string",
"description": "Customer name for personalization"
}
],
"runtimeVariables": [
{
"key": "sessionId",
"type": "string",
"description": "Current session identifier"
}
],
"globalConfig": {
"globalPrompt": {
"currentPrompt": "You are a helpful customer support assistant.",
"history": []
}
},
"userId": "usr_abc123def456",
"userName": "John Doe"
}'