Developer Documentation
Integrate with PencilMe's API and WebMCP tools to build AI-powered booking experiences. Our platform exposes structured, machine-readable interfaces that any AI agent can discover and use.
Base URL: https://booking.redhillsmediafl.cloud
All API responses are JSON. No authentication is required for read-only endpoints. Booking endpoints accept standard JSON request bodies.
REST API
The PencilMe REST API provides access to businesses, services, availability, and booking management. All endpoints are publicly accessible for reading; booking creation requires customer details.
/api/businessesList all businesses registered on PencilMe. Returns an array of business objects with name, slug, description, address, phone, and category.
/api/businesses/[slug]Get detailed information about a specific business, including its services and providers. The slug is the URL-friendly identifier (e.g., capital-cuts).
/api/businesses/[slug]/servicesList all services offered by a business. Each service includes name, description, duration in minutes, and price in cents.
/api/businesses/[slug]/providersList staff members and providers at a business. Each provider includes name, title, bio, and their schedule.
/api/businesses/[slug]/availability?date=YYYY-MM-DD&serviceId=NCheck available appointment slots for a given date and service. Returns an array of time slots with start times and provider information.
/api/businesses/[slug]/bookCreate a new booking. Requires service_id, start_time (ISO 8601), and customer_name. Optionally include provider_id, customer_email, and customer_phone. Returns a confirmation code.
/api/businesses/[slug]/bookings/[id]Retrieve the status of a specific booking by its ID. Returns booking details including service, provider, time, status, and confirmation code.
/api/businesses/[slug]/bookings/[id]Update a booking. Send { "action": "cancel" } to cancel, or { "action": "reschedule", "start_time": "ISO 8601" } to reschedule to a new time.
WebMCP Tools
WebMCP is the emerging standard for AI tool use on the web. When an AI agent visits a PencilMe booking page, structured tools are automatically registered via the navigator.modelContext API.
No scraping, no brittle selectors, no custom integrations. Agents discover what actions are available and invoke them directly.
search_services
Search and list services offered by a business. Can filter by an optional text query to find specific services.
Parameters
querystring— Optional text to filter services by name or descriptioncheck_availability
Look up available appointment slots for a specific service and date. Returns real-time availability from the business's connected booking platform.
Parameters
service_idstringrequired— The ID of the service to checkdatestringrequired— Date to check in YYYY-MM-DD formatprovider_idstring— Optional specific provider to checkbook_appointment
Book an appointment at the business. Creates a confirmed booking and returns a confirmation code that can be used for cancellation or rescheduling.
Parameters
service_idstringrequired— The ID of the service to bookstart_timestringrequired— Appointment start time in ISO 8601 formatcustomer_namestringrequired— Full name of the customerprovider_idstring— Preferred provider IDcustomer_emailstring— Customer email for confirmationcustomer_phonestring— Customer phone numberget_business_info
Retrieve general information about the business including hours, location, contact details, and policies.
No parameters required.
cancel_booking
Cancel an existing booking using its confirmation code. The booking status will be updated to cancelled and the time slot will be released.
Parameters
confirmation_codestringrequired— The confirmation code received when bookingCode Example
Here's how an AI agent interacts with a PencilMe booking page using WebMCP:
// Check if WebMCP is available on this page
if (navigator.modelContext) {
// 1. Get business info
const info = await navigator.modelContext
.invokeTool("get_business_info", {});
console.log(info.name, info.hours);
// 2. Search for services
const services = await navigator.modelContext
.invokeTool("search_services", {
query: "haircut"
});
// 3. Check availability for a service
const slots = await navigator.modelContext
.invokeTool("check_availability", {
service_id: services[0].id,
date: "2026-02-20"
});
// 4. Book the appointment
const booking = await navigator.modelContext
.invokeTool("book_appointment", {
service_id: services[0].id,
provider_id: slots[0].provider_id,
start_time: slots[0].start_time,
customer_name: "Alex Chen",
customer_email: "alex@example.com"
});
// 5. Confirmation
console.log("Booked!", booking.confirmation_code);
// => "HKQW3N7R"
}Declarative fallback: PencilMe booking pages also include data-webmcp-* attributes on form elements as a declarative fallback for agents that don't support the imperative API. The booking form can be discovered and filled by any agent that understands HTML form semantics.
Ready to integrate?
Get your business on PencilMe and start receiving bookings from AI agents today. Free during beta.