Room & Role Events
ROOM_CREATE
ROOM_CREATESent when a new room is created in a space. Broadcast to all space members.
Payload is a full Room object.
{
"type": "ROOM_CREATE",
"data": {
"id": "019cf96a-be82-72c5-830f-75e85355d800",
"space_id": "019cf96a-4a1b-72c5-830f-75e85355d100",
"parent_id": null,
"type": 1,
"name": "general",
"description": null,
"position": 0,
"nsfw": false,
"created_at": "2025-06-01T12:00:00Z",
"updated_at": "2025-06-01T12:00:00Z"
}
}ROOM_UPDATE
ROOM_UPDATESent when a room is updated (name, description, position, parent). Broadcast to all space members.
Payload is a full Room object.
ROOM_DELETE
ROOM_DELETESent when a room is deleted. Broadcast to all space members.
| Field | Type | Description |
|---|---|---|
id | string | Deleted room ID |
space_id | string | Space the room belonged to |
{
"type": "ROOM_DELETE",
"data": {
"id": "019cf96a-be82-72c5-830f-75e85355d800",
"space_id": "019cf96a-4a1b-72c5-830f-75e85355d100"
}
}ROOM_REORDER
ROOM_REORDERSent after a room position change to sync all room positions. Broadcast to all space members.
| Field | Type | Description |
|---|---|---|
rooms | Room[] | All rooms in the space with updated positions |
ROOM_OVERWRITE_UPDATE
ROOM_OVERWRITE_UPDATESent when a permission overwrite is created or updated. Broadcast to all space members.
Payload is a full Room Overwrite object.
{
"type": "ROOM_OVERWRITE_UPDATE",
"data": {
"id": "019cf96a-cf93-72c5-830f-75e85355d900",
"room_id": "019cf96a-be82-72c5-830f-75e85355d800",
"target_id": "019cf96a-6f3d-72c5-830f-75e85355d300",
"target_type": 0,
"allow_flags": 1024,
"deny_flags": 0,
"created_at": "2025-06-01T12:00:00Z",
"updated_at": "2025-06-01T12:00:00Z"
}
}ROOM_OVERWRITE_DELETE
ROOM_OVERWRITE_DELETESent when a permission overwrite is removed. Broadcast to all space members.
| Field | Type | Description |
|---|---|---|
room_id | string | Room ID |
target_id | string | Target role or member ID that was removed |
ROLE_CREATE
ROLE_CREATESent when a new role is created. Broadcast to all space members.
Payload is a full Role object.
{
"type": "ROLE_CREATE",
"data": {
"id": "019cf96a-6f3d-72c5-830f-75e85355d300",
"space_id": "019cf96a-4a1b-72c5-830f-75e85355d100",
"name": "Moderator",
"color_from": 5793266,
"color_via": null,
"color_to": null,
"flags": 0,
"permissions": 14,
"hoisted": true,
"position": 1,
"created_at": "2025-06-01T12:00:00Z",
"updated_at": "2025-06-01T12:00:00Z"
}
}ROLE_UPDATE
ROLE_UPDATESent when a role is updated (name, permissions, color, position). Broadcast to all space members.
Payload is a full Role object.
ROLE_DELETE
ROLE_DELETESent when a role is deleted. Broadcast to all space members.
| Field | Type | Description |
|---|---|---|
id | string | Deleted role ID |
space_id | string | Space the role belonged to |