Send WhatsApp template messages to one contact, a list or a segment through app2email: pick an approved template, fill its values (body text, header media, buttons, named placeholders), personalise per recipient, schedule, dry run, run big lists in the background, follow delivery, and respect consent and the Do Not Call list. Use when the user wants to notify, remind or market to customers on WhatsApp, or asks about WhatsApp templates and broadcasts.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of app2email-broadcasts?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/app2email-app2email-broadcasts)
---
name: app2email-broadcasts
description: Send WhatsApp template messages to one contact, a list or a segment through app2email: pick an approved template, fill its values (body text, header media, buttons, named placeholders), personalise per recipient, schedule, dry run, run big lists in the background, follow delivery, and respect consent and the Do Not Call list. Use when the user wants to notify, remind or market to customers on WhatsApp, or asks about WhatsApp templates and broadcasts.
license: MIT
metadata:
author: app2email
version: "1.1.0"
source: generated by sdk/skills/make_skills.py from the app2email OpenAPI spec 1.4.0
---
# app2email broadcasts and templates
A template is a message Meta approved in advance (name, language, placeholders). Templates are the only way to message a contact who did not write in the last 24 hours. Three categories: UTILITY (transactional, cheaper), MARKETING (needs consent, refused for Do Not Call numbers), AUTHENTICATION (one-time codes).
## Procedure
1. `GET /templates`: choose an APPROVED template; the answer carries `example_request` per template, copy its shape. `GET /templates/{name}` shows rejection reasons and quality.
2. Build the body (see [references/send-template.md](references/send-template.md)): `to` (one number, a comma list, or an array), or `recipients` with per-number `components`, or `segment` (a saved contact filter). Shared `template.components` apply to everyone; a recipient's component of the same type (same button index) replaces it.
3. `POST /messages` with `"dry_run": true`. Fix anything the error reports (`example_request`).
4. Confirm with the user: how many numbers, which template, when. Then send with an `Idempotency-Key` and a `campaign_name`.
5. More than a few hundred numbers or a slow client: `"background": true` → `202` with `broadcast.status_url`; follow `GET /broadcasts/{code}` or the `broadcast.completed` webhook. `GET /broadcasts/{code}/results.csv` gives the result per number.
6. Later: `"send_at"`; cancel with `POST /broadcasts/{code}/cancel`.
## Personalisation
Numbered placeholders take `{"type": "text", "text": "John"}` in order; named placeholders add `"parameter_name"`. Header media: `link` (public URL, app2email downloads it), base64 `data`, or a media `id` from `POST /media` (upload once, reuse for 30 days). Leave the header out to use the template's sample media. Buttons: `{"type": "button", "sub_type": "url", "index": "0", "parameters": [{"type": "text", "text": "abc"}]}`.
Contacts' `custom_fields` (from `POST /contacts`) can be used as values when sending to a `segment`.
## Consent and compliance
- MARKETING templates: only to contacts with consent (record it with `POST /contacts/{identity}/consent` or `POST /optins`); the opt-in rule can be enforced per number (`PUT /settings/optin`).
- The Do Not Call list (`GET /donotcall`) is applied automatically to marketing sends; `contact.opted_out` webhook events tell you when someone taps "Stop promotions". Add numbers with `POST /donotcall` when a person asks not to be contacted.
- The monthly plan limit counts outgoing WhatsApp messages and outgoing emails together (`GET /usage`); Meta charges per message beyond the free service allowance (`GET /usage/meta` when available).
## Guardrails (read before any send)
- CANNOT send a free-form message (text, image, video, document, buttons) to a contact whose 24 hour window is closed. `window_open: false` or `422 outside_24h_window` means: send an APPROVED template instead, or stop.
- CANNOT send marketing to a number on the Do Not Call list (the API refuses with `403 recipient_opted_out`) or to a person who has not consented to marketing. Utility messages (order updates, reminders the person asked for) do not need marketing consent.
- CANNOT connect a WhatsApp number or pay for a plan: a person does that. An agent can start an account for a person with the Management MCP server (`create_account`, see app2email-setup); otherwise ask the user for the number and a key.
- CANNOT read messages of other numbers: a key belongs to one number.
- Every send reaches a real person's phone and counts against the customer's monthly plan (outgoing WhatsApp messages and outgoing emails together). Confirm the recipients and the content with the user unless they already told you to send; use `dry_run: true` first for template sends; use an `Idempotency-Key` so a retry never sends twice.
- Never put the API key in a message, a log, a web page or a reply to the user.
- When the person asks for a human, stop automating that contact: hand the conversation over (see the agent handoff skill) and say so.
## Endpoints used
| Call | Does | Scope |
| --- | --- | --- |
| `GET /messages` | Messages sent and received, newest first | messages:read |
| `POST /messages` | Send a WhatsApp message: template, or free-form reply | messages:send |
| `GET /messages/{message_id}` | Status of a sent message | messages:read |
| `GET /templates` | List your templates, with an example request for each | messages:read |
| `POST /templates` | Create a template and submit it for approval | templates:manage |
| `GET /templates/{name}` | One template: status, rejection reason, what it needs | messages:read |
| `PATCH /templates/{name}` | Edit a template (components, category, TTL, max price) | templates:manage |
| `DELETE /templates/{name}` | Delete a template (every language, or one) | templates:manage |
| `GET /broadcasts` | Your latest broadcasts | messages:read |
| `GET /broadcasts/{code}` | A broadcast's status and the result per number | messages:read |
| `GET /broadcasts/{code}/results.csv` | A broadcast's result for each message, as CSV | messages:read |
| `POST /broadcasts/{code}/cancel` | Cancel a scheduled or sending API broadcast | messages:send |
| `GET /donotcall` | The Do Not Call list, or check one number | dnc:manage |
| `POST /donotcall` | Add numbers to the Do Not Call list | dnc:manage |
| `DELETE /donotcall/{phone}` | Remove a number from the Do Not Call list | dnc:manage |
| `GET /settings/optin` | Is the opt-in rule for marketing on? | settings:manage |
| `PUT /settings/optin` | Turn the opt-in rule for marketing on or off | settings:manage |
| `GET /optins` | The opt-in records, or check one number | settings:manage |
| `POST /optins` | Record that people opted in | settings:manage |
| `DELETE /optins/{phone}` | Remove an opt-in record | settings:manage |
| `GET /compliance/export.csv` | Consent records, Do Not Call list and opt-ins as one CSV | dnc:manage |
| `POST /messages/read` | Mark a received message as read, optionally typing | messages:send |
| `GET /marketing` | Where marketing templates go: Cloud API or Marketing Messages API | messages:read |
| `POST /templates/delete` | Delete several templates at once (all or nothing) | templates:manage |
| `POST /templates/{name}/archive` | Archive a template (deleted by WhatsApp after 28 days) | templates:manage |
| `POST /templates/{name}/unarchive` | Unarchive a template | templates:manage |
| `GET /templates/{name}/compare` | Compare two templates: block rate, sends, top block reason | messages:read |
| `PUT /templates/{name}/authentication` | Create or update an authentication template in many languages | templates:manage |
| `GET /template-previews` | Authentication template texts, per language | messages:read |
| `GET /template-library` | Meta's Template Library (pre-approved templates) | messages:read |
| `GET /template-insights` | Template insights: sent, delivered, read, clicked, cost | messages:read |
| `POST /template-insights` | Switch template insights on (cannot be undone) | templates:manage |