Updating Appointments

Reschedule an appointment, assign a doctor, add notes or change its status with PATCH /v1/appointments/{appointment_id}.

Showing instructions for Xebit VoiceCloud.Showing instructions for Xebit VoiceKit, on your own infrastructure. Switch with the selector at the top. Updated 22 October 2026.

Change an existing appointment with PATCH /v1/appointments/{appointment_id}: move it to a new time, assign a doctor, add notes or set a new status.

Before you begin

Your key needs the appointments:write scope.

Create it in the Xebit VoiceCloud dashboard under Integrations → API Keys.

Create it in the Xebit VoiceKit admin console under Integrations → API Keys.

Update an appointment

PATCH/v1/appointments/{appointment_id}

Requires appointments:write. Send only what you are changing; at least one field is required.

curl -s -X PATCH "https://api.voice.xebit.ai/v1/appointments/appt_a1b2c3d4e5" \
  -H "x-api-key: $XEBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assigned_doctor": "Dr. Priya Sharma",
    "notes": "Patient requested morning slot"
  }'
curl -s -X PATCH "https://<your-xebit-voicekit-host>/v1/appointments/appt_a1b2c3d4e5" \
  -H "x-api-key: $XEBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assigned_doctor": "Dr. Priya Sharma",
    "notes": "Patient requested morning slot"
  }'

Response, 200 OK:

JSON
{
  "success": true,
  "data": {
    "appointment_id": "appt_a1b2c3d4e5",
    "appointment_type": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "branch_id": "branch_uuid_here",
    "date": "2026-06-15",
    "session": "Morning",
    "batch": "MA",
    "token": null,
    "patient_name": "Aadhi",
    "parent_phone": "+919840XXXXXX",
    "assigned_doctor": "Dr. Priya Sharma",
    "status": "confirmed",
    "external_reference_id": null,
    "created_at": "2026-05-26T10:00:00.000Z",
    "updated_at": "2026-05-26T11:00:00.000Z"
  }
}

Updatable fields

NameTypeRequiredDescription
appointment_datestringNoNew ISO 8601 UTC date and time. Checked against availability, capacity and duplicate rules.
statusstringNoconfirmed, completed or cancelled.
assigned_doctorstringNoName or identifier of the assigned doctor.
notesstringNoFree text notes on the appointment.
sessionstringNo"Morning", "Afternoon" or "Evening".
batchstringNoBatch label, for example "MA".

Rescheduling

Passing appointment_date re-runs the same availability and capacity checks as creation, against the new time. If the new time fails, the request is rejected with OUTSIDE_AVAILABILITY, SLOT_FULL or DUPLICATE_BOOKING. Unless the same request also sets status, the appointment's status becomes "rescheduled" automatically.

Status transitions

Set status: "completed" when the visit has happened and status: "cancelled" to cancel. Cancelling Appointments covers the cancellation rules.

Error codes

StatusCodeCause
400VALIDATION_ERRORNo valid fields were sent, or appointment_date is malformed.
404NOT_FOUNDAppointment not found.
409SLOT_FULLThe new time has no capacity left.
409SLOT_INACTIVEThe new time's window is closed.
409DUPLICATE_BOOKINGAn active booking already exists for this patient, type and new date.
422OUTSIDE_AVAILABILITYThe new time is not inside any configured window.
422TOO_FAR_IN_ADVANCEAppointments can be rescheduled at most 7 days ahead.
403INSUFFICIENT_SCOPEThe key lacks the required scope.