Skip to content
WhatsMarketingDeveloper Hub

Reports

The dashboard reports, ready for your own reporting dashboard: sales, lifecycle, campaigns, wallet, team and conversations.

Sales report

GET/reports/comercial

Open, won and lost deals in the period (days: 7, 30 or 90), with their value, the conversion rate and the previous period for comparison.

Scopes: reports:read

Parameters

NameWhereTypeValues
daysquerynumberdefault: 30 · 1 – 365
curl
curl "https://micuenta.whatsmarketing.es/api/v1/reports/comercial?days=30" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/reports/comercial?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/reports/comercial?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/reports/comercial?days=30');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
  "period": {
    "days": 30,
    "since": "2026-09-14"
  },
  "open": {
    "count": 12,
    "value": 18400
  },
  "wonInPeriod": {
    "count": 41,
    "value": 61200
  },
  "lostInPeriod": {
    "count": 9,
    "value": 7300
  },
  "conversionRate": 82,
  "previous": {
    "wonCount": 35,
    "wonValue": 50100,
    "conversionRate": 79.5
  }
}

Lifecycle report

GET/reports/lifecycle

How many contacts are in each stage; stage: null are those without a stage.

Scopes: reports:read

curl
curl "https://micuenta.whatsmarketing.es/api/v1/reports/lifecycle" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/reports/lifecycle', {
  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/reports/lifecycle",
    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/reports/lifecycle');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
[
  {
    "stage": "Lead nuevo",
    "order": 1,
    "count": 318
  },
  {
    "stage": "En proceso",
    "order": 2,
    "count": 96
  },
  {
    "stage": "Cliente",
    "order": 3,
    "count": 204
  },
  {
    "stage": null,
    "order": null,
    "count": 12
  }
]

Campaigns report

GET/reports/campanas

Campaigns in the period, recipients by status and total spend, with the previous period for comparison.

Scopes: reports:read

Parameters

NameWhereTypeValues
daysquerynumberdefault: 30 · 1 – 365
curl
curl "https://micuenta.whatsmarketing.es/api/v1/reports/campanas?days=30" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/reports/campanas?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/reports/campanas?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/reports/campanas?days=30');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
  "period": {
    "days": 30,
    "since": "2026-09-14"
  },
  "campaigns": 4,
  "recipientsByStatus": {
    "SENT": 120,
    "DELIVERED": 3100,
    "READ": 2210,
    "REPLIED": 260,
    "FAILED": 48
  },
  "cost": {
    "total": 285.9
  },
  "previous": {
    "recipients": 2900,
    "costTotal": 231.4
  }
}

Wallet report

GET/reports/wallet

Current balance and the period's movements grouped by type (top-ups, campaigns, conversations, AI agents…). Final amounts.

Scopes: reports:read

Parameters

NameWhereTypeValues
daysquerynumberdefault: 30 · 1 – 365
curl
curl "https://micuenta.whatsmarketing.es/api/v1/reports/wallet?days=30" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/reports/wallet?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/reports/wallet?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/reports/wallet?days=30');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
  "period": {
    "days": 30,
    "since": "2026-09-14"
  },
  "currentBalance": 120,
  "currency": "EUR",
  "byType": [
    {
      "type": "TOPUP",
      "count": 2,
      "amount": 400
    },
    {
      "type": "CAMPAIGN",
      "count": 4,
      "amount": -285.9
    }
  ]
}

Team report

GET/reports/agentes

For each team member: contacts they own, open conversations, and open and won deals.

Scopes: reports:read

curl
curl "https://micuenta.whatsmarketing.es/api/v1/reports/agentes" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/reports/agentes', {
  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/reports/agentes",
    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/reports/agentes');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
[
  {
    "userId": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
    "fullName": "Ana Gómez",
    "email": "ana@ejemplo.com",
    "contactsOwned": 140,
    "openConversations": 6,
    "dealsOpen": 4,
    "dealsWon": 17
  }
]

Conversations report

GET/reports/conversaciones

Conversations by status and by channel, new in the period, and the previous period for comparison.

Scopes: reports:read

Parameters

NameWhereTypeValues
daysquerynumberdefault: 30 · 1 – 365
curl
curl "https://micuenta.whatsmarketing.es/api/v1/reports/conversaciones?days=30" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/reports/conversaciones?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/reports/conversaciones?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/reports/conversaciones?days=30');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
  "period": {
    "days": 30,
    "since": "2026-09-14"
  },
  "byStatus": {
    "OPEN": 14,
    "PENDING": 3,
    "RESOLVED": 2193
  },
  "newInPeriod": 2210,
  "previous": {
    "newInPeriod": 1980
  },
  "byChannel": [
    {
      "channel": "5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c",
      "name": "WhatsApp +34 600 000 000",
      "count": 2010
    },
    {
      "channel": null,
      "name": "Sin canal",
      "count": 200
    }
  ]
}