Ir al contenido
WhatsMarketingDeveloper Hub

Agentes IA

Los agentes IA de tu organización y su configuración. Por API solo se leen: crearlos, entrenarlos y activarlos se hace en el panel. Necesitan el permiso bots:read.

Listar agentes IA

GET/bots

Los agentes IA de la organización. Necesita bots:read.

Permisos: bots:read

Parámetros

NombreDóndeTipoValores
daysconsultanumber7 · 30 · 90
curl
curl "https://micuenta.whatsmarketing.es/api/v1/bots?days=30" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/bots?days=30', {
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.get(
    "https://micuenta.whatsmarketing.es/api/v1/bots?days=30",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/bots?days=30');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);

Sin ejemplo de respuesta todavía.

Ver un agente IA

GET/bots/{id}

La configuración de un agente IA. Responde 404 si no es de tu organización. Necesita bots:read.

Permisos: bots:read

Parámetros

NombreDóndeTipoValores
id obligatoriorutastring
curl
curl "https://micuenta.whatsmarketing.es/api/v1/bots/{id}" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/bots/{id}', {
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.get(
    "https://micuenta.whatsmarketing.es/api/v1/bots/{id}",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/bots/{id}');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);

Sin ejemplo de respuesta todavía.