Agents · Edit
Edit an agent via API
Endpoint
PUT
https://claix.dev/agents/edit/{agent_id}Updates name, slug, description, prompt, routes, and response mode for an agent on your account. Same required body as create. POST is also accepted.
This call is free.
1. Authentication
x-api-key: <YOUR_API_KEY>
2. Request format
agent_id goes in the URL. The body includes every create field:
| Field | Type | Required | Description |
|---|---|---|---|
| agent_id (URL) | uuid | Yes | In /agents/edit/{agent_id}. |
| name | string | Yes | Visible name. |
| slug | string | Yes | Unique slug 3–20 (a-z0-9). |
| description | string | Yes | Description. |
| prompt | string | Yes | Business instructions. |
| routes | uuid[] | Yes | Routes on your account. |
| response_mode | string | Yes | bruto | razonada. |
3. Examples
Right panel with ready-to-run examples.
4. Successful response
200 OK
{
"success": true,
"agent": {
"agent_id": "9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a",
"name": "Asistente de agenda",
"slug": "agenda",
"description": "Responde preguntas sobre citas y pacientes de la clínica.",
"status": "active",
"prompt": "Eres el asistente de la clínica. Solo usas las rutas asignadas. No inventes datos.",
"routes": ["7c2f9a1e-4b8d-4e6a-9f21-0a1b2c3d4e5f"],
"response_mode": "bruto",
"retrieve_url": "https://claix.dev/retrieve/agenda",
"updated_at": "2026-10-19T19:00:00.000Z"
}
}5. Errors
| HTTP | When |
|---|---|
| 401 | Invalid API key. |
| 404 | Agent missing or not on your account. |
| 400 | Missing or invalid parameter. |
| 500 | Internal error. |
{
"error": "Descripción legible del problema.",
"detalle": "Información técnica adicional (solo presente en algunos casos).",
"log_id": "7c2e1a90-4b3d-4f8a-9e21-6d5c8b0a1f34"
}