Pagination
List endpoints return up to 25 items per page, newest first. Passlimit to ask for 1 to 100 items.
status, starts_after, starts_before and contact_id on GET /appointments, combine with each other and with pagination. To get the next page, send the same request, filters included, with cursor set to next_cursor. On the last page, next_cursor is null and has_more is false. Treat the cursor as an opaque string; its format can change.
GET /services, GET /staff, GET /availability and GET /webhooks return every item on one page.
Retry safely with Idempotency-Key
Network errors can leave you unsure whether a request worked. Send anIdempotency-Key header on requests that create things, and retry with the same key:
POST /contactsPOST /appointmentsPOST /knowledgePOST /webhooks
- A retry with the same body gets the first response again, with the header
Idempotent-Replayed: true. The API doesn’t create a second appointment. - The same key with a different body returns
422with the codeidempotency_key_reused. - A retry that arrives while the first request is still running waits for it, then gets its response.
- LobbyStack saves the key and the change together. If the first request failed with an error, nothing was saved, so your retry runs again.
Errors
Errors use one shape:details appears only on validation errors. Match on code; the message wording can change.
Booking through the API
The API follows the same rules as the AI receptionist:POST /appointmentsandPOST /appointments/{appointment_id}/reschedulework only when the business’sbooking_modeisinstant. Read it fromGET /business.- The requested time must fall within opening hours, avoid closures and other appointments, and be free on a connected Google Calendar. When LobbyStack can’t confirm the calendar is up to date, it treats the time as busy.
- New bookings sync to the connected calendar and queue the usual confirmation and reminder texts. LobbyStack sends them only to contacts who agreed to texts. Pass
"sms_consent": truewhen the customer agreed while booking. - To book with a specific person, pass
staff_id. Without it, LobbyStack picks a free staff member who takes the service. - Cancelling works in any booking mode. Cancelling an appointment that is already cancelled returns it unchanged.
Staff
GET /staff lists everyone who takes appointments, with active and the service_ids each person can be booked for. A service with no staff assigned in the dashboard is open to every active staff member.
A business that never set up staff still has one active staff member, named after the business. Bookings go to that person, so GET /staff returns it like any other staff member, and you can pass its id as staff_id.
Pass staff_id to:
GET /availability, to list only the times that person is free.POST /appointments, to book with that person.POST /appointments/{appointment_id}/reschedule, to move the appointment to that person. Without it, the appointment keeps its staff member.
staff_id that isn’t an active staff member of the business, or who doesn’t take the service, returns 400 with the code invalid_request. Moving an appointment to another staff member returns 409 conflict when either person has their own connected calendar; cancel it and book a new one instead.