WACM.in Logo
Back to API Overview
REST API v1MCP Supported (4 Tools)

Reminders & Reservations API

Create and manage appointment reservations, schedule automated WhatsApp reminder broadcasts before/after events, prune stale messages on rescheduling, and inspect booking history via REST and MCP.

AI & LLM Integration Hub

LLM Ready

Feed WACM API specs directly to Cursor, Claude, ChatGPT, Antigravity, or custom AI agents.

Download .mdOpenAPI 3.1
Machine-Readable Feeds:/llms.txt /llms-full.txt

Overview

The Reminders module automates time-based WhatsApp communication for reservations, appointments, renewals, consultations, and payment deadlines. It bridges your scheduling workflow with WhatsApp Cloud API campaigns, providing:

  • REST API Endpoints: Full CRUD operations under /api/v1/reminders/reservations with Bearer token authentication.
  • Booking Idempotency: Safe retries using booking_key prevent duplicate appointment bookings.
  • Smart Reschedule Lifecycle: Updating appointment times automatically cancels old pending reminder messages and schedules fresh ones, avoiding duplicate alerts.
  • Negative Variables: Seamless variable injection (-4 to -10) into WhatsApp campaign templates for date, time, and booking reference.
  • MCP Server Tools: AI agents in Claude, Cursor, or Antigravity can list and inspect reservations using the official @codingmantra/wacm-mcp package.
  • WhatsApp Chat Sideapp: Customer support agents can view upcoming reservations and schedule new appointments directly inside the WhatsApp team chat sidebar.

How the Scheduling Engine Works

1. Sources & Rules

Admins configure Sources (e.g. "Doctor Appointment", "Vehicle Service") with one or more reminder rules (e.g., 24 hours before, 1 hour before).

2. Reservation Created

When created via API, sideapp, or dashboard, the system immediately pre-calculates send times and registers scheduled campaign messages for the contact.

3. CheckDueReminders Job

Runs on a schedule, identifies active reservations within the send window, and dispatches personalized WhatsApp messages via Meta Cloud API.

Authentication

All endpoints accept authentication via Laravel Sanctum API tokens:

  • Header: Authorization: Bearer YOUR_SANCTUM_TOKEN
  • Query Parameter: ?token=YOUR_SANCTUM_TOKEN
  • JSON Request Body: {"token": "YOUR_SANCTUM_TOKEN"}

REST API Endpoints

MethodEndpointDescription
POST/api/v1/reminders/reservationsCreate reservation with optional idempotency key
PUT/api/v1/reminders/reservationsUpdate/reschedule reservation (auto-prunes old messages)
DELETE/api/v1/reminders/reservationsCancel reservation and prune pending reminder messages
GET/api/v1/reminders/reservationsList reservations (filters: contact_id, phone, status, page)
GET/api/v1/reminders/reservations/showGet single reservation details by ID
GET/api/v1/remindersList active reminder sources and configured rules

1. Create Reservation

Creates a new reservation for a contact. You can specify a WhatsApp phone number directly (the contact will be located or created automatically) or pass an existing contact_id.

Idempotency: Supply an optional booking_key (e.g., your internal booking UUID). If a reservation with that key already exists, WACM returns the existing record immediately without duplicating reminders or sending duplicate notifications.

Parameters

ParameterTypeRequiredDescription
source_idintegerRequiredID of the Reminder Source defining message templates and time rules
start_datedatetimeRequiredAppointment start timestamp in <code>YYYY-MM-DD HH:mm:ss</code> format
phonestringOptionalContact phone with country code (e.g. <code>+919876543210</code>). Required if <code>contact_id</code> is omitted
contact_idintegerOptionalExisting Wpbox contact ID. Required if <code>phone</code> is omitted
end_datedatetimeOptionalOptional appointment end timestamp in <code>YYYY-MM-DD HH:mm:ss</code> format
booking_keystringOptionalUnique idempotency key to prevent duplicate booking creation on network retries
external_idstringOptionalReference ID from your external booking system or EHR/CRM
notesstringOptionalOptional internal notes or remarks about the appointment
statusintegerOptional<code>1</code> = Active (default), <code>2</code> = Inactive, <code>3</code> = Cancelled, <code>4</code> = Completed
cURL - Create Reservation
curl -X POST "https://app.wacm.in/api/v1/reminders/reservations" \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+919876543210",
    "source_id": 3,
    "start_date": "2026-10-15 14:30:00",
    "end_date": "2026-10-15 15:30:00",
    "booking_key": "booking-apt-88219",
    "external_id": "EXT-88219",
    "notes": "Consultation with Dr. Sharma"
  }'
200 OK Response
{
  "status": "success",
  "message": "Reservation created successfully",
  "data": {
    "id": 142,
    "company_id": 12,
    "source_id": 3,
    "contact_id": 804,
    "start_date": "2026-10-15 14:30:00",
    "end_date": "2026-10-15 15:30:00",
    "booking_key": "booking-apt-88219",
    "external_id": "EXT-88219",
    "notes": "Consultation with Dr. Sharma",
    "status": 1,
    "created_at": "2026-10-11T16:30:00.000000Z",
    "updated_at": "2026-10-11T16:30:00.000000Z"
  }
}

2. Reschedule or Update Reservation

Updates appointment date, time, status, or source. When start_date, end_date, source_id, or status changes, WACM's automatic lifecycle listener cancels all unsent pending reminder messages for the old schedule and re-generates new ones for the revised date.

Parameters

ParameterTypeRequiredDescription
idintegerRequiredReservation ID to update
start_datedatetimeOptionalRevised appointment start timestamp
end_datedatetimeOptionalRevised appointment end timestamp
source_idintegerOptionalChange reminder template source
statusintegerOptionalStatus code: <code>1</code> = Active, <code>2</code> = Inactive, <code>3</code> = Cancelled, <code>4</code> = Completed
notesstringOptionalUpdated notes
external_idstringOptionalUpdated external reference ID
cURL - Reschedule Reservation
curl -X PUT "https://app.wacm.in/api/v1/reminders/reservations" \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 142,
    "start_date": "2026-10-16 11:00:00",
    "end_date": "2026-10-16 12:00:00",
    "notes": "Rescheduled per patient request"
  }'
200 OK Response
{
  "status": "success",
  "message": "Reservation updated successfully",
  "data": {
    "id": 142,
    "company_id": 12,
    "source_id": 3,
    "contact_id": 804,
    "start_date": "2026-10-16 11:00:00",
    "end_date": "2026-10-16 12:00:00",
    "booking_key": "booking-apt-88219",
    "external_id": "EXT-88219",
    "notes": "Rescheduled per patient request",
    "status": 1,
    "updated_at": "2026-10-11T16:35:00.000000Z"
  }
}

3. Cancel Reservation

Cancels an appointment reservation. It sets the status to 3 (Cancelled) and immediately purges all pending scheduled messages so the customer will not receive any further reminders.

Parameters

ParameterTypeRequiredDescription
idintegerRequiredReservation ID to cancel (can also be passed as <code>reservation_id</code>)
cURL - Cancel Reservation
curl -X DELETE "https://app.wacm.in/api/v1/reminders/reservations" \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "id": 142 }'
200 OK Response
{
  "status": "success",
  "message": "Reservation cancelled successfully",
  "data": {
    "id": 142,
    "status": 3,
    "status_text": "Cancelled"
  }
}

4. List Reservations

Query reservations with filtering by phone number, contact ID, or status code.

Parameters

ParameterTypeRequiredDescription
phonestringOptionalFilter by customer phone number
contact_idintegerOptionalFilter by specific Wpbox contact ID
statusintegerOptionalFilter by status: <code>1</code> (Active), <code>2</code> (Inactive), <code>3</code> (Cancelled), <code>4</code> (Completed)
pageintegerOptionalPage number for pagination (default: 1)
limitintegerOptionalResults per page (default: 20, max: 100)
cURL - List Reservations
curl "https://app.wacm.in/api/v1/reminders/reservations?phone=%2B919876543210&status=1" \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN"
200 OK Response
{
  "status": "success",
  "data": [
    {
      "id": 142,
      "source_id": 3,
      "contact_id": 804,
      "start_date": "2026-10-16 11:00:00",
      "end_date": "2026-10-16 12:00:00",
      "booking_key": "booking-apt-88219",
      "external_id": "EXT-88219",
      "notes": "Rescheduled per patient request",
      "status": 1,
      "contact": {
        "id": 804,
        "name": "Rohan Patel",
        "phone": "+919876543210"
      },
      "source": {
        "id": 3,
        "name": "Doctor Appointment"
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 1
  }
}

5. Get Reservation

Retrieve full details for a single reservation including contact info and source configuration.

cURL - Get Reservation
curl "https://app.wacm.in/api/v1/reminders/reservations/show?id=142" \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN"

6. List Reminder Rules

Fetch active reminder sources and their message rules to determine available booking types.

cURL - List Reminder Rules
curl "https://app.wacm.in/api/v1/reminders" \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN"

Negative Variables in Message Templates

When a reminder broadcast is prepared from a reservation, WACM maps reservation dates and metadata into template negative variables. You can configure Meta WhatsApp message templates using these variables:

Parameters

ParameterTypeRequiredDescription
-1stringOptionalContact Name (from Wpbox contact record)
-2stringOptionalContact Phone Number (e.g. <code>+919876543210</code>)
-3stringOptionalContact Extra Value / Custom Field
-4stringOptionalReservation Start Date formatted as <code>YYYY-MM-DD</code> (e.g., <code>2026-10-16</code>)
-5stringOptionalReservation Start Time formatted as <code>HH:mm:ss</code> (e.g., <code>11:00:00</code>)
-6stringOptionalReservation Start Date &amp; Time formatted as <code>YYYY-MM-DD HH:mm:ss</code>
-7stringOptionalReservation End Date formatted as <code>YYYY-MM-DD</code>
-8stringOptionalReservation End Time formatted as <code>HH:mm:ss</code>
-9stringOptionalReservation End Date &amp; Time formatted as <code>YYYY-MM-DD HH:mm:ss</code>
-10stringOptionalExternal ID or Booking Reference Key (e.g., <code>EXT-88219</code>)
WhatsApp Campaign Template Sample
Hi {{1}},

This is a reminder that your appointment is scheduled for {{-4}} at {{-5}}.

Booking Ref: {{-10}}

To reschedule or cancel, please reply to this message directly.
See you soon!

Model Context Protocol (MCP) Integration

The official npm package @codingmantra/wacm-mcp provides 4 specialized read tools for LLM coding and support assistants:

MCP Tool NameUsage
list_reservationsList or filter reservations by phone, contact ID, status, or date range
get_reservationInspect details of a reservation by its ID or external reference
list_remindersList configured reminder sources, offset timing, and campaign templates
get_contact_reservationsQuickly read active and past reservations for a specific customer contact ID

For setup instructions in Claude Desktop, Cursor, VS Code, or Antigravity, see the WACM MCP Setup Guide.

Flowmaker Events

The Reminders module emits events to trigger AI Flow Builder workflows:

EVENT_REMINDER_DUE

Fired when a scheduled reminder window arrives. Used by Flowmaker trigger nodes to execute automated actions, prompt LLMs, or trigger webhooks.

EVENT_RESERVATION_CREATED

Fired immediately when a new reservation is confirmed. Use this to send instant confirmation messages, issue calendar invites, or update Google Sheets.

WhatsApp Chat Inbox Sideapp

When agents use the WACM WhatsApp Team Inbox, the built-in Reminders Sideapp renders on the right sidebar for the open conversation:

  • Displays existing upcoming and past appointments for the active contact.
  • Shows status badges (Active, Inactive, Cancelled, Completed) with appointment dates and times.
  • Provides a + New Reservation button that pre-populates the customer's details in a modal for one-click scheduling.

Related Documentation