Create an appointment by phone number
Looks up an existing contact by phone number in the workspace, or creates a new one from the provided payload, and inserts an appointment row. Calendar links (Google, Outlook, iCal) are auto-generated by a database trigger immediately after insert. The "Appointment Booked" flow trigger is fired automatically and any active sequences for the contact are stopped.
Required fields: phone_number, adate, atime. Everything else is optional.
Timezone resolution priority (used to convert adate+atime to UTC):
- Existing contact's
timezonecolumn (if the phone matches a contact that has a timezone set) - Phone area code → IANA timezone (works for all US numbers via the built-in area code map)
- Caller-provided
adate_utc(used as-is if neither of the above succeeds) - UTC (treat
adate+atimeas UTC — last resort)
The resolved booking_timezone is stored on the appointment row so the
LiveChat UI and calendar view can display times in the correct local zone.
https://api.channelautomation.com/api/appointmentsAuthorization
Request body JSON required
- productoptionalstring
Product or service the contact is interested in. Stored in
contacts.product. Only applied when creating a NEW contact; ignored if the phone matches an existing contact (the existing product value is preserved). Used by AI appointment setter templates and merge fields like{{contact.product}}. - adate_utcoptionalstring
Optional. Pre-computed UTC timestamp (ISO 8601). Only used as a fallback when the service cannot resolve a timezone for the contact (i.e. neither an existing contact timezone nor a recognized US phone area code). If omitted, the service will resolve a timezone from the contact or phone number, then compute UTC from
adate+atime.format: date-time
Returns
201
Appointment created successfully. Existing contact was reused (or a new one was created), and the "Appointment Booked" flow trigger has been dispatched.
400
Invalid request payload (missing phone number or datetime)
- reasonoptionalstring
Short error code for programmatic handling. Possible values:
missing_phonemissing_adatemissing_atimemissing_workspacemissing_workspace_contextcontact_upsert_failedcontact_upsert_exceptiondatetime_resolution_failedappointment_insert_failedappointment_insert_exceptionunhandled_exception
Additional values returned by PUT /api/appointments:
missing_identifier(neither contact_id nor phone_number provided)invalid_contact_id(contact_id is not a valid UUID)contact_not_foundcontact_lookup_failedappointment_lookup_failedappointment_update_failedfeature_disabled(APPOINTMENT_UPDATE_API flag is off for the workspace)
403
API key does not have contacts.write permission
500
Appointment creation failed (DB error, contact upsert failure, etc.)
- reasonoptionalstring
Short error code for programmatic handling. Possible values:
missing_phonemissing_adatemissing_atimemissing_workspacemissing_workspace_contextcontact_upsert_failedcontact_upsert_exceptiondatetime_resolution_failedappointment_insert_failedappointment_insert_exceptionunhandled_exception
Additional values returned by PUT /api/appointments:
missing_identifier(neither contact_id nor phone_number provided)invalid_contact_id(contact_id is not a valid UUID)contact_not_foundcontact_lookup_failedappointment_lookup_failedappointment_update_failedfeature_disabled(APPOINTMENT_UPDATE_API flag is off for the workspace)
