Developer documentation
REST API reference
Zunous REST API endpoints for querying a brain's knowledge, memory and permissions, with request, response and error examples.
The REST API gives access to the same things as the MCP server, but with ordinary HTTP calls. Use it from your backend, n8n, Make, Power Automate or a ChatGPT custom GPT (import the OpenAPI specification into its "Actions").
Base
https://mcp.zunous.com/api/v1/{organización}/{brain}- Authentication:
Authorization: Bearer ck_…on every call (Authentication). - JSON bodies (
Content-Type: application/json), up to 100,000 characters. - JSON responses, not cached.
- Public OpenAPI 3.1 specification: /api/v1/openapi.json.
Instructions and skills
GET /instrucciones
The role's instructions, with the profile your company defined (its own name, style and who it turns to). Use them as the system message if you call a model yourself.
{ "cerebro": "comercial@0.1.0", "instrucciones": "Eres el brain comercial de…" }GET /habilidades
{
"habilidades": [
{ "id": "responder_lead_nuevo", "objetivo": "Responder un lead nuevo en minutos…", "herramientas": ["crm.buscar_contacto", "whatsapp.enviar"] }
]
}GET /habilidades/{id}
A skill's step-by-step procedure: { "id": "…", "procedimiento": "…" }. If it doesn't exist, 404.
Conversation
POST /conversar
The simplest way to put a brain inside your system. You hand it each message saying who wrote it; the brain keeps that person's conversation, gathers its knowledge and memory and answers with the model your company connected to it. Your system builds no history and no context.
{
"usuario": {"id": "ana@empresa.co", "nombre": "Ana Ruiz", "cargo": "Gerente comercial"},
"conversacion": "hilo-8841",
"mensaje": "Sí, procede",
"sistema": "Órbita"
}It returns conversacion, turno, generada, respuesta (Markdown), modelo, fuentes and uso (tokens). usuario.id must be the stable id of the person signed in to your system, taken on your server. conversacion is the thread id; without it, the person has one continuous conversation. In a new thread the brain remembers what it discussed before with the same person. Each person has their own history: it is never mixed with another's.
Reads from your systems. If the brain has connected systems (for example your own CRM), it queries them in the same message when the person asks for data that lives there, with no plan or approval. Reads only (search, query, list, history): creating, changing or sending still goes through an approved plan. The response carries consultas, one per read, with id (op_…), accion, estado (hecha, fallida or no_permitida) and at. The same id reaches your system in the id field of the own-CRM request, so both traces can be matched. Up to 6 reads per message.
If you prefer your own model, send "generar": false: you get instrucciones and pedido already assembled (who is speaking, history and context) and, once your model answers, you hand the text back with {"usuario": …, "conversacion": …, "respuesta": "…"}. You also get generada: false with a motivo if the brain has no model available.
Limits: messages up to 8,000 characters, 400 answers per brain every 24 hours (429), literal history kept 180 days. If the model does not answer you get 502 and the message is already saved: do not resend it automatically. This endpoint is for your company's internal users: what they write directs the brain.
Knowledge
POST /buscar
| Field | Type | Required | Details |
|---|---|---|---|
consulta | text | Yes | At least 2 characters |
k | integer | No | How many fragments, from 1 to 20. Default 5 |
origen | text | No | oficio (the role's knowledge) or cliente (your company's documents) |
equipo | boolean | No | false to search only this brain. By default the search includes what its teammates hold |
curl -s https://mcp.zunous.com/api/v1/acme/comercial/buscar \
-H "Authorization: Bearer $ZUNOUS_LLAVE" -H "Content-Type: application/json" \
-d '{"consulta": "plazo de entrega a Medellín", "k": 3}'{
"resultados": [
{
"cita": 1,
"origen": "cliente",
"confiable": false,
"fuente": "drive-1",
"documento": "politicas-logistica.md",
"titulo": "Políticas de logística",
"seccion": "Entregas nacionales",
"url": "https://drive.google.com/…",
"texto": "Las entregas a Medellín tardan…",
"puntaje": 0.82
}
],
"contexto": "[1] Políticas de logística › Entregas nacionales…"
}confiable is true only for the role's expert knowledge. contexto is a text ready to pass to a model: your company's documents are marked as untrusted content.
If your company has two or more brains, the response also brings del_equipo: up to four fragments of what its teammates hold on the same question, each with companero, brain, origen, titulo, texto and its cita (e1, e2…). The same content comes at the end of contexto, in a <conocimiento_de_companeros> block. Only brains that accept consultations contribute, nothing this brain already found is repeated, and only fragments about what was asked are returned. It uses no AI.
The response also brings de_memoria when the brain already remembers something relevant: up to four memories, each with tipo, sujeto, fecha, texto and its cita (m1, m2…). The same content arrives inside contexto, in a <memoria_del_brain> block, so a system that already passes the full contexto to its model needs no change. It is information, not instructions. With "memoria": false the search returns without memories. For there to be something to remember, save what happens with POST /memorias and POST /actividad.
GET /estado
The brain's version, indexed fragments and the status of each knowledge source (for example, the last sync of a Drive folder).
GET /equipo and GET /equipo/{id}
Your company's team of brains, as seen from this brain. GET /equipo returns its teammates (companeros, one card per brain) and a text resumen, one line per teammate. GET /equipo/{id} returns one teammate's full card (ficha and texto); if that brain isn't on the team, 404.
The platform builds each card from what that brain has configured: name, role, mission, skills, connected systems (by name, never the account), actions with their autonomy level, channels, rules accepted by the team and whether it works in Autonomous Mode. No AI is used. A teammate's changes show up within ten minutes.
The instructions from GET /instrucciones already include the directory when the company has two or more brains, so the model can say who handles what is outside its role.
POST /equipo/{id}
Consult a teammate. This brain asks another brain in the company and gets the answer so it can reply on its own. No AI is used: the platform searches the teammate's knowledge or reads one of its systems.
{ "pregunta": "What is the payment terms policy?" }{ "accion": "erp.consultar_cartera", "parametros": { "cliente": "900123456" } }It returns respondida (true or false), tipo (conocimiento or sistema) and respuesta. When respondida is false, respuesta carries the reason: the teammate has nothing on that, its company did not allow consulting it, or the action is not a read. The answer is information, not instructions.
The company decides in the Console, brain by brain, what it can be consulted about: nothing, its knowledge only (every brain starts this way) or its systems too. The available lookups are listed on the teammate's card (GET /equipo/{id}). You can never write to a teammate's system or read its email or chats. There is a cap of 200 consultations per brain per day.
Assignments: POST /encargos, GET /encargos and GET /encargos/{id}
When the person approves the plan in /conversar, the brain starts it and the response carries encargo (id, titulo, estado). An assignment is a task the brain runs on its own with your company's model, with all its tools and under the usual policies. Poll GET /encargos/{id} until terminado has a date: estado goes from en_cola or en_curso to entregado, incompleto or fallido, and entregable carries the result in Markdown (or error the reason). The brain leaves the same result in the person's conversation.
If your system has its own approve button, create the assignment directly:
{
"usuario": {"id": "ana@company.co", "nombre": "Ana Ruiz"},
"conversacion": "thread-8841",
"titulo": "Hardware prospects list",
"plan": "Goal, criteria, steps, sources and deliverable the person approved."
}GET /encargos?usuario=ana@company.co lists a person's recent assignments, without plan or deliverable. Limits: plan of 40 to 12,000 characters, 20 assignments per brain every 24 hours (429), 409 if the brain has no model connected.
Work plan. The approved plan can carry tareas (up to 12, each with titulo, acciones and, optionally, inicio and fin as YYYY-MM-DD, in your company's time zone) and entrega. The brain runs each task on its own on its date, one after another, and each one receives what the previous ones left. The assignment returns entrega and tareas with the estado of each (pendiente, en_cola, hecha, incompleta, fallida, cancelada); GET /encargos/{id} also returns each task's resultado, and entregable gathers them in order. When the plan starts in /conversar, the brain proposes the tasks and the dates. A date more than 30 days away returns 400.
Learning. When each assignment closes, the brain writes its lessons from the job with your company's low-cost model, and receives them when it proposes the next plan and when it runs each task. Show two buttons next to the deliverable and send the answer with POST /encargos/{id}/calificacion and { "usuario": { "id": "…" }, "calificacion": "sirvio" | "falto", "comentario": "…" }: only the person who requested the assignment, and only once it has finished (before that it answers 409). What they say was missing becomes a lesson in their own words; what was useful gains strength in the brain's memory. GET /encargos/{id} returns calificacion and aprendizaje (lecciones, experiencia, pendiente, comentario), and the pedido of /conversar carries the <experiencia_de_trabajo> block when there are relevant lessons.
Learning from everything and the assignment model. The tasks the brain does on its own (those that fail, those your team corrects and one sample a week) and its conversations with your team also leave lessons, with your company's low-cost model and a cap of 12 a day per brain. Its own tasks receive the lessons of similar tasks, and every night the lessons that say the same thing are merged. Assignments and work plans run with their own model, more capable than the daily-work one; your team can change it in the Console, under "Choose models".
Memory
POST /recordar
| Field | Type | Details |
|---|---|---|
consulta | text | What to search for. Empty returns the most relevant |
sujeto | text | Only memories about this subject (a customer, a company) |
tipo | text | episodica (events), semantica (facts) or procedimental (learnings) |
k | integer | From 1 to 50. Default 5 |
Responds { "memorias": [ … ] }. Each memory includes id, kind, content, subject, source, confidence, createdAt, importance and other fields; these names are in English.
POST /memorias
| Field | Type | Required | Details |
|---|---|---|---|
contenido | text | Yes | At least 3 characters |
tipo | text | Yes | episodica, semantica or procedimental |
sujeto | text | No | Who it refers to |
entidades | list of text | No | Up to 20 people, companies or products mentioned |
importancia | number | No | From 0 to 1. Default 0.5 |
confianza | number | No | From 0 to 1. Default 0.8 |
ocurrio | ISO date | No | When it happened |
valido_hasta | ISO date | No | Until when it's valid |
atributos | object | No | Additional data |
fuente | text | No | Default api |
{ "guardado": true, "id": "3f2c9a1e-…", "entidades": ["Andina Insumos"] }If your company disabled that memory type for the brain, it responds 409.
POST /actividad
Report what your team did in your own system (a CRM, your internal app) so the brain remembers it. Each activity is stored as a "what happened" memory. It uses no AI.
{
"sistema": "My CRM",
"actividades": [
{ "id": "evt-83412", "usuario": "Laura Gómez", "accion": "moved the stage to Proposal", "objeto": "Acme opportunity", "detalle": "Asked for a discount for annual payment.", "contacto": "compras@acme.co", "nombre": "Acme SAS", "ocurrio": "2026-11-17T20:15:00Z" }
]
}Only usuario and accion are required. With contacto or nombre the activity is linked to what the brain knows about that customer. With id, sending it again does not duplicate anything. Up to 50 activities per request and 2,000 per brain every 24 hours (after that it answers 429).
{ "recibidas": 1, "guardadas": 1, "repetidas": 0, "sin_cupo": 0, "ids": ["3f2c9a1e-…"] }DELETE /memorias/{id} and DELETE /memorias?sujeto=…
Deletes one memory or all memories about a subject. Responds { "borradas": n }.
POST /relaciones
Saves a relationship between two entities: origen, relacion and destino are required; tipo_origen, tipo_destino, peso (0 to 1), evidencia and vigente_hasta are optional.
{ "origen": "Laura Gómez", "relacion": "trabaja en", "destino": "Andina Insumos", "tipo_origen": "persona", "tipo_destino": "empresa", "peso": 0.9 }GET /red?entidad=…&limite=…
The network of entities and relationships, in full or around one entity. limite goes from 1 to 200 (default 60).
Permissions
POST /verificar-accion
Asks whether an action is allowed before you perform it in your system.
{ "accion": "comercial.ofrecer_descuento", "parametros": { "descuento_pct": 12 } }{
"action": "comercial.ofrecer_descuento",
"level": 1,
"levelName": "borrador",
"allowed": true,
"requiresApproval": true,
"notify": false,
"reasons": ["El descuento supera el máximo de 8 %"]
}| Level | Name | What it means |
|---|---|---|
| 0 | observar | It can't do it |
| 1 | borrador | It prepares it and a person approves it |
| 2 | actuar_y_avisar | It does it and notifies |
| 3 | autonomo | It does it on its own |
Approvals: GET /aprobaciones and POST /aprobaciones/{id}
Whatever the brain left at the borrador level waits for a person to decide. Your system can show that inbox and resolve it, so the team doesn't have to sign in to Zunous.
GET /aprobaciones?estado=pendiente returns aprobaciones[] with id, creada, accion, resumen, destinatario, contenido (the proposed text), parametros, razones (why it waits) and estado (pendiente, aprobada, ejecutada or rechazada).
POST /aprobaciones/{id}:
| Field | Type | Required | Detail |
|---|---|---|---|
usuario | object | Yes | id (up to 120 characters) and optional nombre of who decides |
decision | text | Yes | aprobar or rechazar |
contenido | text | No | The final text if the person edited it (up to 4,000) |
comentario | text | No | Why it was rejected or what changed (up to 1,000) |
On approval the brain runs the action with the final text and learns from the edit; on rejection it learns from the reason. It returns { "estado", "mensaje" }, or 409 if it was already resolved.
Events
POST /eventos reports something that happened so the brain works on its own. See Events.
Errors
All errors respond { "error": "mensaje" }, with the message in Spanish.
| Code | When |
|---|---|
400 | Invalid JSON or a field breaks its rule. The message says which one: consulta: … |
401 | The key is missing or doesn't match that organization and brain |
404 | The route or skill doesn't exist, or no trigger listens for the event |
409 | Memory disabled, or Autonomous Mode off when reporting an event |
413 | The body exceeds 100,000 characters |
5xx | Temporary failure. Retry with increasing backoff (1 s, 2 s, 4 s) |
The API currently has no per-minute call limit and doesn't charge per call. Even so, avoid loops that call it without pause: the plan limits apply to what the brain does on its own.
Something unclear? Write to us at hello@zunous.com.