Duvet DOCS
GitHub

Space Events

SPACE_CREATE

EVENT SPACE_CREATE

Sent to a user when they join a space or create one. Contains a full space snapshot. Built by the gateway (not relayed from the API).

See GatewaySpaceCreatePayload for the full structure, or the Space, Room, Role, Room Overwrite resources.

SPACE_DELETE

EVENT SPACE_DELETE

Sent to a user when they leave a space or are removed. Delivered only to the affected user.

FieldTypeDescription
id stringSpace ID

SPACE_UPDATE

EVENT SPACE_UPDATE

Sent when a space's settings are updated. Broadcast to all space members.

Payload is a full Space object.

{
  "type": "SPACE_UPDATE",
  "data": {
    "id": "019cf96a-4a1b-72c5-830f-75e85355d100",
    "name": "Renamed Space",
    "description": "Updated description",
    "owner_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
    "banner": null,
    "locale": null,
    "icon": "9bd6da82-c850-424b-89a0-9e4733263a45",
    "created_at": "2025-06-01T12:00:00Z",
    "updated_at": "2025-06-15T08:30:00Z"
  }
}

SPACE_MEMBER_ADD

EVENT SPACE_MEMBER_ADD

Sent when a user joins a space. Broadcast to all space members.

FieldTypeDescription
space_id stringSpace ID
user_id stringNew member's user ID
member_id stringMember record ID
status_id integerOnline status (0=offline, 1=online)
user ?UserFull user object of the new member

SPACE_MEMBER_REMOVE

EVENT SPACE_MEMBER_REMOVE

Sent when a user leaves or is removed from a space. Broadcast to all space members. Also sent for each space a bot was in when its application or its bot is deleted.

FieldTypeDescription
space_id stringSpace ID
user_id stringRemoved user ID
member_id stringMember record ID

MEMBER_ROLE_ADD

EVENT MEMBER_ROLE_ADD

Sent when a role is assigned to a member. Broadcast to all space members.

FieldTypeDescription
member_id stringMember record ID
role_id stringAssigned role ID
space_id stringSpace ID

MEMBER_ROLE_REMOVE

EVENT MEMBER_ROLE_REMOVE

Sent when a role is removed from a member. Broadcast to all space members.

FieldTypeDescription
member_id stringMember record ID
role_id stringRemoved role ID

SPACE_EMOJI_CREATE

EVENT SPACE_EMOJI_CREATE

Sent when a custom emoji is added. Broadcast to all space members.

Payload is a full SpaceEmoji object.

SPACE_EMOJI_UPDATE

EVENT SPACE_EMOJI_UPDATE

Sent when a custom emoji is renamed. Broadcast to all space members.

Payload is a full SpaceEmoji object.

SPACE_EMOJI_DELETE

EVENT SPACE_EMOJI_DELETE

Sent when a custom emoji is deleted. Broadcast to all space members.

Payload is a full SpaceEmoji object (the emoji before deletion).


SPACE_STICKER_CREATE

EVENT SPACE_STICKER_CREATE

Sent when a custom sticker is added. Broadcast to all space members.

Payload is a full SpaceSticker object.

SPACE_STICKER_UPDATE

EVENT SPACE_STICKER_UPDATE

Sent when a custom sticker is renamed. Broadcast to all space members.

Payload is a full SpaceSticker object.

SPACE_STICKER_DELETE

EVENT SPACE_STICKER_DELETE

Sent when a custom sticker is deleted. Broadcast to all space members.

Payload is a full SpaceSticker object (the sticker before deletion).