Book, Cancel & Reschedule

API reference for booking, cancelling, and rescheduling appointments via FlowCaptain.

Book, Cancel & Reschedule

Three endpoints for managing the full appointment lifecycle.


Book Appointment

Create a new appointment on the connected Google Calendar.

POST /api/v1/book-appointment

Request Body:

{
  "query": "Monday March 3rd at 10am",
  "callerName": "Max Mustermann",
  "callerPhone": "+491761234567",
  "callerIdNumber": "+491761234567",
  "description": "Initial consultation"
}
FieldTypeRequiredDescription
querystringYesNatural language date/time for the appointment
callerNamestringYesName of the person booking
callerPhonestringNoPhone number (used for notifications)
callerIdNumberstringNoCaller ID from telephony (used for lookup)
descriptionstringNoAppointment description

Success Response:

{
  "message": "Your appointment on Monday, March 3rd at 10:00 has been booked.",
  "status": "booked",
  "appointment": {
    "date": "2026-03-03",
    "time": "10:00",
    "day": "Monday",
    "callerName": "Max Mustermann"
  }
}

Cancel Appointment

Cancel an existing appointment. The event is marked as cancelled in Google Calendar but not deleted.

POST /api/v1/cancel-appointment

Request Body:

{
  "query": "my appointment on Monday",
  "callerName": "Max Mustermann",
  "callerIdNumber": "+491761234567"
}
FieldTypeRequiredDescription
querystringYesNatural language description of which appointment to cancel
callerNamestringNoHelps identify the appointment
callerIdNumberstringNoCaller ID for lookup (most reliable)

Lookup Order: The API finds the appointment using this cascade: callerIdNumber, then callerPhone, then callerName, then date. If one method misses (e.g. different phone), the next is tried silently.

Success Response:

{
  "message": "Your appointment on Monday, March 3rd at 10:00 has been cancelled.",
  "status": "cancelled"
}

Reschedule Appointment

Move an existing appointment to a new time. The API checks availability at the new time before rescheduling.

POST /api/v1/reschedule-appointment

Request Body:

{
  "query": "move my Monday appointment to Tuesday at 2pm",
  "callerName": "Max Mustermann",
  "callerIdNumber": "+491761234567"
}
FieldTypeRequiredDescription
querystringYesNatural language request including new desired time
callerNamestringNoHelps identify the appointment
callerIdNumberstringNoCaller ID for lookup

Success Response:

{
  "message": "Your appointment has been moved to Tuesday, March 4th at 14:00.",
  "status": "rescheduled",
  "appointment": {
    "date": "2026-03-04",
    "time": "14:00",
    "day": "Tuesday"
  }
}

Common Error Responses

Appointment not found:

{
  "message": "No appointment found matching your request.",
  "status": "not_found"
}

New time not available (reschedule):

{
  "message": "Tuesday at 2pm is not available. Alternatives: Tuesday at 3pm, Wednesday at 10am.",
  "status": "unavailable"
}