MCP server
Connect an AI assistant to your account with the MCP protocol. It uses your API key and only offers the tools that key is allowed to use.
Not available
GET/mcp
The MCP server does not open an SSE channel: all requests go through POST /mcp.
Scopes: contacts:read contacts:write conversations:read messages:send campaigns:read campaigns:write automations:read reports:read templates:read templates:send wallet:read bots:read
curl "https://micuenta.whatsmarketing.es/api/v1/mcp" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/mcp', {
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/mcp",
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/mcp');
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.
MCP server
POST/mcp
Entry point for the MCP protocol (JSON-RPC 2.0 over HTTP). tools/list returns the tools your key allows. Only enviar_plantilla spends balance, and it takes two steps: the first call returns the cost and a confirmation valid for 5 minutes, and the second call, with that confirmation, sends. Each key can send up to 100 templates a day through MCP.
Scopes: contacts:read contacts:write conversations:read messages:send campaigns:read campaigns:write automations:read reports:read templates:read templates:send wallet:read bots:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
Idempotency-Key | query | string | 1–255 characters |
curl -X POST "https://micuenta.whatsmarketing.es/api/v1/mcp" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/mcp', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WM_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.post(
"https://micuenta.whatsmarketing.es/api/v1/mcp",
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/mcp');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);No response example yet.
Not available
DELETE/mcp
The MCP server keeps no session, so there is nothing to close.
Scopes: contacts:read contacts:write conversations:read messages:send campaigns:read campaigns:write automations:read reports:read templates:read templates:send wallet:read bots:read
curl -X DELETE "https://micuenta.whatsmarketing.es/api/v1/mcp" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/mcp', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.WM_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.delete(
"https://micuenta.whatsmarketing.es/api/v1/mcp",
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/mcp');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);No response example yet.