Clientes
| Tool | Endpoint REST | Anotaciones |
list_clients | GET /v1/clients | lectura, idempotente |
get_client | GET /v1/clients/{identifier} | lectura, idempotente |
create_client | POST /v1/clients | escritura (upsert si ya existe) |
update_client | PATCH /v1/clients/{phoneNumber} | escritura, parcial |
delete_client | DELETE /v1/clients/{identifier} | destructiva |
list_clients
Lista clientes del workspace agrupados, con paginación y filtros opcionales.
| Campo | Tipo | Default |
limit | 1-200 | 50 |
offset | ≥ 0 | 0 |
sortBy | "name" \| "creationDate" | name |
sortDirection | "asc" \| "desc" | asc |
searchTerm | string | — |
tags | string[] (máx 10) | — |
dateFilter | objeto | — |
get_client
| Campo | Tipo | Requerido | Descripción |
identifier | string | sí | ID del cliente o número de teléfono (E.164). |
create_client
Crea un nuevo cliente; si ya existe uno con el mismo teléfono, lo actualiza (upsert).
| Campo | Tipo | Requerido |
phoneNumber | string E.164 | sí |
name | string | sí |
workspace | string | si multi-ws |
email, firstname, lastname, birthdate, gender, company, country, state, city, address, postalCode | string | no |
tags | string[] | no |
customFields | Record<string, unknown> | no |
owners | string[] | no |
Ejemplo
{
"name": "create_client",
"arguments": {
"phoneNumber": "+521234567890",
"name": "Ana López",
"email": "ana@example.com",
"tags": ["vip", "nuevo"]
}
}
update_client
Actualiza un cliente por su número de teléfono. Sólo se aplican los campos provistos.
Acepta los mismos campos que create_client (todos opcionales excepto phoneNumber) más:
| Campo | Tipo | Descripción |
status | "active" \| "blocked" | Estado del cliente. |
delete_client
| Campo | Tipo | Requerido |
identifier | string | sí |
workspace | string | si multi-ws |
Operación irreversible.