Skip to main content

Lobby Object

Represents a lobby within Discord. See Managing Lobbies for more information.
Lobby Structure
FieldTypeDescription
idsnowflakethe id of this channel
application_idsnowflakeapplication that created the lobby
metadata?dict<string, string>dictionary of string key/value pairs. The max total length is 1000.
membersarray of lobby member objectsmembers of the lobby
linked_channel?channel objectthe guild channel linked to the lobby

Lobby Member Object

Represents a member of a lobby, including optional metadata and flags.
Lobby Member Structure
FieldTypeDescription
idsnowflakethe id of the user
metadata??dict<string, string>dictionary of string key/value pairs. The max total length is 1000.
flags?integerlobby member flags combined as a bitfield
Lobby Member Flags
FlagValueDescription
CanLinkLobby1<<0user can link a text channel to a lobby
Example Lobby Object
{
  "id": "96008815106887111",
  "application_id": "41771983429993937",
  "metadata": {
    "topic": "we need more redstone",
  },
  "members": [
    {
      "id": "41771983429993000",
      "metadata": null,
      "flags": 1
    }
  ]
}

Create Lobby

Creates a new lobby, adding any of the specified members to it, if provided. Returns a lobby object.
Discord Social SDK clients will not be able to join or leave a lobby created using this API, such as Client::CreateOrJoinLobby. See Managing Lobbies for more information.

JSON Params

FieldTypeDescription
metadata??dict<string, string>optional dictionary of string key/value pairs. The max total length is 1000.
members?array of lobby member objectsoptional array of up to 25 users to be added to the lobby
idle_timeout_seconds?integerseconds to wait before shutting down a lobby after it becomes idle. Value can be between 5 and 604800 (7 days). See LobbyHandle for more details on this behavior.

Lobby Member JSON Params

FieldTypeDescription
idsnowflakeDiscord user id of the user to add to the lobby
metadata??dict<string, string>optional dictionary of string key/value pairs. The max total length is 1000.
flags?integerlobby member flags combined as a bitfield

Create or Join Lobby

Creates a new lobby for the application identified by a secret, or joins the calling user to the existing lobby with that secret if one already exists. Updates lobby metadata and the calling member’s metadata on join. Uses Bearer token for authorization with the sdk.social_layer scope. Returns a lobby object.

JSON Params

FieldTypeDescription
secretstringsecret used to identify the lobby. If a lobby for this application already exists with this secret, the caller joins it; otherwise a new lobby is created. Max 250 characters.
idle_timeout_seconds?integerseconds to wait before shutting down a lobby after it becomes idle. Value can be between 5 and 604800 (7 days). See LobbyHandle for more details on this behavior.
lobby_metadata??dict<string, string>optional dictionary of string key/value pairs to set on the lobby. The max total length is 1000. Overwrites any existing lobby metadata.
member_metadata??dict<string, string>optional dictionary of string key/value pairs to set on the calling user’s lobby member. The max total length is 1000.

Get Lobby

Returns a lobby object for the specified lobby id, if it exists.

Modify Lobby

Modifies the specified lobby with new values, if provided. Returns the updated lobby object.

JSON Params

FieldTypeDescription
metadata??dict<string, string>optional dictionary of string key/value pairs. The max total length is 1000. Overwrites any existing metadata.
members?array of lobby member objectsoptional array of up to 25 users to replace the lobby members with. If provided, lobby members not in this list will be removed from the lobby.
idle_timeout_seconds?integerseconds to wait before shutting down a lobby after it becomes idle. Value can be between 5 and 604800 (7 days). See LobbyHandle for more details on this behavior.

Delete Lobby

Deletes the specified lobby if it exists. It is safe to call even if the lobby is already deleted as well. Returns nothing.

Add a Member to a Lobby

Adds the provided user to the specified lobby. If called when the user is already a member of the lobby will update fields such as metadata on that user instead. Returns the lobby member object.

JSON Params

FieldTypeDescription
metadata??dict<string, string>optional dictionary of string key/value pairs. The max total length is 1000.
flags?integerlobby member flags combined as a bitfield

Bulk Update Lobby Members

Adds, updates, or removes up to 25 members from the specified lobby in a single request. Members with remove_member: false (the default) are upserted — added if not present, or updated with the provided metadata and flags if already a member. Members with remove_member: true are removed. Returns an array of lobby member objects for the upserted members. Removed members are not included in the response.
Users unknown to Discord will return a 404 UNKNOWN_USER error. Users that fail permission checks or who have already reached the maximum number of lobbies per application (and are not already a member of this lobby) are silently dropped from the upsert set.

JSON Params

An array of member objects. Minimum 1, maximum 25.
FieldTypeDescription
idsnowflakeDiscord user id of the user to add, update, or remove
metadata??dict<string, string>optional dictionary of string key/value pairs. The max total length is 1000.
flags?integerlobby member flags combined as a bitfield
remove_member?booleanif true, the user is removed from the lobby instead of upserted. Default false.

Remove a Member from a Lobby

Removes the provided user from the specified lobby. It is safe to call this even if the user is no longer a member of the lobby, but will fail if the lobby does not exist. Returns nothing.

Leave Lobby

Removes the current user from the specified lobby. It is safe to call this even if the user is no longer a member of the lobby, but will fail if the lobby does not exist. Uses Bearer token for authorization. Returns nothing. Links an existing text channel to a lobby. See Linked Channels for more information. Uses Bearer token for authorization and user must be a lobby member with CanLinkLobby lobby member flag. Returns a lobby object with a linked channel.

JSON Params

FieldTypeDescription
channel_id?snowflakethe id of the channel to link to the lobby. If not provided, will unlink any currently linked channels from the lobby.
Unlinks any currently linked channels from the specified lobby. Send a request to this endpoint with an empty body to unlink any currently linked channels from the specified lobby. Uses Bearer token for authorization and user must be a lobby member with CanLinkLobby lobby member flag. Returns a lobby object without a linked channel.

Send Lobby Message

Sends a message to the specified lobby. The calling user must be a member of the lobby. Uses Bearer token for authorization with the sdk.social_layer scope. Returns the created lobby message object.
If the lobby has a linked channel, the message is also forwarded to that channel. If forwarding fails (for example, due to AutoMod), the lobby message is still delivered to other lobby members.

JSON Params

FieldTypeDescription
contentstringmessage content. Must be non-empty.
metadata??dict<string, string>optional dictionary of string key/value pairs delivered alongside the message to active clients via the Social SDK. Not persisted on the linked channel message.
flags?integeroptional message flags combined as a bitfield. Only flags creatable by the Social SDK are accepted.

Lobby Message Object

FieldTypeDescription
idsnowflakeid of the message
typeintegermessage type
contentstringmessage content
lobby_idsnowflakeid of the lobby this message was sent to
channel_idsnowflakeincluded for compatibility with the messages interface; equal to lobby_id
authoruser objectthe user who sent the message
metadata??dict<string, string>dispatch-only metadata sent with the message
moderation_metadata??dict<string, string>moderation metadata set via Update Lobby Message Moderation Metadata
flagsintegermessage flags bitfield
application_idsnowflakethe application that sent the message

Get Lobby Messages

Returns the most recent messages in the specified lobby. The calling user must be a member of the lobby. Uses Bearer token for authorization with the sdk.social_layer scope. Returns an array of lobby message objects (see Send Lobby Message for the object shape).

Query Params

FieldTypeDescription
limit?integermax number of messages to return (1-200). Defaults to 50.

Update Lobby Message Moderation Metadata

Sets the moderation metadata for a lobby message. The metadata is app-scoped and delivered to active game clients via the Social SDK as a realtime message update. See Integrate Moderation for the full moderation flow. Uses Bot token for authorization. Returns HTTP 204: No Content on success.

JSON Params

FieldTypeDescription
*stringFree-form key–value pairs describing the moderation decision. Up to 5 keys; key length ≤ 1024 characters; value length ≤ 2000 characters.

Create Lobby Channel Invite for Self

Creates a single-use guild invite to the lobby’s linked channel, targeted at the calling user. The lobby must have a linked channel and the caller must be a member of the lobby. The invite expires after one hour. Uses Bearer token for authorization with the sdk.social_layer scope. Returns a lobby invite object.

Create Lobby Channel Invite for User

Creates a single-use guild invite to the lobby’s linked channel on behalf of an application, targeted at the specified user. The lobby must have a linked channel. The invite expires after one hour. Uses Bot token for authorization. Returns a lobby invite object.
Lobby Invite Object
FieldTypeDescription
codestringthe invite code for the lobby’s linked channel

Development Rate Limits

Applications without increased rate limits for production releases are subject to the following application-wide development limits:
EndpointLimit
POST /lobbies100 per 2 hours
PUT /lobbies100 per 2 hours
PATCH /lobbies/{lobby.id}100 per 2 hours
PUT /lobbies/{lobby.id}/members/{user.id}100 per 2 hours
DELETE /lobbies/{lobby.id}/members/{user.id}100 per 2 hours
POST /lobbies/{lobby.id}/members/bulk100 per 2 hours
POST /lobbies/{lobby.id}/members/@me/invites100 per 2 hours
POST /lobbies/{lobby.id}/members/{user.id}/invites100 per 2 hours
PATCH /lobbies/{lobby.id}/channel-linking20 per 2 hours
POST /lobbies/{lobby.id}/messages100 per 2 hours
These are per-application rate limits, not per-user.
These limitations are designed to provide sufficient capacity for development, testing, and small-scale demos while ensuring system stability.