Invite Object
Represents a code that when used, adds a user to a guild or group DM channel.Invite Structure
* This is a partial role object that only contains
id, name, position, color, colors, icon, and unicode_emoji.
Invite Types
Invite Target Types
Guild Invite Flags
Example Invite Object
Invite Metadata Object
Extra information about an invite, will extend the invite object.Invite Metadata Structure
Example Invite Metadata
Invite Stage Instance Object
Invite Stage Instance Structure
Example Invite Stage Instance
Get Invite
GET/invites/{invite.code}
Returns an invite object for the given code.
Query String Params
Delete Invite
DELETE/invites/{invite.code}
Delete an invite. Requires the 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-users
Gets the users allowed to see and accept this invite. Response is a CSV file with the header user_id and each user ID from the original file passed to invite create 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-users
Updates the users allowed to see and accept this invite. Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described. Requires the caller to be the inviter or have the MANAGE_GUILD permission.
Form Params
Example Error Response
Get Target Users Job Status
GET/invites/{invite.code}/target-users/job-status
Processing target users from a CSV when creating or updating an invite is done asynchronously. This endpoint allows you to check the status of that job. Requires the caller to be the inviter, or have MANAGE_GUILD permission, or have VIEW_AUDIT_LOG permission.