Invite object
Represents a code that, when used, adds a user to a guild or group DM channel.Invite structure
The type of invite.
The invite code (unique ID).
The guild this invite is for. Optional field.
The channel this invite is for. Can be
null.The user who created the invite. Optional field.
The type of target for this voice channel invite. Optional field.
The user whose stream to display for this voice channel stream invite. Optional field.
The embedded application to open for this voice channel embedded application invite. Optional field.
Approximate count of online members. Returned from
GET /invites/{code} when with_counts is true. Optional field.Approximate count of total members. Returned from
GET /invites/{code} when with_counts is true. Optional field.The expiration date of this invite.
null if the invite does not expire.Guild scheduled event data. Only included if
guild_scheduled_event_id contains a valid guild scheduled event ID. Optional field.Guild invite flags for guild invites. Optional field.
The roles assigned to the user upon accepting the invite. Optional field. This is a partial role object containing only
id, name, position, color, colors, icon, and unicode_emoji.Invite types
| Type | Value |
|---|---|
| GUILD | 0 |
| GROUP_DM | 1 |
| FRIEND | 2 |
Invite target types
| Type | Value |
|---|---|
| STREAM | 1 |
| EMBEDDED_APPLICATION | 2 |
Guild invite flags
| Flag | Value | Description |
|---|---|---|
| IS_GUEST_INVITE | 1 << 0 | This invite is a guest invite for a voice channel |
Invite example
Invite metadata object
Extra information about an invite. Extends the invite object.Invite metadata structure
Number of times this invite has been used.
Max number of times this invite can be used.
Duration in seconds after which the invite expires.
Whether this invite only grants temporary membership.
When this invite was created.
Invite metadata example
Invite stage instance object
Invite stage instance structure
The members speaking in the stage.
The number of users in the stage.
The number of users speaking in the stage.
The topic of the stage instance (1–120 characters).
Get invite
GET /invites/{invite.code}Query string params
Whether the invite should contain approximate member counts.
The guild scheduled event to include with the invite.
Delete invite
DELETE /invites/{invite.code}MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires an Invite Delete gateway event.
This endpoint supports the
X-Audit-Log-Reason header.Get target users
GET /invites/{invite.code}/target-usersuser_id and each user ID on its own line. Requires the caller to be the inviter, or have MANAGE_GUILD permission, or have VIEW_AUDIT_LOG permission.
Update target users
PUT /invites/{invite.code}/target-users400 with the invalid IDs described. Requires the caller to be the inviter or have MANAGE_GUILD permission.
Form params
A CSV file with a single column of user IDs for all the users able to accept this invite.
Error response example
Get target users job status
GET /invites/{invite.code}/target-users/job-statusMANAGE_GUILD permission, or have VIEW_AUDIT_LOG permission.
Status codes
| Code | Name | Description |
|---|---|---|
| 0 | UNSPECIFIED | The default value. |
| 1 | PROCESSING | The job is still being processed. |
| 2 | COMPLETED | The job has been completed successfully. |
| 3 | FAILED | The job has failed. See error_message for details. |