Skip to main content
DELETE
Delete session by id

Delete Session

Delete a single session (appointment) by its public id. The session must belong to the organization that owns the API key.

Headers

Deletion rules

A session can only be deleted when it is not frozen — that is, when it has no recorded clinical work:
  • Encounters — if the session has any non-archived encounter, deletion is blocked.
  • Notes (activities) — if the session has any non-archived activity, deletion is blocked.
  • Completed cancellations — if the session has a completed cancellation, deletion is blocked. Cancellations still mid-workflow (pending, searching, etc.) do not block it.
When deletion is allowed, the session’s dependent records (overrides, cancellations and history) are removed together with the session in a single transaction.

Success Response (200)

Error Responses

400 - Bad Request

Returned when the session is frozen and cannot be deleted because it has recorded clinical work.
For a session with notes the message is Cannot modify or delete a session that has notes., and for a completed cancellation it is Cannot modify or delete a session that has a completed cancellation. An invalid sessionId (for example one containing a null byte) is instead returned as a validation list, where each path is an array of segments:

401 - Unauthorized

403 - Forbidden

404 - Not Found

Returned when no session with the given id exists in the organization.

Examples

cURL

JavaScript

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as 'Bearer '

Path Parameters

sessionId
string
required

Session public identifier

Minimum string length: 1

Response

Session deleted successfully

message
string
Example:

"Session deleted successfully"