Guild Spaces

Guild spaces contain a configurable header and widgets for a guild.

Guild Space Object

A guild space contains the content displayed on a guild's space page.

Guild Space Structure
FieldTypeDescription
headerguild space header objectThe header displayed above the widgets
widgetsarray[guild space widget object]The widgets in the guild space
Guild Space Header Structure
FieldTypeDescription
custom_banner_hash?stringThe guild space's custom banner hash

Guild Space Widget Object

A guild space widget is a positioned content block in a guild space.

Guild Space Widget Structure
FieldTypeDescription
idsnowflakeThe ID of the widget
typestringThe type of widget
positionguild space widget position objectThe position of the widget
configguild space widget config objectThe widget configuration
requires_hydrationbooleanWhether the widget's data must be fetched separately
default_titlestringThe default display title of the widget
Guild Space Widget Position Structure
FieldTypeDescription
columnintegerThe column containing the widget
orderintegerThe zero-based order of the widget in its column
Guild Space Widget Config Structure
FieldTypeDescription
typestringThe type of widget
title? 1?stringThe title of the image and text widget (max 100 characters)
text? 1?stringThe text of the image and text widget (max 500 characters)
image_hash? 1?stringThe image hash of the image and text widget
heading? 2stringThe heading displayed above leaderboard entries

1 Used when type is IMAGE_TEXT.

2 Used when type is LEADERBOARD.

Guild Space Widget Type
ValueNameDescription
leaderboardLEADERBOARDA leaderboard
whiteboardWHITEBOARDA whiteboard
popular_musicPOPULAR_MUSICPopular music in the guild
image_textIMAGE_TEXTAn image with a title and text
live_activityLIVE_ACTIVITYLive guild activity
Guild Space Widget Column
ValueNameDescription
0LEFTThe left column
1RIGHTThe right column

Guild Space Hydration Object

A hydrated widget contains dynamic data for a guild space widget.

Guild Space Hydration Structure
FieldTypeDescription
idsnowflakeThe ID of the hydrated widget
dataobjectThe dynamic data for the widget
Leaderboard Hydration Data Structure
FieldTypeDescription
typestringThe widget type (leaderboard)
entriesarray[leaderboard entry object]The leaderboard entries
Leaderboard Entry Structure
FieldTypeDescription
idsnowflakeThe ID of the leaderboard entry
namestringThe display name of the entry
scorefloatThe score of the entry

Guild Space Catalog Widget Object

A catalog widget describes a widget that can be added to a guild space.

Guild Space Catalog Widget Structure
FieldTypeDescription
typestringThe type of widget
namestringThe display name of the widget
max_instancesintegerThe maximum number of this widget type in a space
boost_price?integerThe guild boost price of the widget
assetsguild space catalog widget assets objectThe catalog artwork for the widget
Guild Space Catalog Widget Assets Structure
FieldTypeDescription
catalog_image_static_url?stringThe URL of the static catalog image
catalog_image_animated_url?stringThe URL of the animated catalog image
Guild Space Publish Status
ValueNameDescription
0DRAFTThe guild space is not published
1PUBLISHEDThe guild space is published
Example Guild Space
{
"header": { "custom_banner_hash": null },
"widgets": [
{
"id": "1404823176543210987",
"type": "image_text",
"position": { "column": 0, "order": 0 },
"config": {
"type": "image_text",
"title": "Weekly Events",
"text": "Game night starts every Friday at 8 PM.",
"image_hash": "4f82b8e12f52c738965ef1c8824f55a0"
},
"requires_hydration": false,
"default_title": "Image + Text"
}
]
}

Endpoints

Set Guild Space

PUT/guilds/{guild.id}/space

Replaces the guild space configuration. Requires the MANAGE_GUILD permission. Returns the updated guild space object on success.

JSON Params
FieldTypeDescription
headerguild space header objectThe guild space header
widgetsarray[guild space widget object]The widgets in the guild space

Widget IDs are omitted when adding new widgets. Existing widget IDs are included when modifying or repositioning them. An image and text widget accepts an image image data field in its config to replace or remove its image.

Get Guild Space

GET/guilds/{guild.id}/space

Returns a guild space object. The guild space must be published unless the current user has the MANAGE_GUILD permission.

Hydrate Guild Space Widgets

GET/guilds/{guild.id}/space/widgets/hydrate

Returns dynamic data for the requested guild space widgets.

Query String Params
FieldTypeDescription
widget_idsarray[snowflake]The IDs of the widgets to hydrate
Response Body
FieldTypeDescription
widgetsarray[guild space hydration object]The hydrated widget data

List Guild Space Widget Catalog

GET/guilds/{guild.id}/space/widgets/catalog

Returns the widgets available to add to the guild space. Requires the MANAGE_GUILD permission.

Response Body
FieldTypeDescription
widgetsarray[guild space catalog widget object]The available catalog widgets

Modify Guild Space Settings

PATCH/guilds/{guild.id}/space/settings

Modifies the guild space settings. Requires the MANAGE_GUILD permission. Returns the updated settings on success.

JSON Params
FieldTypeDescription
publish_statusintegerThe publish status of the space