Skip to content
OAOpenAppPhysical Security as a Service
Login

Apartment Residents

Apartment Residents routes manage building users for a virtual access integration: principals that hold an org role like virtual_access:integration:{id}:*. All three operations require X-Org and bearer_auth; path id is the integration ULID (see Integrations and Organization context & pagination).

OpenAPI groups these under /integrations/{id}/building-users (and .../{user_id} for removal). AddBuildingUserPayload requires user_id and role strings — paste the role your deployment expects (often scoped to that integration); see schemas in the API reference.

ConcernHTTPoperationIdNotes
List usersGET .../building-userslist_building_usersPath id = integration.200 body is an array per bundle (no named response schema in the public YAML).
Add userPOST .../building-usersadd_building_userAddBuildingUserPayload. 201 created.
Remove userDELETE .../building-users/{user_id}delete_building_user204 empty body on success.
CapabilityPythonRust (openapp_sdk)GoTypeScript (AsyncClient)
Listclient.apartment_residents.list(id)list[dict]Thin apartment_residents().list omits X-Org — use transport() + RequestSpec (see examples) when the gateway requires the headerApartmentResidentsAPI.ListBuildingUsers + .XOrg(...)Not on façade yet
Addapartment_residents.add(id, user_id=…, role=…)Same: prefer transport() + RequestSpec below for strict header parityAddBuildingUser + payload + .XOrg(...)Not on façade yet
Removeapartment_residents.remove(id, user_id)SameDeleteBuildingUser + .XOrg(...)Not on façade yet

The Go generator returns raw *http.Response for these operations (no typed decode in the client) — decode JSON yourself from Body on success.

401 / 403 for auth and org policy; 404 when the integration (or user, for delete) is missing; 400 for invalid payloads. Error bodies where returned follow ApiErrorResponse — see Errors & retries.

Constants below stand in for real ULIDs from your org.

rows = await client.apartment_residents.list(integration_id)

OpenAPI requires X-Org on list_building_users. If your bridge does not inject it from the default org, use interceptors or mirror the transport + RequestSpec pattern from the Rust tab with your HTTP client.

created = await client.apartment_residents.add(
integration_id,
user_id=user_ulid,
role=role_string,
)
await client.apartment_residents.remove(integration_id, user_ulid)

Same X-Org requirement as for GET — ensure the wire request carries the header for POST / DELETE.