Invite Resource

Invite Object

Represents a code that when used, adds a user to a guild.
Invite Structure
FieldTypeDescription
codestringthe invite code (unique ID)
guildpartial guild objectthe guild this invite is for
channelpartial channel objectthe channel this invite is for
approximate_presence_count?intapproximate count of online members
approximate_member_count?intapproximate count of total members
Example Invite Object
{
    "code": "0vCdhLbwjZZTWZLD",
    "guild": {
        "id": "165176875973476352",
        "name": "CS:GO Fraggers Only",
        "splash": null,
        "icon": null
    },
    "channel": {
        "id": "165176875973476352",
        "name": "illuminati",
        "type": 0
    }
}

Invite Metadata Object

Invite Metadata Structure
FieldTypeDescription
invitera user objectuser who created the invite
usesintegernumber of times this invite has been used
max_usesintegermax number of times this invite can be used
max_ageintegerduration (in seconds) after which the invite expires
temporaryboolwhether this invite only grants temporary membership
created_atISO8601 timestampwhen this invite was created
revokedboolwhether this invite is revoked
Example Invite Metadata
{
    "inviter": {},
    "uses": 0,
    "max_uses": 0,
    "max_age": 0,
    "temporary": false,
    "created_at": "2016-03-31T19:15:39.954000+00:00",
    "revoked": false
}

Get Invite

GET/invites/{invite.code}
Returns an invite object for the given code.
Get Invite URL Parameters
FieldTypeDescription
with_counts?booleanwhether the invite should contain approximate member counts

Delete Invite

DELETE/invites/{invite.code}
Delete an invite. Requires the MANAGE_CHANNELS permission. Returns an invite object on success.