Skip to content
WhatsMarketingDeveloper Hub

WhatsApp templates

Your organization's templates and their status at Meta. They need the templates:read permission. To send a template to a contact, see POST /campaigns/send-to-contact/{contactId} under Campaigns.

List templates

GET/whatsapp/templates

The organization's templates, with filters by tab (tab), category, language and free search (q). Needs templates:read.

Scopes: templates:read

Parameters

NameWhereTypeValues
pagequerynumberdefault: 1 · 1 – …
pageSizequerynumberdefault: 20 · 1 – 100
tabquerystringall · approved · pending · rejected · drafts
categoryquerystringMARKETING · UTILITY · AUTHENTICATION
languagequerystring0–10 characters
qquerystring0–120 characters
curl
curl "https://micuenta.whatsmarketing.es/api/v1/whatsapp/templates?page=1&pageSize=20" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/whatsapp/templates?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/whatsapp/templates?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/whatsapp/templates?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);

No response example yet.

Get a template

GET/whatsapp/templates/{id}

The content and status of a template. Returns 404 if it is not in your organization. Needs templates:read.

Scopes: templates:read

Parameters

NameWhereTypeValues
id requiredpathstring
curl
curl "https://micuenta.whatsmarketing.es/api/v1/whatsapp/templates/{id}" \
  -H "Authorization: Bearer $WM_API_KEY"
Node.js
const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/whatsapp/templates/{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/whatsapp/templates/{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/whatsapp/templates/{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.