Prompt
How do I cancel or reschedule appointments through an API?
Latest observation
Oct 15, 2026
OpenAI APIWeb search: off
To cancel or reschedule appointments through an API, you usually have one of these patterns:
1) Cancel an appointment
Most APIs provide either:
- a DELETE request to the appointment resource, or
- a cancel action endpoint.
Examples
DELETE /appointments/{appointment_id}
or
POST /appointments/{appointment_id}/cancel
Typical request body for a cancel action:
{
"reason": "Customer requested cancellation"
}
2) Reschedule an appointment
Rescheduling is often done by:
- updating the appointment’s time/date fields with
PATCHorPUT, or - calling a dedicated reschedule endpoint.
Examples
PATCH /appointments/{appointment_id}
{
"start_time": "2026-10-20T14:00:00Z",
"end_time": "2026-10-20T14:30:00Z"
}
or
POST /appointments/{appointment_id}/reschedule
{
"new_start_time": "2026-10-20T14:00:00Z",
"new_end_time": "2026-10-20T14:30:00Z"
}
3) Things to check in the API docs
Look for:
- required authentication
- whether the appointment must be in a specific status before canceling/rescheduling
- whether the API uses timezone-aware timestamps
- whether cancellation/rescheduling is allowed within a cutoff window
- whether there are side effects like notifications or refunds
4) Common response codes
200 OK/204 No Content— success400 Bad Request— invalid time or parameters401 Unauthorized— missing/invalid auth403 Forbidden— not allowed404 Not Found— appointment doesn’t exist409 Conflict— appointment can’t be changed due to state conflict
5) Example in JavaScript
// Cancel
await fetch(`/appointments/${id}/cancel`, {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ reason: "Need to reschedule" })
});
// Reschedule
await fetch(`/appointments/${id}`, {
method: "PATCH",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
start_time: "2026-10-20T14:00:00Z",
end_time: "2026-10-20T14:30:00Z"
})
});
If you want, I can show you the exact request format for a specific API (for example REST, GraphQL, or a scheduling platform like Calendly, Acuity, or Google Calendar).