Resource availability — deleteAvailability mutation
Integrations can remove a persisted clinician availability or unavailability block through the public API.
Affected mutation: deleteAvailability
Availability: Practices using the New Semble Appointment System only. The mutation is not available on the legacy appointment system.
Summary
deleteAvailability removes an existing ResourceAvailability row identified by id. The rule is deleted in Semble and no longer affects scheduling or slot queries.
The mutation applies to the entire persisted rule — ad-hoc or recurring, availability or unavailability. It does not remove a single occurrence from a recurring series. To stop a recurring rule from a given date, set endDate with updateAvailability instead. To skip individual days while keeping the series, add exclusions with updateAvailability — see Create ad hoc availability for a single day.
The response is the deleted ResourceAvailability under data (a snapshot of the rule as it was before removal).
Input
| Argument | Required | Notes |
|---|---|---|
id | yes | Resource availability ID |
Example
mutation DeleteAvailability($id: ID!) {
deleteAvailability(id: $id) {
data {
id
comment
unavailability
startDate
endDate
startTime
endTime
user {
id
}
room {
id
}
}
}
}
Variables:
{
"id": "RULE_ID"
}
Use the id returned from createAvailability or read with availabilityRule.
Validation errors
| Situation | Message (summary) |
|---|---|
Missing id | Variable "$id" of required type "ID!" was not provided |
Invalid id format | ID must be a valid ID |
| Unknown rule | Resource availability with id "…" not found. |
| Already deleted | Resource availability with id "…" not found. |
Rules are scoped to the authenticated practice. A second delete for the same id returns not found.
Permissions
The mutation requires the settingsAvailabilities permission (same as createAvailability, updateAvailability, and availabilityRule).
Integration guidance
- Full rule removal only: Use this mutation when the entire availability or unavailability block should be removed. Partial changes to recurring rules belong on
updateAvailability. - End a series instead of deleting: To keep past occurrences but stop a recurring rule from a date forward, prefer
updateAvailabilitywith a newendDate— see Update a recurring availability pattern. - Confirm before delete:
availabilityRulecan re-read the rule byidbefore callingdeleteAvailability. - Idempotency: Treat a not-found response after delete as success if your integration may retry; the rule is already gone.
See also
- API reference:
deleteAvailability - API reference:
ResourceAvailability - Release notes:
createAvailability - Release notes:
updateAvailability - Release notes:
availabilityRule - How-to: Get started with the New Semble Appointment System