Appointments
There is no public REST endpoint for managing appointments; how to take bookings with booking links and the booking page endpoints, read appointments with MCP tools, and react to new bookings with workflows.
There is no public REST endpoint for creating, rescheduling, cancelling or listing appointments. The appointment endpoints the web app calls are internal. Here is what you can use instead.
What you can do
| Task | Use | Reference |
|---|---|---|
| Let people book themselves | Your public booking link, or the website widget | Booking links below |
| Build your own booking flow on your server | The booking page endpoints | Booking page endpoints below |
| Read the calendar, appointment counts or leads with appointments | MCP tools | MCP tools below |
| Change a lead’s appointment status | MCP update_lead (appointment_status) | Available tools |
| Be told when an appointment is booked | A workflow with the Appointment Booked trigger and a Send webhook action. The payload carries the lead’s contact details and status, not the appointment’s date and time. | Leads |
| Book, reschedule or cancel for a lead, or look up free slots as your team | The web app | Creating appointments |
Booking links
Every appointment type has a public booking page. Copy its link from Appointments › Booking Link in the web app. See Your public booking link. The link has this shape:
https://us.zoie.ai/book/<business-slug>/<type-slug>
Add ?src=<tag> to tag where bookings came from. The tag is saved as the lead’s UTM source, and the QR code uses qr-front-desk. Bookings made on the page create or update the lead and confirm the appointment, exactly as described for the booking page endpoints below.
MCP tools
The Zoie MCP server has three read-only appointment tools. They need the appointments:read scope.
| Tool | What it returns | Main inputs |
|---|---|---|
appointment_calendar | The appointments in a calendar window. | view (month, week or day), start and end (ISO dates) |
appointment_overview | Appointment counts, such as total, confirmed, no-shows and today, plus upcoming and past appointments. | search (optional) |
list_appointment_leads | Leads that have an appointment, latest first. | search, searchType (status filters by appointment status, lead by lead status), page, limit (up to 100) |
No MCP tool books, reschedules or cancels an appointment, or looks up free slots. See Appointments tools.
Booking page endpoints
These endpoints power Zoie’s hosted booking page. They need no credentials, so a server can call them to show availability and take bookings in its own interface.
All paths are relative to https://api-us.zoie.ai.
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/auth/public/booking/{businessSlug} | The business, its first appointment type and the list of types. |
GET | /api/v1/auth/public/booking/{businessSlug}/{typeSlug} | The same, for one appointment type. |
GET | /api/v1/auth/public/booking/{businessSlug}/{typeSlug}/availability | Open slots for that type. |
POST | /api/v1/auth/public/booking/{businessSlug}/{typeSlug} | Book a slot. |
Slugs
Take both slugs from the booking link. If you need to build them:
- Business slug. The business name in lowercase, with
&turned intoandand every run of other characters turned into a hyphen.Bright Smile Dentalbecomesbright-smile-dental. The business ID on its own (42) or the slug followed by the ID (bright-smile-dental-42) also work, and are unambiguous if two businesses share a name. - Type slug. The appointment type’s name, built the same way. If two of the business’s types have the same name,
-<type id>is added. The type ID on its own also works.
Get the booking page
GET /api/v1/auth/public/booking/{businessSlug}/{typeSlug}
curl "https://api-us.zoie.ai/api/v1/auth/public/booking/bright-smile-dental/consultation"const res = await fetch(
'https://api-us.zoie.ai/api/v1/auth/public/booking/bright-smile-dental/consultation'
);
const page = await res.json();{
"success": true,
"business": {
"id": 42,
"name": "Bright Smile Dental",
"slug": "bright-smile-dental",
"timezone": "America/Chicago",
"timezone_label": "Central Time — US & Canada",
"location_label": "120 Main St, Austin, TX, 78701",
"logo_url": "https://example.com/logo.png"
},
"appointment_type": {
"id": 7,
"name": "Consultation",
"slug": "consultation",
"category": "Onsite",
"color": "#1D4ED8",
"duration_minutes": 30,
"description": "A 30-minute in-person appointment.",
"location_label": "120 Main St, Austin, TX, 78701"
},
"appointment_types": [
{ "id": 7, "name": "Consultation", "slug": "consultation" },
{ "id": 9, "name": "Virtual check-in", "slug": "virtual-check-in" }
],
"services": [
{ "id": 311, "name": "Teeth Whitening", "description": "", "price": "From $299", "currency_code": "USD" }
]
}
categoryisOnsiteorVirtual. For a virtual type,location_labelreads Video call · link sent on confirmation.serviceslists up to 100 of the business’s services.priceandcurrency_codeappear only for services whose AI Can Share Price setting is on.
Get availability
GET /api/v1/auth/public/booking/{businessSlug}/{typeSlug}/availability?days_ahead=45
| Query parameter | Default | Description |
|---|---|---|
days_ahead | 45 | How many days to search, from 1 to 60. The search starts tomorrow, in the business’s time zone. |
{
"success": true,
"days": [
{
"date": "2026-10-05",
"dayOfWeek": "Monday",
"slots": [
{ "start": "2026-10-05 09:00:00", "end": "2026-10-05 09:30:00" },
{ "start": "2026-10-05 09:30:00", "end": "2026-10-05 10:00:00" }
],
"slotAvailable": true,
"slotsCount": 14
}
],
"slot_duration": 30,
"total_slots": 212,
"business_timezone": "America/Chicago"
}
Slot times are local to the business’s time zone, with no offset. Only days with at least one open slot are listed. Slots already respect the type’s hours, the business’s hours and closed dates, existing bookings and connected calendars.
Book a slot
POST /api/v1/auth/public/booking/{businessSlug}/{typeSlug}
Content-Type: application/json
| Field | Required | Description |
|---|---|---|
date | Yes | YYYY-MM-DD. |
time | Yes | The slot’s start time, such as 09:00, 09:00:00 or 9:00 AM. Read together with date in the business’s time zone. |
full_name | Yes, unless you send first_name | Split into first and last name at the first space. |
first_name, last_name | — | Used instead of full_name when either is sent. |
email | Yes | A valid email address. |
phone_number or phone | Yes | At least 8 digits. Send E.164, for example +15551234567. |
service | No | One of the business’s service names. Defaults to Other. |
service_value | No | The lead’s service value. |
timezone | No | An IANA time zone such as America/New_York. It only changes how the confirmation shows the time, and defaults to the business’s time zone. |
source | No | A tag of up to 80 characters, saved as the lead’s UTM source. Defaults to booking_link. |
lead_token | No | The token from a personal booking link (/book-appointment/<token>). The booking then goes on that existing lead instead of creating a new one. |
curl -X POST "https://api-us.zoie.ai/api/v1/auth/public/booking/bright-smile-dental/consultation" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-10-05",
"time": "09:00",
"full_name": "Jane Smith",
"email": "[email protected]",
"phone_number": "+15551234567",
"service": "Teeth Whitening",
"source": "partner-site"
}'const res = await fetch(
'https://api-us.zoie.ai/api/v1/auth/public/booking/bright-smile-dental/consultation',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
date: '2026-10-05',
time: '09:00',
full_name: 'Jane Smith',
email: '[email protected]',
phone_number: '+15551234567',
service: 'Teeth Whitening',
source: 'partner-site',
}),
}
);
const body = await res.json();
if (res.status === 409) {
// The slot was taken. Fetch availability again and offer another time.
}200 OK:
{
"success": true,
"message": "Appointment booked successfully",
"appointment": {
"lead_id": 18342,
"date": "2026-10-05",
"time": "09:00 AM",
"weekday": "Mon",
"display_date": "Mon, Oct 5",
"display_time": "9:00 AM",
"timezone": "America/Chicago",
"timezone_label": "Central Time — US & Canada",
"slot_duration": 30,
"appointment_type_name": "Consultation",
"business_name": "Bright Smile Dental",
"first_name": "Jane",
"last_name": "Smith",
"email": "[email protected]",
"service": "Teeth Whitening"
}
}
What Zoie does with a booking:
- Checks the phone number, email and IP address against the business’s blocked list.
- Checks the slot is still free, then holds it while the booking is written, so two people can’t take the same slot.
- Creates a lead (type Booking_Link, with the usual duplicate and related-lead checks), or updates the lead from
lead_token. The lead goes to the Appointment status and the appointment is Confirmed, with the type’s length. - Runs the New Lead Added workflows (for new leads only) and the Appointment Booked workflows, and sends the booking emails.
Errors
Errors have the shape { "success": false, "message": "…" }.
| Status | message | Cause |
|---|---|---|
400 | Date and time are required | date or time is missing. |
400 | Full name is required · A valid email is required · A valid phone number is required | A contact field is missing or invalid. |
400 | Invalid date/time format: … | date and time couldn’t be read. |
401 | This booking link has expired. · Invalid booking link. | lead_token is expired or invalid. |
403 | This contact is blocked. | The contact is on the business’s blocked list. |
403 | This link is for a different clinic. | lead_token belongs to another business. |
404 | Booking page not found · Appointment type not found · Lead not found. | A slug or the token’s lead didn’t match. |
404 | This clinic has not published any appointment types yet. | Returned by GET /{businessSlug} when the business has no appointment types. |
409 | This time slot is no longer available. Please select a different time. | The slot was taken or can’t be booked. The message may be more specific, and the body also has a reason code. Fetch availability again. |
409 | This lead is no longer available for booking. | The lead_token lead’s status no longer allows booking. |
429 | Too many requests, please try again later. | See Limits. |
500 | Failed to load booking page · Failed to fetch availability · Failed to book appointment | — |
Limits
The four booking endpoints share one limit: 30 requests per 15 minutes per IP address by default. One booking made through the hosted page uses three requests (page, availability, booking). A server calling on behalf of many visitors from one IP address reaches this quickly. Responses carry RateLimit and RateLimit-Policy headers, and a 429 includes Retry-After.
Related
- Booking appointments
- Availability — the hours and appointment types the slots come from
- Website widget — the widget can also take bookings