AI agents
Your organization's AI agents and their settings. They are read-only through the API: you create, train and activate them in the panel. They need the bots:read permission.
List AI agents
GET/bots
The organization's AI agents. Needs bots:read.
Scopes: bots:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
days | query | 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);No response example yet.
Get an AI agent
GET/bots/{id}
The settings of an AI agent. Returns 404 if it is not in your organization. Needs bots:read.
Scopes: bots:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
id required | path | 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);No response example yet.