Update a room
Partial update of a room. Supports basic fields (name, code, personCapacity, addressNotes, locationId, isOnline, onlineLink), immediate status, and relation sync via amenityIds, courseIds, and moduleIds — each array replaces the full linked set when provided. Discover amenities via GET /amenities. Pass scheduledStatusChange to create a future or temporary availability window in the same request (returns 409 on overlap). When provided, personCapacity must be at least 1 unless isOnline is true. Scoped to your integration’s institution via Basic Auth credentials.
PATCH
/rooms/{id}Path parameters
idstringrequiredRequest body
requiredapplication/jsonnamestringDisplay name for the room, shown in the dashboard and when scheduling appointments (e.g. `Lecture Hall A`, `Seminar Room 3`).
max length 100
personCapacityintegerMaximum number of people the room holds. Required on create. Must be at least `1` for physical rooms (`isOnline: false` or omitted). Use `0` only when `isOnline` is `true`.
min 0 · max 1000
codestringOptional short identifier for the room. When omitted or empty, a unique code is auto-generated from `name`.
max length 50
addressNotesstringOptional free-text notes for finding or accessing the room (e.g. directions, door codes, wheelchair access).
max length 1000
amenityIdsstring[]Optional IDs of equipment/amenities to link to the room (e.g. `Projector`, `Whiteboard`). Discover available amenities via GET /amenities. Amenities must belong to your institution.
locationIdstring | nullOptional ID of a location (campus/building) this room belongs to. Pass `null` to leave the room unassigned.
statusstringRoom availability status in the dashboard. Defaults to `ACTIVE` on create; use `MAINTENANCE` or `INACTIVE` to hide or restrict booking. For `scheduledStatusChange`, this is the status applied during the scheduled window.
Allowed:
ACTIVEMAINTENANCEINACTIVEisOnlinebooleanWhether this is a virtual/online room rather than a physical space. When `true`, `personCapacity` may be `0` and `onlineLink` can hold the meeting URL.
onlineLinkstring | nullMeeting or video link for online rooms (e.g. Zoom or Teams URL). Only relevant when `isOnline` is `true`.
max length 2000
courseIdsstring[]Optional course IDs to link to the room. On update, replaces the full set of linked courses — omit courses you want to keep by including every desired ID. Courses must belong to your institution.
moduleIdsstring[]Optional course module IDs to link to the room (`CourseModule.id`). Version IDs (`CourseModuleVersion.id`) are also accepted and resolved to the parent module. On update, replaces the full linked set. Modules must belong to your institution.
scheduledStatusChangeobjectOptional scheduled availability change to create in the same request. Use for future or temporary status windows (e.g. maintenance from Monday–Friday). Omit `endDate` or pass `null` for an indefinite change. Returns `409` when the window overlaps an existing schedule.
Show propertiesHide properties
statusstringrequiredRoom availability status in the dashboard. Defaults to `ACTIVE` on create; use `MAINTENANCE` or `INACTIVE` to hide or restrict booking. For `scheduledStatusChange`, this is the status applied during the scheduled window.
Allowed:
ACTIVEMAINTENANCEINACTIVEstartDatestring<date-time>requiredWhen the scheduled status takes effect. Compared at minute precision in the dashboard.
endDatestring<date-time> | nullWhen the scheduled status ends and the room reverts to its base status. Omit or `null` for no end date (indefinite). Must be after `startDate`.
reasonstringOptional note explaining the change (e.g. `Annual HVAC maintenance`).
max length 1000
Responses
200Updated room
dataRoomDetailrequiredFull room returned by GET /rooms/{id}, POST /rooms, and PATCH /rooms/{id}. Includes location, equipmentAndAmenities, courses, modules, and scheduledChanges (sorted by most recent startDate first).
Show propertiesHide properties
idstringrequirednamestringrequiredinstitutionIdstringrequiredpersonCapacityintegerrequiredaddressNotesstringrequiredAdditional address notes. Empty string when not set.
codestring | nulllocationIdstring | nullstatusstringrequiredAllowed:
ACTIVEMAINTENANCEINACTIVEisOnlinebooleanrequiredonlineLinkstring | nulllocationLocationSummary | anyShow propertiesHide properties
One of:
LocationSummary
idstringrequirednamestringrequiredDisplay name for the location — the label shown in the dashboard when managing rooms and assigning them to a site (e.g. `Main Campus`, `North Building`, `Sleeping Pod Area`).
max length 100
addressstringrequiredPhysical street or postal address of the location. Used in the dashboard for map display and geocoding — provide a real-world address, not the location name repeated (e.g. `123 University Ave, 10115 Berlin`).
max length 500
institutionIdstringrequiredany
anyequipmentAndAmenitiesAmenity[]requiredStructured equipment and amenities linked to the room.
Show propertiesHide properties
Array of
AmenityidstringrequiredinstitutionIdstringrequirednamestringrequiredcreatedAtstring<date-time>requiredupdatedAtstring<date-time>requiredcolorstring | nulliconstring | nullcoursesobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredroomIdstringrequiredcourseIdstringrequiredcourseobjectrequiredShow propertiesHide properties
idstringrequirednamestringrequiredcodestring | nullcolorinteger | nulliconstring | nulliconTypestring | nulllayer_idstringrequiredmodulesobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredroomIdstringrequiredmoduleIdstringrequiredmoduleobjectrequiredShow propertiesHide properties
idstringrequirednamestringrequiredcodestring | nullscheduledChangesRoomScheduledChange[]requiredAll scheduled status windows for this room (past, active, and future), sorted by most recent startDate first.
Show propertiesHide properties
Array of
RoomScheduledChangeidstringrequiredroomIdstringrequiredstatusstringrequiredAllowed:
ACTIVEMAINTENANCEINACTIVEstartDatestring<date-time>requiredendDatestring<date-time> | nullreasonstring | nullcreatedAtstring<date-time>requiredcreatedByobject | anyrequiredShow propertiesHide properties
One of:
object
idstringrequirednamestringrequiredany
anymetaResponseMetarequiredShow propertiesHide properties
requestIdstringrequiredtimestampstring<date-time>requiredversionstringrequiredAllowed:
v4400Bad Request
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring401Unauthorized
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring404Not Found
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring409Conflict
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring422Unprocessable Entity — validation or business rule error
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring429Too Many Requests
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestring500Internal Server Error
typestringrequiredAllowed:
errorcodestringrequiredAllowed:
bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_errortitlestringrequiredstatusintegerrequireddetailstringrequiredinstancestringerrorsobject[]Show propertiesHide properties
Array of
objectfieldstringmessagestringRequest
curl -X PATCH "https://fuxam.app/api/v4/rooms/string" \
-H "Content-Type: application/json" \
-d '{
"name": "Lecture Hall A",
"personCapacity": 120,
"code": "LHA",
"addressNotes": "",
"amenityIds": [
"string"
],
"locationId": "loc_001",
"status": "ACTIVE",
"isOnline": false,
"onlineLink": null,
"courseIds": [
"string"
],
"moduleIds": [
"string"
],
"scheduledStatusChange": {
"status": "ACTIVE",
"startDate": "2026-07-01T00:00:00.000Z",
"endDate": "2026-07-05T23:59:00.000Z",
"reason": "Annual HVAC maintenance"
}
}'const response = await fetch("https://fuxam.app/api/v4/rooms/string", {
method: "PATCH",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Lecture Hall A",
"personCapacity": 120,
"code": "LHA",
"addressNotes": "",
"amenityIds": [
"string"
],
"locationId": "loc_001",
"status": "ACTIVE",
"isOnline": false,
"onlineLink": null,
"courseIds": [
"string"
],
"moduleIds": [
"string"
],
"scheduledStatusChange": {
"status": "ACTIVE",
"startDate": "2026-07-01T00:00:00.000Z",
"endDate": "2026-07-05T23:59:00.000Z",
"reason": "Annual HVAC maintenance"
}
})
});import requests
response = requests.patch(
"https://fuxam.app/api/v4/rooms/string",
headers={
"Content-Type": "application/json"
},
json={
"name": "Lecture Hall A",
"personCapacity": 120,
"code": "LHA",
"addressNotes": "",
"amenityIds": [
"string"
],
"locationId": "loc_001",
"status": "ACTIVE",
"isOnline": False,
"onlineLink": None,
"courseIds": [
"string"
],
"moduleIds": [
"string"
],
"scheduledStatusChange": {
"status": "ACTIVE",
"startDate": "2026-07-01T00:00:00.000Z",
"endDate": "2026-07-05T23:59:00.000Z",
"reason": "Annual HVAC maintenance"
}
},
)Response
{
"data": {
"id": "room_001",
"name": "Lecture Hall A",
"institutionId": "inst_123",
"personCapacity": 120,
"addressNotes": "",
"code": "LHA",
"locationId": "loc_001",
"status": "ACTIVE",
"isOnline": false,
"onlineLink": null,
"equipmentAndAmenities": [
{
"id": "amen_001",
"institutionId": "inst_123",
"name": "Projector",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-06-01T00:00:00.000Z",
"color": "#0361fc",
"icon": "projector"
}
],
"location": {
"id": "loc_001",
"name": "Main Campus",
"address": "123 University Ave",
"institutionId": "inst_123"
},
"courses": [
{
"id": "rc_001",
"roomId": "room_001",
"courseId": "course_001",
"course": {
"id": "course_001",
"name": "Introduction to CS",
"code": "CS101",
"color": 5,
"icon": "/illustrations/course-icon-library/book-worm.webp",
"iconType": "image",
"layer_id": "layer_001"
}
}
],
"modules": [
{
"id": "rm_001",
"roomId": "room_001",
"moduleId": "cm_xyz789",
"module": {
"id": "cm_xyz789",
"name": "Economics",
"code": "ECO-101"
}
}
],
"scheduledChanges": [
{
"id": "rss_001",
"roomId": "room_001",
"status": "MAINTENANCE",
"startDate": "2026-07-01T00:00:00.000Z",
"endDate": "2026-07-05T23:59:00.000Z",
"reason": "Annual HVAC maintenance",
"createdAt": "2026-06-15T10:00:00.000Z",
"createdBy": {
"id": "user_001",
"name": "Jane Doe"
}
}
]
},
"meta": {
"requestId": "req_1234567890_abc",
"timestamp": "2026-06-02T07:00:00.000Z",
"version": "v4"
}
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}{
"type": "error",
"code": "resource_not_found",
"title": "Not Found",
"status": 404,
"detail": "Course not found",
"instance": "req_1234567890_abc",
"errors": [
{
"field": "string",
"message": "string"
}
]
}