API reference
Invites
Invite links to servers.
Create Channel Invite
/channels/{channel.id}/invitesPeople onlyMake an invite to a server through one of its channels. People only.
Permissions needed
CREATE_INSTANT_INVITEbit 1- Create invites
Path parameters
channel.id- A snowflake id.
Body
application/json
max_ageinteger · 0 to 604800 · default 86400- Seconds until it expires, 0 for never (at most 7 days otherwise). Default 24 hours.
max_usesinteger · 0 to 100 · default 0- 0 is unlimited, at most 100.
uniqueboolean · default falsetruealways makes a new code.
Example request
{
"max_age": 86400,
"max_uses": 0
}
Response
200 APIInvite
{
"code": "aB3dE5gH",
"guild_id": "107441200000000001",
"channel": {
"id": "107441200000000010",
"name": "general",
"type": 0
},
"inviter": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"max_age": 86400,
"max_uses": 0,
"uses": 3,
"temporary": false,
"created_at": "2026-10-21T18:00:00.000Z",
"expires_at": "2026-10-22T18:00:00.000Z"
}
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
BOTS_CANNOT_USE_ENDPOINT20001 · HTTP 403- A bot token was used on a route for people.
INVALID_FORM_BODY50035 · HTTP 400- The channel is a category or a thread.
Rate limits
inviteCreatePerUserbucket ea8dbcb5- 30 per 600 seconds, counted per user. See Rate limits.
Gateway events it causes
Discord
Like Discord’s Create Channel Invite, with differences.
Bots cannot create invites (people only).
Get Channel Invites
/channels/{channel.id}/invitesPeople and botsThe invites to one channel.
Permissions needed
MANAGE_CHANNELSbit 16- Manage channels
Path parameters
channel.id- A snowflake id.
Response
200 a list of APIInvite
[
{
"code": "aB3dE5gH",
"guild_id": "107441200000000001",
"channel": {
"id": "107441200000000010",
"name": "general",
"type": 0
},
"inviter": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"max_age": 86400,
"max_uses": 0,
"uses": 3,
"temporary": false,
"created_at": "2026-10-21T18:00:00.000Z",
"expires_at": "2026-10-22T18:00:00.000Z"
}
]
Errors
UNKNOWN_CHANNEL10003 · HTTP 404- The channel does not exist, or you are not in its server.
MISSING_ACCESS50001 · HTTP 403- You are in the server but cannot see the channel (VIEW_CHANNEL).
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
Discord
The same as Discord’s Get Channel Invites.
Get Guild Invites
/guilds/{guild.id}/invitesPeople and botsEvery invite to a server.
Permissions needed
MANAGE_GUILDbit 32- Manage server
Path parameters
guild.id- A snowflake id.
Response
200 a list of APIInvite
[
{
"code": "aB3dE5gH",
"guild_id": "107441200000000001",
"channel": {
"id": "107441200000000010",
"name": "general",
"type": 0
},
"inviter": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"max_age": 86400,
"max_uses": 0,
"uses": 3,
"temporary": false,
"created_at": "2026-10-21T18:00:00.000Z",
"expires_at": "2026-10-22T18:00:00.000Z"
}
]
Errors
UNKNOWN_GUILD10004 · HTTP 404- The server does not exist, or you are not in it.
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
Discord
The same as Discord’s Get Guild Invites.
Get Invite
/invites/{invite.code}No sign-in neededWhat anyone holding an invite code may see: the server's name and picture, and counts.
No sign-in. Deliberately minimal: no channel, no inviter, no expiry.
Who can call it
- No sign-in is needed (public).
- A person, with a session token.
- A bot, with its token.
Path parameters
invite.code- The invite code (4 to 32 letters and digits).
Response
200 APIInvitePreview
{
"type": 0,
"code": "aB3dE5gH",
"guild": {
"id": "107441200000000001",
"name": "The crew",
"icon": null
},
"approximate_member_count": 14,
"approximate_presence_count": 3
}
Errors
UNKNOWN_INVITE10006 · HTTP 404- There is no such invite, or it has expired.
Discord
Like Discord’s Get Invite, with differences.
Less detail than Discord's.
Delete Invite
/invites/{invite.code}People and botsRevoke an invite. Its maker may, and so may anyone with Manage Server or Manage Channels.
Path parameters
invite.code- The invite code.
Response
200 APIInvite
{
"code": "aB3dE5gH",
"guild_id": "107441200000000001",
"channel": {
"id": "107441200000000010",
"name": "general",
"type": 0
},
"inviter": {
"id": "107441200000000200",
"username": "josh",
"discriminator": "0",
"global_name": "Josh",
"avatar": "3f2a9c1e5b7d4a608c1e2f3a4b5c6d7e",
"banner": null,
"accent_color": null,
"bot": false,
"public_flags": 0
},
"max_age": 86400,
"max_uses": 0,
"uses": 3,
"temporary": false,
"created_at": "2026-10-21T18:00:00.000Z",
"expires_at": "2026-10-22T18:00:00.000Z"
}
Errors
UNKNOWN_INVITE10006 · HTTP 404- There is no such invite, or you are not in its server.
MISSING_PERMISSIONS50013 · HTTP 403- You lack a permission the route needs.
Gateway events it causes
Discord
The same as Discord’s Delete Invite.
Accept Invite
/invites/{invite.code}People onlyJoin a server with an invite code. People only. Answers the invite preview.
A bot cannot accept invites: it is added with the add link or by a person (see Add Bot to Server).
Path parameters
invite.code- The invite code.
Response
200 APIInvitePreview
{
"type": 0,
"code": "aB3dE5gH",
"guild": {
"id": "107441200000000001",
"name": "The crew",
"icon": null
},
"approximate_member_count": 14,
"approximate_presence_count": 3
}
Errors
UNKNOWN_INVITE10006 · HTTP 404- There is no such invite, or it has expired or run out.
USER_BANNED40007 · HTTP 403- You are banned from that server.
MAX_GUILDS30001 · HTTP 400- You are in the most servers an account may be in.
BOTS_CANNOT_USE_ENDPOINT20001 · HTTP 403- A bot token was used on a route for people.
Gateway events it causes
Discord
Like Discord’s Accept Invite, with differences.
People only; a bot is added with the add link.