Automations
Trigger, condition and action flows defined in the dashboard. The API lists them and shows their runs.
List automations
GET/automations
The organization's automations with their trigger, steps, a plain-language description (triggerLabel, stepsSummary) and the runs of the last week. Filter by tab (tab), trigger or search; includeArchived=true includes archived ones. Not paginated.
Scopes: automations:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
tab | query | string | all · active · paused · drafts |
trigger | query | string | LIFECYCLE_STAGE_ENTERED · CAMPAIGN_REPLIED · NO_RESPONSE_DAYS · WALLET_LOW_BALANCE |
q | query | string | 0–120 characters |
includeArchived | query | string | true · false |
curl "https://micuenta.whatsmarketing.es/api/v1/automations" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/automations', {
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/automations",
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/automations');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"data": [
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
"name": "Bienvenida a leads nuevos",
"status": "ACTIVE",
"triggerType": "LIFECYCLE_STAGE_ENTERED",
"triggerConfig": {
"stage": "Lead nuevo"
},
"steps": [
{
"type": "CONDITION",
"config": {
"kind": "CHANNEL_IS",
"value": "WHATSAPP"
}
},
{
"type": "ACTION",
"config": {
"kind": "SEND_TEMPLATE",
"value": "bienvenida_es"
}
}
],
"pausedReason": null,
"failureCount": 0,
"lastRunAt": "2026-10-14T09:30:00.000Z",
"templateKey": "welcome",
"createdByUserId": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"createdAt": "2026-09-20T12:00:00.000Z",
"updatedAt": "2026-10-14T09:30:00.000Z",
"triggerLabel": "Cuando entra en Lead nuevo",
"stepsSummary": [
"si canal es WhatsApp",
"enviar plantilla bienvenida_es"
],
"runs7d": 18
}
],
"summary": {
"active": 1,
"pausedByFailure": 0,
"paused": 0,
"drafts": 0,
"runs7d": 18,
"runs7dPrevious": 11,
"templatesSent7d": 18,
"templatesCost7d": 0.9,
"currency": "EUR",
"failures7d": 0,
"failureExample": null
}
}Get an automation
GET/automations/{id}
Trigger, configuration and steps (condition, action, wait) as defined in the dashboard, plus the runs of the last week.
Scopes: automations:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
id required | path | string |
curl "https://micuenta.whatsmarketing.es/api/v1/automations/{id}" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/automations/{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/automations/{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/automations/{id}');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
"name": "Bienvenida a leads nuevos",
"status": "ACTIVE",
"triggerType": "LIFECYCLE_STAGE_ENTERED",
"triggerConfig": {
"stage": "Lead nuevo"
},
"steps": [
{
"type": "CONDITION",
"config": {
"kind": "CHANNEL_IS",
"value": "WHATSAPP"
}
},
{
"type": "ACTION",
"config": {
"kind": "SEND_TEMPLATE",
"value": "bienvenida_es"
}
}
],
"pausedReason": null,
"failureCount": 0,
"lastRunAt": "2026-10-14T09:30:00.000Z",
"templateKey": "welcome",
"createdByUserId": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"createdAt": "2026-09-20T12:00:00.000Z",
"updatedAt": "2026-10-14T09:30:00.000Z",
"triggerLabel": "Cuando entra en Lead nuevo",
"stepsSummary": [
"si canal es WhatsApp",
"enviar plantilla bienvenida_es"
],
"runs7d": 18
}Automation runs
GET/automations/{id}/logs
Every time the trigger fired for a contact: status (COMPLETED, WAITING, CONDITION_NOT_MET, SKIPPED_NO_CONSENT, FAILED), a plain-language explanation and the templates sent with their cost. Filter by result. summary sums up the last week.
Scopes: automations:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
id required | path | string | |
page | query | number | default: 1 · 1 – … |
pageSize | query | number | default: 20 · 1 – 100 |
result | query | string | all · completed · waiting · condition · skipped · failed |
curl "https://micuenta.whatsmarketing.es/api/v1/automations/{id}/logs?page=1&pageSize=20" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/automations/{id}/logs?page=1&pageSize=20', {
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/automations/{id}/logs?page=1&pageSize=20",
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/automations/{id}/logs?page=1&pageSize=20');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"data": [
{
"id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"automationId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"contactId": "0b1c2d3e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"contact": {
"id": "0b1c2d3e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"fullName": "Laura Pérez",
"primaryPhone": "+34612345678"
},
"triggeredAt": "2026-10-14T09:30:00.000Z",
"status": "COMPLETED",
"humanMessage": "Plantilla «bienvenida_es» enviada",
"resultMessage": null,
"waitUntil": null,
"conversationReferenceId": null,
"templatesSent": 1,
"templateCost": 0.05
}
],
"meta": {
"page": 1,
"pageSize": 20,
"total": 1,
"totalPages": 1
},
"summary": {
"runs7d": 18,
"completed": 17,
"waiting": 0,
"conditionNotMet": 1,
"skipped": 0,
"failed": 0,
"templatesSent": 17,
"templatesCost": 0.85,
"currency": "EUR"
}
}