Agentes de IA
Os agentes de IA da sua organização e as configurações deles. Pela API eles são apenas lidos: você cria, treina e ativa no painel. Precisam da permissão bots:read.
Listar agentes de IA
GET/bots
Os agentes de IA da organização. Precisa de bots:read.
Permissões: bots:read
Parâmetros
| Nome | Onde | Tipo | Valores |
|---|---|---|---|
days | consulta | number | 7 · 30 · 90 |
curl "https://micuenta.whatsmarketing.es/api/v1/bots?days=30" \
-H "Authorization: Bearer $WM_API_KEY"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();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
$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);Ainda sem exemplo de resposta.
Ver um agente de IA
GET/bots/{id}
As configurações de um agente de IA. Responde 404 se não for da sua organização. Precisa de bots:read.
Permissões: bots:read
Parâmetros
| Nome | Onde | Tipo | Valores |
|---|---|---|---|
id obrigatório | rota | string |
curl "https://micuenta.whatsmarketing.es/api/v1/bots/{id}" \
-H "Authorization: Bearer $WM_API_KEY"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();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
$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);Ainda sem exemplo de resposta.