POST
/
api
/
v1
/
calendar
/
events
/
{event_id}
/
cancel
{
  "id": 123,
  "uuid": "<string>",
  "status": "<string>",
  "message": "<string>",
  "error": "<string>"
}

Cancel an existing calendar event. This endpoint sets the event status to cancelled.

Path Parameters

event_id
string
required

ID or UUID of the event to cancel.

Request Body

reason
string

Reason for cancellation.

Response

id
integer

Event ID.

uuid
string

Event UUID.

status
string

Event status (cancelled).

message
string

Success message.

Example Request

curl -X POST 'https://api.klen.ai/api/v1/calendar/events/456/cancel' \
  -H 'Authorization: Bearer klen_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "Client requested to reschedule"
  }'

Example Response

{
  "id": 456,
  "uuid": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
  "status": "cancelled",
  "message": "Event cancelled successfully"
}

Error Responses

error
string

Error code.

message
string

Error message.

Not Found (404)

{
  "error": "not_found",
  "message": "Event not found or you do not have access"
}

Unauthorized (401)

{
  "error": "authentication_required",
  "message": "API key is required"
}

Permission Denied (403)

{
  "error": "permission_denied",
  "message": "This API key does not have can_write_calendar permission"
}

Server Error (500)

{
  "error": "server_error",
  "message": "An unexpected server error occurred"
}

Notes

  • Cancelling an event will also sync the cancellation with connected external calendars.
  • Notifications will be sent to the customer if the event has customer contact information and send_notifications was enabled when the event was created.
  • The cancellation reason will be added to the event’s customer notes.