Skip to main content
POST
/
v1
/
scheduling
/
appointments
/
{id}
/
cancel
Suspender (cancelar) una cita
curl --request POST \
  --url https://api.keebai.com/v1/scheduling/appointments/{id}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
Marks the appointment as cancelled. Persists cancelled_at: <now> and cancellation_reason if provided. Freeing the calendar slot is automatic: from this point on the time slot shows up as available again.

Endpoint

POST https://api.keebai.com/v1/scheduling/appointments/:id/cancel

Required scope

scheduling:appointments:cancel

Path params

ParamTypeDescription
idstringAppointment id.

Headers

HeaderRequiredValue
AuthorizationYesBearer kbai_pk_<token>
Content-TypeYes (if sending a body)application/json

Body

FieldTypeRequiredDescription
reasonstringNoCancellation reason (max 500 characters). Persisted in cancellation_reason.

Example request

curl -X POST https://api.keebai.com/v1/scheduling/appointments/9d5b1f4e-7c2a-4a4d-9d3e-9f1b1f8c7a3a/cancel \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Cliente no puede asistir" }'

Response

200 OK

Returns the appointment with status: "cancelled", cancelled_at, and cancellation_reason populated.

404 Not Found

The appointment doesn’t exist or belongs to another company.

409 Conflict

{
  "error": {
    "code": "INVALID_APPOINTMENT_STATE",
    "message": "La cita ya está cancelada"
  }
}
Other states (such as completed) also return 409 if they don’t allow cancellation.

401 Unauthorized · 403 Forbidden

Same semantics as the rest of the public API.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

Body

application/json
reason
string

Motivo de cancelación

Response

200

Cita cancelada