Skip to content
WhatsMarketingDeveloper Hub

Campaigns

Campaigns with Meta-approved templates: create, choose the audience, preview the cost before sending, send now, schedule or stagger, pause and resume.

List campaigns

GET/campaigns

Campaigns with their status, sender number, template and figures (stats: sent, delivered, read, replied, failed). Tabs (tab): all, sending, scheduled, drafts, errors, finished. summary sums up the period (days).

Scopes: campaigns:read

Parameters

NameWhereTypeValues
pagequerynumberdefault: 1 · 1 – …
pageSizequerynumberdefault: 20 · 1 – 100
tabquerystringall · sending · scheduled · drafts · errors · finished
categoryquerystringMARKETING · UTILITY · AUTHENTICATION
phoneNumberIdqueryuuid
qquerystring0–100 characters
daysquerynumber1 – 365
curl
curl "https://micuenta.whatsmarketing.es/api/v1/campaigns?page=1&pageSize=20" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns?page=1&pageSize=20', {
  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/campaigns?page=1&pageSize=20",
    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/campaigns?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);
Response 200
{
  "data": [
    {
      "id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
      "organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
      "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
      "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
      "name": "Octubre: promo",
      "status": "COMPLETED",
      "scheduledAt": null,
      "startedAt": "2026-10-10T08:00:00.000Z",
      "completedAt": "2026-10-10T08:12:00.000Z",
      "batchSize": null,
      "batchIntervalMin": null,
      "nextBatchAt": null,
      "pausedAt": null,
      "stopReason": null,
      "sourceCampaignId": null,
      "createdAt": "2026-10-09T16:00:00.000Z",
      "updatedAt": "2026-10-10T08:12:00.000Z",
      "template": {
        "name": "promo_octubre",
        "category": "MARKETING",
        "language": "es"
      },
      "phoneNumber": {
        "numberE164": "+34600000000",
        "displayName": "Clínica Sol"
      },
      "stats": {
        "total": 1200,
        "pending": 0,
        "sent": 1200,
        "delivered": 1174,
        "read": 803,
        "replied": 96,
        "failed": 26,
        "progressPct": 100
      }
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 20,
    "total": 1,
    "totalPages": 1
  },
  "tabs": {
    "all": 1,
    "sending": 0,
    "scheduled": 0,
    "drafts": 0,
    "errors": 0,
    "finished": 1
  },
  "summary": {
    "days": 30,
    "since": "2026-09-14",
    "campaigns": 1,
    "sent": 1200,
    "deliveredPct": 97.8,
    "readPct": 66.9,
    "replies": 96,
    "repliesPct": 8,
    "spend": 59.85,
    "spendPerMessage": 0.05
  }
}

Create a campaign (draft)

POST/campaigns

Name, sender number and approved template. If the template has variables, variables says where each one comes from (a contact field such as {{fullName}} or fixed text); without them, sending responds 400 CAMPAIGN_VARIABLES_REQUIRED. The campaign starts as a draft: then add the audience, check the cost and send.

Scopes: campaigns:write

Request body CreateCampaign

NameTypeValues
name requiredstring2–… characters
phoneNumberId requireduuid
templateId requireduuid
scheduledAtstring
variablesobject
curl
curl -X POST "https://micuenta.whatsmarketing.es/api/v1/campaigns" \
  -H "Authorization: Bearer $WM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Octubre: promo",
  "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
  "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
  "variables": {
    "1": "{{fullName}}",
    "2": "15 %"
  }
}'
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "Octubre: promo",
    "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
    "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
    "variables": {
      "1": "{{fullName}}",
      "2": "15 %"
    }
  }),
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://micuenta.whatsmarketing.es/api/v1/campaigns",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    json={
        "name": "Octubre: promo",
        "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
        "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
        "variables": {
            "1": "{{fullName}}",
            "2": "15 %"
        }
    },
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/campaigns');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Octubre: promo',
    'phoneNumberId' => 'c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f',
    'templateId' => 'e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b',
    'variables' => [
      '1' => '{{fullName}}',
      '2' => '15 %'
    ]
  ]),
]);
$data = json_decode(curl_exec($ch), true);
Response 201
{
  "id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
  "organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
  "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
  "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
  "name": "Octubre: promo",
  "status": "DRAFT",
  "scheduledAt": null,
  "startedAt": null,
  "completedAt": null,
  "batchSize": null,
  "batchIntervalMin": null,
  "nextBatchAt": null,
  "pausedAt": null,
  "stopReason": null,
  "sourceCampaignId": null,
  "createdAt": "2026-10-09T16:00:00.000Z",
  "updatedAt": "2026-10-09T16:00:00.000Z",
  "template": {
    "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
    "name": "promo_octubre",
    "category": "MARKETING",
    "language": "es",
    "bodyText": "Hola {{1}}, este mes tienes un {{2}} de descuento.",
    "status": "APPROVED"
  },
  "phoneNumber": {
    "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
    "numberE164": "+34600000000",
    "displayName": "Clínica Sol",
    "qualityRating": "GREEN"
  },
  "estimatedCost": null,
  "realCost": 0,
  "stats": {
    "total": 0,
    "pending": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "replied": 0,
    "failed": 0,
    "progressPct": 0
  },
  "errorsByReason": [],
  "lastReplies": []
}

Get a campaign

GET/campaigns/{id}

Detail with figures, template, number, scheduling, estimated and actual cost, errors grouped by reason and latest replies.

Scopes: campaigns:read

Parameters

NameWhereTypeValues
id requiredpathstring
curl
curl "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}', {
  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/campaigns/{id}",
    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/campaigns/{id}');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
  "id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
  "organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
  "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
  "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
  "name": "Octubre: promo",
  "status": "DRAFT",
  "scheduledAt": null,
  "startedAt": null,
  "completedAt": null,
  "batchSize": null,
  "batchIntervalMin": null,
  "nextBatchAt": null,
  "pausedAt": null,
  "stopReason": null,
  "sourceCampaignId": null,
  "createdAt": "2026-10-09T16:00:00.000Z",
  "updatedAt": "2026-10-09T16:00:00.000Z",
  "template": {
    "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
    "name": "promo_octubre",
    "category": "MARKETING",
    "language": "es",
    "bodyText": "Hola {{1}}, este mes tienes un {{2}} de descuento.",
    "status": "APPROVED"
  },
  "phoneNumber": {
    "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
    "numberE164": "+34600000000",
    "displayName": "Clínica Sol",
    "qualityRating": "GREEN"
  },
  "estimatedCost": null,
  "realCost": 0,
  "stats": {
    "total": 0,
    "pending": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "replied": 0,
    "failed": 0,
    "progressPct": 0
  },
  "errorsByReason": [],
  "lastReplies": []
}

Campaign recipients

GET/campaigns/{id}/recipients

Each recipient with their status (PENDING, SENT, DELIVERED, READ, REPLIED, FAILED), the market used for pricing, the cost and the failure reason if there was one. filter narrows by status.

Scopes: campaigns:read

Parameters

NameWhereTypeValues
id requiredpathstring
pagequerynumberdefault: 1 · 1 – …
pageSizequerynumberdefault: 20 · 1 – 100
filterquerystringall · delivered · read · replied · failed · pending
curl
curl "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/recipients?page=1&pageSize=20" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/recipients?page=1&pageSize=20', {
  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/campaigns/{id}/recipients?page=1&pageSize=20",
    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/campaigns/{id}/recipients?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);
Response 200
{
  "data": [
    {
      "id": "7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
      "contact": {
        "id": "0b1c2d3e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
        "fullName": "Laura Pérez",
        "primaryPhone": "+34612345678"
      },
      "market": "ES",
      "status": "DELIVERED",
      "sentAt": "2026-10-10T08:00:02.000Z",
      "deliveredAt": "2026-10-10T08:00:05.000Z",
      "readAt": null,
      "failedAt": null,
      "errorMessage": null,
      "totalCost": 0.05,
      "coveredByAllowance": false
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 20,
    "total": 1200,
    "totalPages": 60
  }
}

Add audience

POST/campaigns/{id}/recipients

One of four sources: a list of ids (contactIds, up to 20,000), a stage (lifecycleStageId), a tag (tag) or all: true for everyone. Only contacts with consent and a phone number are included; the response says how many were left out and why, how many were added (added) and how many were already in (alreadyIn).

Scopes: campaigns:write

Parameters

NameWhereTypeValues
id requiredpathstring

Request body Audience

NameTypeValues
contactIdsuuid[]≤ 20000
lifecycleStageIduuid
allboolean
tagstring0–60 characters
curl
curl -X POST "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/recipients" \
  -H "Authorization: Bearer $WM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tag": "campaña-octubre"
}'
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/recipients', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "tag": "campaña-octubre"
  }),
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/recipients",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    json={
        "tag": "campaña-octubre"
    },
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/recipients');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'tag' => 'campaña-octubre'
  ]),
]);
$data = json_decode(curl_exec($ch), true);
Response 201
{
  "total": 1217,
  "optedOut": 14,
  "withoutPhone": 3,
  "unpriceable": 0,
  "eligible": 1200,
  "added": 1200,
  "alreadyIn": 0,
  "totalRecipients": 1200
}

Estimated cost

GET/campaigns/{id}/preview-cost

Before sending: how many recipients will be charged, the final price per message in each destination market (based on the prefix of the receiving number) and the total in your organization's currency. Phones without a valid prefix are neither sent nor charged. wallet.sufficient says whether the balance is enough; includedUtilityRemaining is the number of included Utility messages left (Utility templates only).

Scopes: campaigns:read

Parameters

NameWhereTypeValues
id requiredpathstring
curl
curl "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/preview-cost" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/preview-cost', {
  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/campaigns/{id}/preview-cost",
    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/campaigns/{id}/preview-cost');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
  ],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
  "currency": "EUR",
  "recipientCount": 1200,
  "priceableCount": 1197,
  "unpriceableCount": 3,
  "estimatedTotal": 59.85,
  "byMarket": [
    {
      "market": "ES",
      "label": "España",
      "recipientCount": 1100,
      "totalCost": 0.05,
      "subtotal": 55,
      "rateEffectiveFrom": "2026-07-01"
    },
    {
      "market": "AR",
      "label": "Argentina",
      "recipientCount": 97,
      "totalCost": 0.05,
      "subtotal": 4.85,
      "rateEffectiveFrom": "2026-07-01"
    }
  ],
  "wallet": {
    "balance": 120,
    "afterSend": 60.15,
    "sufficient": true
  },
  "includedUtilityRemaining": null
}

Send, schedule or stagger

POST/campaigns/{id}/send

when: now (or no body) sends immediately; scheduled with scheduledAt (ISO 8601 with time zone, at least one minute in the future) leaves it scheduled; staggered splits it into batches of batchSize (10 to 5,000) every batchIntervalMin minutes (1 to 1,440). The batch cost is charged to the wallet before calling Meta; if the balance isn't enough, it responds 400 "Saldo insuficiente en la wallet." (insufficient wallet balance) and the campaign stays as it was. Responds with the campaign and its new status.

Scopes: campaigns:write

Parameters

NameWhereTypeValues
id requiredpathstring

Request body SendCampaign

NameTypeValues
whenstringnow · scheduled · staggered
scheduledAtstring
batchSizenumber10 – 5000
batchIntervalMinnumber1 – 1440

Common errors

  • 400 CAMPAIGN_VARIABLES_REQUIRED The template has variables and the campaign doesn't say where they come from.
  • 400 "Saldo insuficiente en la wallet." (insufficient wallet balance): top up from the dashboard and send again.
  • 400 "La campaña ya fue enviada o está en un estado inválido." (the campaign was already sent or is in an invalid state): only drafts and scheduled campaigns can be sent.
curl
curl -X POST "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/send" \
  -H "Authorization: Bearer $WM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "when": "staggered",
  "batchSize": 200,
  "batchIntervalMin": 10
}'
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/send', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "when": "staggered",
    "batchSize": 200,
    "batchIntervalMin": 10
  }),
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/send",
    headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
    json={
        "when": "staggered",
        "batchSize": 200,
        "batchIntervalMin": 10
    },
    timeout=30,
)
r.raise_for_status()
data = r.json()
PHP
<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/send');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('WM_API_KEY'),
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'when' => 'staggered',
    'batchSize' => 200,
    'batchIntervalMin' => 10
  ]),
]);
$data = json_decode(curl_exec($ch), true);
Response 201
{
  "id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
  "organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
  "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
  "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
  "name": "Octubre: promo",
  "status": "DRAFT",
  "scheduledAt": null,
  "startedAt": null,
  "completedAt": null,
  "batchSize": null,
  "batchIntervalMin": null,
  "nextBatchAt": null,
  "pausedAt": null,
  "stopReason": null,
  "sourceCampaignId": null,
  "createdAt": "2026-10-09T16:00:00.000Z",
  "updatedAt": "2026-10-09T16:00:00.000Z",
  "template": {
    "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
    "name": "promo_octubre",
    "category": "MARKETING",
    "language": "es",
    "bodyText": "Hola {{1}}, este mes tienes un {{2}} de descuento.",
    "status": "APPROVED"
  },
  "phoneNumber": {
    "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
    "numberE164": "+34600000000",
    "displayName": "Clínica Sol",
    "qualityRating": "GREEN"
  },
  "estimatedCost": null,
  "realCost": 0,
  "stats": {
    "total": 0,
    "pending": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "replied": 0,
    "failed": 0,
    "progressPct": 0
  },
  "errorsByReason": [],
  "lastReplies": []
}

Pause

POST/campaigns/{id}/pause

Stops sending what remains; what has already been sent can't be recalled. Only for campaigns that are currently sending.

Scopes: campaigns:write

Parameters

NameWhereTypeValues
id requiredpathstring
curl
curl -X POST "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/pause" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/pause', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/pause",
    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/campaigns/{id}/pause');
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);
Response 200
{
  "id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
  "organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
  "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
  "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
  "name": "Octubre: promo",
  "status": "DRAFT",
  "scheduledAt": null,
  "startedAt": null,
  "completedAt": null,
  "batchSize": null,
  "batchIntervalMin": null,
  "nextBatchAt": null,
  "pausedAt": null,
  "stopReason": null,
  "sourceCampaignId": null,
  "createdAt": "2026-10-09T16:00:00.000Z",
  "updatedAt": "2026-10-09T16:00:00.000Z",
  "template": {
    "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
    "name": "promo_octubre",
    "category": "MARKETING",
    "language": "es",
    "bodyText": "Hola {{1}}, este mes tienes un {{2}} de descuento.",
    "status": "APPROVED"
  },
  "phoneNumber": {
    "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
    "numberE164": "+34600000000",
    "displayName": "Clínica Sol",
    "qualityRating": "GREEN"
  },
  "estimatedCost": null,
  "realCost": 0,
  "stats": {
    "total": 0,
    "pending": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "replied": 0,
    "failed": 0,
    "progressPct": 0
  },
  "errorsByReason": [],
  "lastReplies": []
}

Resume

POST/campaigns/{id}/resume

Continues a paused campaign from where it left off (including those paused for insufficient balance, once the wallet has been topped up).

Scopes: campaigns:write

Parameters

NameWhereTypeValues
id requiredpathstring
curl
curl -X POST "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/resume" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/resume', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.WM_API_KEY}`,
  },
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://micuenta.whatsmarketing.es/api/v1/campaigns/{id}/resume",
    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/campaigns/{id}/resume');
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);
Response 200
{
  "id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
  "organizationId": "f0e1d2c3-b4a5-4968-8776-655443322110",
  "phoneNumberId": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
  "templateId": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
  "name": "Octubre: promo",
  "status": "DRAFT",
  "scheduledAt": null,
  "startedAt": null,
  "completedAt": null,
  "batchSize": null,
  "batchIntervalMin": null,
  "nextBatchAt": null,
  "pausedAt": null,
  "stopReason": null,
  "sourceCampaignId": null,
  "createdAt": "2026-10-09T16:00:00.000Z",
  "updatedAt": "2026-10-09T16:00:00.000Z",
  "template": {
    "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8a9b",
    "name": "promo_octubre",
    "category": "MARKETING",
    "language": "es",
    "bodyText": "Hola {{1}}, este mes tienes un {{2}} de descuento.",
    "status": "APPROVED"
  },
  "phoneNumber": {
    "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",
    "numberE164": "+34600000000",
    "displayName": "Clínica Sol",
    "qualityRating": "GREEN"
  },
  "estimatedCost": null,
  "realCost": 0,
  "stats": {
    "total": 0,
    "pending": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "replied": 0,
    "failed": 0,
    "progressPct": 0
  },
  "errorsByReason": [],
  "lastReplies": []
}