# Class reminders on WhatsApp with attendance confirmation

> Send class reminders to students or guardians from Moodle or your own timetable, take Confirm or Cannot attend taps, and free the seat before class starts.

Published 2026-11-27. Z-API Omni team.

Run a scheduled job over your timetable and send a utility template with Confirm and Cannot attend buttons a few hours before each session. Set its TTL so an undelivered reminder dies before class. Record Confirm in your own table. Write only Cannot attend back, as a freed seat and, if you use Moodle's attendance plugin, an excused status. A class session reminder is a utility message that asks an enrolled student, or a minor's guardian, whether the student will attend an upcoming session.

Moodle core has no outbound webhook that we could find, so nothing pushes the event to you. A job reads the timetable on a schedule, either your own table or Moodle's web services. The runnable service below uses its own table and writes to Moodle only when you configure it.

## The loop from timetable to freed seat

1. A job runs every minute and finds enrollments whose session starts in five to six hours.
2. It claims each one with `reminded_at`, picks the student's or guardian's number, and sends the `class_reminder` template.
3. The recipient taps Confirm or Cannot attend, and Meta posts a `type: "button"` message to your webhook.
4. Confirm sets `confirmed_at`. Cannot attend sets the enrollment to `cannot_attend`, which frees the seat.
5. With Moodle configured, Cannot attend also writes an excused status through `mod_attendance_update_user_status`.

A tap that arrives after the session has started is refused with a short reply. Nothing changes in the tables.

## Why the reminder passes as utility

Meta's categorization page has no example for classes, courses, enrollment or attendance. The general test applies: a utility template is non-promotional and "specific to or requested by the user" ([template categorization](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/template-categorization), accessed 2026-11-27). Its nearest example is an account reminder: "Reminder: Your monthly payment for {{service}} will be billed on {{date}}..."

We read a reminder for a session the student is enrolled in as specific to that student, so it fits utility. Meta's page doesn't say so in those words. A line about next term's courses would make it marketing, since Meta treats mixed content as marketing.

Keep the body logistical: the student's first name, the class, the time and the room. Leave out grades, absences and anything about the student's record, especially when the recipient is a guardian. The category rules are in more depth in [WhatsApp template categories](/academy/articles/whatsapp-template-categories-marketing-utility-authentication/).

### Set the TTL so the reminder dies before class

Utility templates accept `message_send_ttl_seconds` from "30 seconds to 12 hours", and Meta advises you to "assume the message was dropped" when it expires, since no expiry webhook is documented ([time-to-live](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/time-to-live), accessed 2026-11-27).

The service sends six hours ahead with a TTL of five hours. A 9:00 reminder for a 15:00 class dies at 14:00 if the phone never came online. The scheduler also sends only while the TTL still ends before class, so a late tick skips the reminder instead of sending one that would outlive the session.

The body says "today", so a session that starts before 6:00 gets its reminder the evening before. Give those sessions a template that names the day.

```bash
curl "https://graph.facebook.com/v26.0/$WABA_ID/message_templates" \
  -H "Authorization: Bearer $WA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "class_reminder",
    "language": "en_US",
    "category": "UTILITY",
    "parameter_format": "NAMED",
    "message_send_ttl_seconds": 18000,
    "components": [
      {
        "type": "BODY",
        "text": "Reminder: {{student_name}} has {{class_title}} today at {{time}} in {{room}}. Please tell us if the student will attend.",
        "example": {
          "body_text_named_params": [
            { "param_name": "student_name", "example": "Lucas" },
            { "param_name": "class_title", "example": "Algebra II" },
            { "param_name": "time", "example": "3:00 PM" },
            { "param_name": "room", "example": "Room 204" }
          ]
        }
      },
      {
        "type": "BUTTONS",
        "buttons": [
          { "type": "QUICK_REPLY", "text": "Confirm" },
          { "type": "QUICK_REPLY", "text": "Cannot attend" }
        ]
      }
    ]
  }'
```

If Meta recategorizes the template, the TTL is cleared, so read it back after any category change. When to use a custom template like this one instead of Meta's booking appointment template is covered in [the booking appointment template with a manage link](/academy/articles/whatsapp-booking-appointment-template-manage-link/).

## Guardian consent is a legal question

Meta's rules don't decide who may receive a message about a minor. The law where the school operates does, so treat this section as pointers for your counsel.

In Brazil, LGPD Art. 14 says the processing of children's and adolescents' data "deverá ser realizado em seu melhor interesse", meaning in their best interest. For children, its § 1º requires "consentimento específico e em destaque dado por pelo menos um dos pais ou pelo responsável legal". That is specific, highlighted consent from at least one parent or legal guardian ([Lei 13.709/2018](https://www.planalto.gov.br/ccivil_03/_ato2015-2018/2018/lei/l13709.htm), accessed 2026-11-27).

In the US, COPPA applies to "operators of websites or online services directed to children under 13 years of age" ([FTC, COPPA](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa), accessed 2026-11-27). The FTC page links a 2025 amendment published on April 22, 2025. In the EU, GDPR has its own rules on a child's consent, and a school may rely on a lawful basis other than consent. Check with counsel before you choose.

WhatsApp's own terms set a floor for the account holder: "You must be at least 13 years old to register for and use our Services on your own" ([WhatsApp Terms of Service](https://www.whatsapp.com/legal/terms-of-service), US version, accessed 2026-11-27). Below that age, the terms point to a parent-managed account.

For a student marked as a minor, the service sends to the guardian's number, and only when `consent_at` and `consent_by` are recorded. Collect that consent in words that name WhatsApp and the purpose, as shown in [how to collect WhatsApp opt-in](/academy/articles/whatsapp-opt-in-how-to-collect-consent/).

## The reminder service

This file runs on Python 3.9 or later with the standard library only. SQLite holds the timetable so you can try it as pasted. Set `DEMO_PHONE` to your own WhatsApp number in E.164 digits, and it seeds one session that starts in five and a half hours. The first scheduler tick then sends the reminder.

```python
# class_reminders.py: class session reminders on WhatsApp with Confirm and Cannot attend,
# written back to your timetable and, optionally, to Moodle's attendance plugin.
# Python 3.9+, standard library only.
# Run: WA_TOKEN=... PHONE_NUMBER_ID=... APP_SECRET=... VERIFY_TOKEN=... DEMO_PHONE=15551234567 python3 class_reminders.py
import hashlib
import hmac
import json
import os
import sqlite3
import threading
import time
import urllib.error
import urllib.parse
import urllib.request
from datetime import datetime
from http.server import BaseHTTPRequestHandler, HTTPServer
from zoneinfo import ZoneInfo

for name in ("WA_TOKEN", "PHONE_NUMBER_ID", "APP_SECRET", "VERIFY_TOKEN"):
    if not os.environ.get(name):
        raise SystemExit(f"Missing environment variable {name}")
WA_TOKEN = os.environ["WA_TOKEN"]
APP_SECRET = os.environ["APP_SECRET"].encode()
VERIFY_TOKEN = os.environ["VERIFY_TOKEN"]
GRAPH_URL = f"https://graph.facebook.com/v26.0/{os.environ['PHONE_NUMBER_ID']}/messages"
TEMPLATE = os.environ.get("WA_TEMPLATE", "class_reminder")
PORT = int(os.environ.get("PORT", "3000"))
LEAD = 6 * 3600  # send up to six hours before the session
TTL = 5 * 3600   # must equal message_send_ttl_seconds on the template

# Optional Moodle write-back through the mod_attendance web service.
MOODLE_URL = os.environ.get("MOODLE_URL", "").rstrip("/")
MOODLE_TOKEN = os.environ.get("MOODLE_TOKEN", "")
MOODLE_TAKER_ID = os.environ.get("MOODLE_TAKER_ID", "")  # teacher account written as takenbyid
MOODLE_CANNOT_ATTEND = os.environ.get("MOODLE_CANNOT_ATTEND", "Excused").lower()

LOCK = threading.Lock()
db = sqlite3.connect(os.environ.get("DB_PATH", "classes.db"), check_same_thread=False, isolation_level=None)
db.row_factory = sqlite3.Row
db.executescript("""
create table if not exists sessions (
  id integer primary key,
  title text not null,
  room text not null,
  starts_at integer not null,          -- Unix seconds, like Moodle's sessdate
  duration integer not null,           -- seconds
  timezone text not null,
  capacity integer not null,
  moodle_session_id integer            -- null when the session is not in Moodle
);
create table if not exists contacts (
  student_id text primary key,
  student_name text not null,
  phone text,                          -- E.164 digits, student's own number
  is_minor integer not null default 0,
  guardian_phone text,
  consent_at integer,                  -- when consent to WhatsApp reminders was given
  consent_by text,                     -- 'student' or the guardian's name
  moodle_user_id integer,
  opted_out_at integer
);
create table if not exists enrollments (
  session_id integer not null,
  student_id text not null,
  status text not null default 'enrolled',   -- 'enrolled' or 'cannot_attend'
  confirmed_at integer,
  reminded_at integer,
  sent_to text,
  wa_message_id text,
  send_error text,
  primary key (session_id, student_id)
);
create table if not exists seen_inbound (wamid text primary key);
""")

def graph_send(message, attempt=1):
    body = json.dumps({"messaging_product": "whatsapp", "recipient_type": "individual", **message}).encode()
    req = urllib.request.Request(
        GRAPH_URL, data=body, headers={"Authorization": f"Bearer {WA_TOKEN}", "Content-Type": "application/json"}
    )
    try:
        with urllib.request.urlopen(req, timeout=20) as res:
            return json.load(res)["messages"][0]["id"]
    except urllib.error.HTTPError as err:
        detail, retryable = err.read().decode(errors="replace"), err.code == 429 or err.code >= 500
    except (urllib.error.URLError, TimeoutError) as err:
        detail, retryable = str(err), True
    if retryable and attempt < 4:
        time.sleep(2 ** attempt)
        return graph_send(message, attempt + 1)
    raise RuntimeError(detail)

def send_text(to, text):
    try:
        graph_send({"to": to, "type": "text", "text": {"body": text}})
    except RuntimeError as err:
        print("reply failed", to, err)

def moodle(function, **params):
    data = urllib.parse.urlencode({"wstoken": MOODLE_TOKEN, "wsfunction": function, **params}).encode()
    url = f"{MOODLE_URL}/webservice/rest/server.php?moodlewsrestformat=json"
    with urllib.request.urlopen(urllib.request.Request(url, data=data), timeout=20) as res:
        out = json.load(res)
    if isinstance(out, dict) and "exception" in out:
        raise RuntimeError(f"{function}: {out.get('errorcode')} {out.get('message')}")
    return out

def moodle_cannot_attend(moodle_session_id, moodle_user_id):
    session = moodle("mod_attendance_get_session", sessionid=moodle_session_id)
    statusset = session["statusset"]
    match = next(
        (s for s in session.get("statuses", [])
         if str(s.get("setnumber")) == str(statusset) and not int(s.get("deleted") or 0)
         and MOODLE_CANNOT_ATTEND in (str(s.get("description", "")).lower(), str(s.get("acronym", "")).lower())),
        None,
    )
    if not match:
        raise RuntimeError(f"no status '{MOODLE_CANNOT_ATTEND}' in status set {statusset}")
    return moodle(
        "mod_attendance_update_user_status",
        sessionid=moodle_session_id, studentid=moodle_user_id, takenbyid=MOODLE_TAKER_ID,
        statusid=match["id"], statusset=statusset,
    )

def run_reminders():
    now = int(time.time())
    with LOCK:
        rows = db.execute(
            """select e.session_id, e.student_id, s.title, s.room, s.starts_at, s.timezone,
                      c.student_name, c.phone, c.is_minor, c.guardian_phone
               from enrollments e
               join sessions s on s.id = e.session_id
               join contacts c on c.student_id = e.student_id
               where e.status = 'enrolled' and e.reminded_at is null
                 and s.starts_at - ? <= ? and ? <= s.starts_at - ?
                 and c.consent_at is not null and c.consent_by is not null and c.opted_out_at is null""",
            (LEAD, now, now, TTL),
        ).fetchall()
    for r in rows:
        to = r["guardian_phone"] if r["is_minor"] else r["phone"]
        if not to:
            continue
        with LOCK:  # claim before the send, so two ticks never send twice
            claimed = db.execute(
                "update enrollments set reminded_at = ?, sent_to = ? where session_id = ? and student_id = ? and reminded_at is null",
                (now, to, r["session_id"], r["student_id"]),
            ).rowcount
        if not claimed:
            continue
        start = datetime.fromtimestamp(r["starts_at"], ZoneInfo(r["timezone"]))
        payload = f"att|{r['session_id']}|{r['student_id']}"
        params = {"student_name": r["student_name"], "class_title": r["title"],
                  "time": f"{start:%I:%M %p}".lstrip("0"), "room": r["room"]}
        try:
            wamid = graph_send({
                "to": to,
                "type": "template",
                "template": {
                    "name": TEMPLATE,
                    "language": {"code": "en_US"},
                    "components": [
                        {"type": "body", "parameters": [
                            {"type": "text", "parameter_name": k, "text": v} for k, v in params.items()]},
                        {"type": "button", "sub_type": "quick_reply", "index": "0",
                         "parameters": [{"type": "payload", "payload": f"{payload}|confirm"}]},
                        {"type": "button", "sub_type": "quick_reply", "index": "1",
                         "parameters": [{"type": "payload", "payload": f"{payload}|cannot"}]},
                    ],
                },
            })
            with LOCK:
                db.execute("update enrollments set wa_message_id = ? where session_id = ? and student_id = ?",
                           (wamid, r["session_id"], r["student_id"]))
        except RuntimeError as err:
            with LOCK:
                db.execute("update enrollments set send_error = ? where session_id = ? and student_id = ?",
                           (str(err)[:500], r["session_id"], r["student_id"]))
            print("reminder failed", r["session_id"], r["student_id"], err)

def on_tap(msg):
    parts = str((msg.get("button") or {}).get("payload", "")).split("|")
    with LOCK:
        if len(parts) == 4 and parts[0] == "att":
            row = db.execute(
                """select e.*, s.starts_at, s.capacity, s.moodle_session_id, c.moodle_user_id, c.student_name
                   from enrollments e join sessions s on s.id = e.session_id
                   join contacts c on c.student_id = e.student_id
                   where e.session_id = ? and e.student_id = ?""", (parts[1], parts[2])).fetchone()
            action = parts[3]
        else:  # payload not in our format: match the template message the tap belongs to
            row = db.execute(
                """select e.*, s.starts_at, s.capacity, s.moodle_session_id, c.moodle_user_id, c.student_name
                   from enrollments e join sessions s on s.id = e.session_id
                   join contacts c on c.student_id = e.student_id
                   where e.wa_message_id = ?""", ((msg.get("context") or {}).get("id", ""),)).fetchone()
            action = {"Confirm": "confirm", "Cannot attend": "cannot"}.get((msg.get("button") or {}).get("text"))
    if not row or action not in ("confirm", "cannot"):
        return print("unmatched tap", msg.get("id"))
    if msg.get("from") and msg["from"] != row["sent_to"]:
        return print("tap from a number we did not message", msg.get("id"))
    to = row["sent_to"]
    if time.time() >= row["starts_at"]:
        return send_text(to, "This session has already started, so we could not record your answer. Please contact the school.")
    key = (row["session_id"], row["student_id"])
    if action == "confirm":
        with LOCK:
            changed = db.execute(
                "update enrollments set confirmed_at = ? where session_id = ? and student_id = ? and status = 'enrolled' and confirmed_at is null",
                (int(time.time()), *key)).rowcount
        if changed:
            send_text(to, f"Thanks. {row['student_name']} is confirmed for today's session.")
        return
    with LOCK:
        changed = db.execute(
            "update enrollments set status = 'cannot_attend' where session_id = ? and student_id = ? and status = 'enrolled'",
            key).rowcount
        taken = db.execute("select count(*) from enrollments where session_id = ? and status = 'enrolled'",
                           (row["session_id"],)).fetchone()[0]
    if not changed:
        return
    print("seat freed", row["session_id"], "open seats:", row["capacity"] - taken)  # hand to your waitlist here
    if MOODLE_URL and row["moodle_session_id"] and row["moodle_user_id"]:
        try:
            moodle_cannot_attend(row["moodle_session_id"], row["moodle_user_id"])
        except (RuntimeError, urllib.error.URLError, KeyError, ValueError) as err:
            print("moodle write failed, mark it by hand", key, err)
    send_text(to, f"Thanks for letting us know. {row['student_name']} is marked as not attending today.")

def handle_message(msg):
    with LOCK:
        if not db.execute("insert or ignore into seen_inbound values (?)", (msg.get("id"),)).rowcount:
            return  # Meta retried this webhook
    if msg.get("type") == "button":
        return on_tap(msg)
    if msg.get("type") == "text" and msg.get("from") and (msg.get("text") or {}).get("body", "").strip().lower() == "stop":
        with LOCK:
            db.execute("update contacts set opted_out_at = ? where phone = ? or guardian_phone = ?",
                       (int(time.time()), msg["from"], msg["from"]))
        send_text(msg["from"], "You will not get class reminders here anymore.")

class Handler(BaseHTTPRequestHandler):
    def do_GET(self):
        q = urllib.parse.parse_qs(urllib.parse.urlparse(self.path).query)
        ok = q.get("hub.mode") == ["subscribe"] and q.get("hub.verify_token") == [VERIFY_TOKEN]
        body = (q.get("hub.challenge", [""])[0] if ok else "forbidden").encode()
        self.send_response(200 if ok else 403)
        self.send_header("Content-Length", str(len(body)))
        self.end_headers()
        self.wfile.write(body)

    def do_POST(self):
        raw = self.rfile.read(int(self.headers.get("Content-Length") or 0))
        expected = "sha256=" + hmac.new(APP_SECRET, raw, hashlib.sha256).hexdigest()
        ok = hmac.compare_digest(self.headers.get("X-Hub-Signature-256", ""), expected)
        self.send_response(200 if ok else 401)
        self.send_header("Content-Length", "0")
        self.end_headers()
        if not ok:
            return
        try:
            body = json.loads(raw)
        except ValueError:
            return
        for entry in body.get("entry", []):
            for change in entry.get("changes", []):
                if change.get("field") != "messages":
                    continue
                for msg in (change.get("value") or {}).get("messages", []):
                    try:
                        handle_message(msg)
                    except Exception as err:  # keep serving after one bad message
                        print("handler error", msg.get("id"), err)

def scheduler():
    while True:
        try:
            run_reminders()
        except Exception as err:
            print("scheduler error", err)
        time.sleep(60)

if __name__ == "__main__":
    demo = os.environ.get("DEMO_PHONE")
    if demo:
        with LOCK:
            db.execute("insert or ignore into sessions values (1, 'Algebra II', 'Room 204', ?, 3600, 'America/New_York', 20, null)",
                       (int(time.time()) + 5 * 3600 + 1800,))
            db.execute("insert or ignore into contacts values ('s-17', 'Lucas', null, 1, ?, ?, 'guardian: R. Silva', null, null)",
                       (demo, int(time.time())))
            db.execute("insert or ignore into enrollments (session_id, student_id) values (1, 's-17')")
    threading.Thread(target=scheduler, daemon=True).start()
    print(f"listening on {PORT}")
    HTTPServer(("", PORT), Handler).serve_forever()
```

A guardian may have several students in the same class, so the payload names both: `att|<session_id>|<student_id>|cannot`. Matching by phone number alone would pick the wrong child. Signature verification follows [X-Hub-Signature-256 verification](/academy/articles/whatsapp-webhook-signature-verification-x-hub-signature-256/).

## The reply you receive

A quick-reply tap arrives as an inbound message with `"type": "button"`, carrying `button.payload` and `button.text`. `context.id` is the "WhatsApp message ID of the message containing the button the WhatsApp user tapped" ([button webhook reference](https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/button), accessed 2026-11-27). Meta's full sample, and why to parse `payload` before `text`, are in [WhatsApp appointment reminders with Confirm and Reschedule](/academy/articles/whatsapp-appointment-reminders-confirm-reschedule/).

The service checks that `from` matches `sent_to`, the number it messaged. A forwarded screenshot can't answer for someone else's child.

## Why Confirm stays in your own table

A Confirm tap says the student plans to attend. It isn't attendance. Writing "Present" into Moodle ahead of class would put a false record in the register, so the service only sets `confirmed_at` locally. Teachers still take attendance in class. That split is our recommendation; the plugin doesn't require it.

A Cannot attend tap is a fact about the future that the school wants to know early. The service frees the seat at once and, with Moodle configured, writes the excused status you name in `MOODLE_CANNOT_ATTEND`.

### Writing to Moodle's attendance plugin

Attendance is not in Moodle core. The [mod_attendance plugin](https://github.com/danmarsden/moodle-mod_attendance) (accessed 2026-11-27) "Allows an attendance log to be kept in Moodle", with branches for 4.5, 5.0, 5.1-5.2 and 5.3. Its web service is documented only in the plugin's source, under the service shortname `mod_attendance`.

Calls go to `POST https://<moodle>/webservice/rest/server.php?moodlewsrestformat=json` with `wstoken`, `wsfunction` and the parameters as form fields. Errors come back as JSON with `exception` and `message`, plus `errorcode` when the exception defines one. Your site also lists its functions under Site administration > Server > Web services > API Documentation.

`mod_attendance_update_user_status` takes exactly five parameters:

| Parameter | Type | Description in the plugin source |
| --- | --- | --- |
| `sessionid` | PARAM_INT | Session id |
| `studentid` | PARAM_INT | Student id |
| `takenbyid` | PARAM_INT | Id of the user who took this session |
| `statusid` | PARAM_INT | Status id |
| `statusset` | PARAM_TEXT | Status set of session |

There is no `remarks` parameter, so a reason typed by the guardian can't travel through this call. `statusset` must match the session's, and `statusid` must be in its allowed list. The call returns the string `OK`, although its return description says "Http code".

Status IDs can vary by session and site, so don't hardcode them. The service calls `mod_attendance_get_session` first and picks the status whose description or acronym matches your setting. That call returns `statuses[]` with `id`, `acronym`, `description`, `deleted` and `setnumber`, plus `users[]` and `attendance_log[]`.

The token's user needs `mod/attendance:takeattendances` in each course to write for students. Without it, a user can mark only their own attendance, when the session allows it. Moodle tokens are tied to one service, so issue one for the Attendance service.

To fill the timetable from Moodle, a scheduled job can call `mod_attendance_get_sessions` with `attendanceid`. Copy `sessdate`, which is Unix time, and `duration` into `sessions`, and match `users[]` to your contacts. Moodle core has no guardian field, so the `contacts` table stays yours.

## When the loop breaks

### Nobody answers

The enrollment stays `enrolled` with no `confirmed_at`, and the teacher's register settles it. Don't send a second template for the same session.

### The reminder was dropped

If no `delivered` status arrives before the TTL ends, Meta's page says to "assume the message was dropped". Status handling is in [delivery reports from status webhooks](/academy/articles/whatsapp-campaign-delivery-report-status-webhooks/). For a session where attendance matters, a dropped reminder is the point for a phone call.

### A tap comes in twice

`seen_inbound` rejects a repeated wamid, and the `status = 'enrolled'` filter makes a second Cannot attend change nothing. A Confirm after Cannot attend changes nothing either. If a family changes its mind, staff re-enroll the student.

### A seat opens

The service logs the open seats. Offering that seat to the next person is its own loop, with a lock so two people can't take one place, as in [refilling a cancelled slot from a waitlist](/academy/articles/whatsapp-waitlist-refill-cancelled-appointment/).

### The family opts out

A reply of STOP sets `opted_out_at` on every contact with that number, and the scheduler skips them.

## Sending on Telegram instead

On Telegram, the student or guardian must `/start` the bot first, and that first message is a clear opt-in moment. Telegram's `sendMessage` takes no time-to-live, so the start-time check on each tap does the work. The linking flow is in [Telegram account linking for order notifications](/academy/articles/telegram-bot-link-account-order-notifications/).

## Where Z-API Omni fits

Z-API Omni sends this reminder as a custom UTILITY template on Meta Cloud API channels, with `content.type` `TEMPLATE`. You create the template with `POST /whatsapp/businesses/{wabaId}/templates`, which accepts `message_send_ttl_seconds`. The docs' `appointment_reminder` model below has Confirm and Reschedule quick replies, so swap the second for Cannot attend. Its body opens with a variable, which the same page says Meta rejects, so start it with a word.

On the QR connection, and on Telegram once the recipient has started the bot, `INTERACTIVE_BUTTON` with up to three buttons goes out at any time. The docs show no scheduling, no Moodle integration and no JSON for a button tap. WhatsApp, Messenger, Instagram and Telegram come in one subscription. Each number costs US$29 per month for 1 to 10 numbers, US$26 for 11 to 50, US$23 for 51 to 100 and US$20 above 100. Meta's fees are passed through on the official connection.

<!-- TODO:test Omni snippet: appointment_reminder copied from the docs; rewrite the body so it does not open with a variable, add message_send_ttl_seconds, and map the tap's MESSAGE_RECEIVED payload -->

```json
{
  "name": "appointment_reminder",
  "category": "UTILITY",
  "language": "en_US",
  "parameter_format": "NAMED",
  "components": [
    {
      "type": "BODY",
      "text": "{{customer_name}}, your appointment is tomorrow at {{time}} with {{professional}}. Can we confirm?",
      "example": {
        "body_text_named_params": [
          { "param_name": "customer_name", "example": "Marina" },
          { "param_name": "time", "example": "2:30pm" },
          { "param_name": "professional", "example": "Dr. Helena" }
        ]
      }
    },
    {
      "type": "BUTTONS",
      "buttons": [
        { "type": "QUICK_REPLY", "text": "Confirm" },
        { "type": "QUICK_REPLY", "text": "Reschedule" }
      ]
    }
  ]
}
```

[View documentation](https://developer.omni.z-api.io/en)

*Z-API Omni team*
