Skip to content

Routes

const Routes: object

Defined in: packages/rest/src/routes.ts:2

Discord REST API route definitions.

readonly applicationCommand: (applicationId, commandId) => string

Returns one application command.

string

Application identifier.

string

Command identifier.

string

Command route.

readonly applicationCommands: (applicationId) => string

Returns application commands for an application.

string

Application identifier.

string

Global command route.

readonly applicationEmoji: (applicationId, emojiId?) => string

Returns application emojis, or a specific emoji.

string

Application identifier.

string

Optional emoji identifier.

string

readonly applicationEntitlement: (applicationId, entitlementId?) => string

Returns an application’s entitlements, or one entitlement.

string

string

string

readonly applicationSkus: (applicationId) => string

Returns an application’s SKUs.

string

string

readonly channel: (channelId) => string

Returns a channel.

string

Channel identifier.

string

Channel route.

readonly channelBulkDelete: (channelId) => string

Bulk deletes messages.

string

Channel identifier.

string

Bulk-delete route.

readonly channelInvites: (channelId) => string

Returns channel invites.

string

Channel identifier.

string

Invite collection route.

readonly channelJoinedPrivateArchivedThreads: (channelId) => string

Returns the private archived threads the current user joined.

string

Channel identifier.

string

readonly channelMessages: (channelId) => string

Returns messages in a channel.

string

Channel identifier.

string

Message collection route.

readonly channelMessagesPin: (channelId, messageId) => string

Pins (PUT) or unpins (DELETE) a message.

string

Channel identifier.

string

Message identifier.

string

Pin route.

readonly channelMessagesPins: (channelId) => string

Returns pinned messages, newest first, in pages of up to 50 (before, limit).

string

Channel identifier.

string

Pins route.

readonly channelPermission: (channelId, overwriteId) => string

Returns a channel permission overwrite.

string

Channel identifier.

string

Role or user identifier.

string

Permission overwrite route.

readonly channelPrivateArchivedThreads: (channelId) => string

Returns private archived threads for a channel.

string

Channel identifier.

string

Private-archive route.

readonly channelPublicArchivedThreads: (channelId) => string

Returns public archived threads for a channel.

string

Channel identifier.

string

Public-archive route.

readonly channelThreads: (channelId) => string

Creates a thread that is not tied to a message, or a forum or media post (POST).

string

Channel identifier.

string

readonly channelTyping: (channelId) => string

Starts a typing indicator (POST).

string

Channel identifier.

string

readonly channelWebhooks: (channelId) => string

Returns channel webhooks.

string

Channel identifier.

string

Webhook collection route.

readonly consumeEntitlement: (applicationId, entitlementId) => string

Marks a one-time-purchase entitlement as consumed.

string

string

string

readonly crosspostMessage: (channelId, messageId) => string

Crossposts a message.

string

Channel identifier.

string

Message identifier.

string

Crosspost route.

readonly currentUserGuild: (guildId) => string

Leaves a guild as the current user (DELETE).

string

Guild identifier.

string

Current-user guild route.

readonly gateway: () => string

Returns the generic Gateway endpoint.

string

Gateway route.

readonly gatewayBot: () => string

Returns the Gateway endpoint and recommended shard count for bots.

string

Gateway bot route.

readonly guild: (guildId) => string

Returns a guild.

string

Guild identifier.

string

Guild route.

readonly guildActiveThreads: (guildId) => string

Returns active threads for a guild.

string

Guild identifier.

string

readonly guildApplicationCommand: (applicationId, guildId, commandId) => string

Returns a single guild application command.

string

Application identifier.

string

Guild identifier.

string

Command identifier.

string

Guild command route.

readonly guildApplicationCommands: (applicationId, guildId) => string

Returns guild application commands.

string

Application identifier.

string

Guild identifier.

string

Guild command route.

readonly guildAuditLog: (guildId) => string

Returns audit log entries for a guild.

string

Guild identifier.

string

Audit log route.

readonly guildAutoModerationRule: (guildId, ruleId) => string

Returns one automod rule.

string

Guild identifier.

string

Rule identifier.

string

Automod-rule route.

readonly guildAutoModerationRules: (guildId) => string

Returns guild automod rules.

string

Guild identifier.

string

Automod-rule collection route.

readonly guildBan: (guildId, userId) => string

Returns an individual guild ban.

string

string

string

readonly guildBans: (guildId) => string

Returns guild bans collection.

string

string

readonly guildBulkBan: (guildId) => string

Bans up to 200 users at once (POST).

string

Guild identifier.

string

readonly guildChannels: (guildId) => string

Returns channels in a guild.

string

Guild identifier.

string

Channel collection route.

readonly guildEmoji: (guildId, emojiId?) => string

Returns guild emojis, or a specific emoji.

string

Guild identifier.

string

Optional emoji identifier.

string

readonly guildIntegration: (guildId, integrationId) => string

Removes an integration from a guild (DELETE).

string

Guild identifier.

string

Integration identifier.

string

readonly guildInvites: (guildId) => string

Returns invites for a guild.

string

Guild identifier.

string

readonly guildMember: (guildId, userId) => string

Returns a guild member.

string

Guild identifier.

string

User identifier.

string

Guild-member route.

readonly guildMemberMe: (guildId) => string

Edits the bot’s own member, e.g. its nickname (PATCH).

string

Guild identifier.

string

readonly guildMemberRole: (guildId, userId, roleId) => string

Returns a member role route.

string

string

string

string

readonly guildMembers: (guildId) => string

Returns members in a guild (paginated).

string

Guild identifier.

string

Members collection route.

readonly guildMembersSearch: (guildId) => string

Searches members by nickname or username.

string

Guild identifier.

string

readonly guildOnboarding: (guildId) => string

Returns the onboarding configuration for a guild.

string

Guild identifier.

string

readonly guildPreview: (guildId) => string

Returns a guild preview.

string

Guild identifier.

string

readonly guildPrune: (guildId) => string

Returns or executes a prune operation for inactive members.

string

Guild identifier.

string

Prune route.

readonly guildRole: (guildId, roleId) => string

Returns an individual guild role.

string

string

string

readonly guildRoles: (guildId) => string

Returns all guild roles.

string

Guild identifier.

string

Guild-role route.

readonly guildScheduledEvent: (guildId, eventId) => string

Returns one guild scheduled event.

string

Guild identifier.

string

Event identifier.

string

Scheduled-event route.

readonly guildScheduledEvents: (guildId) => string

Returns guild scheduled events.

string

Guild identifier.

string

Scheduled-event collection route.

readonly guildScheduledEventUsers: (guildId, eventId) => string

Returns users subscribed to a scheduled event.

string

Guild identifier.

string

Event identifier.

string

Scheduled-event users route.

readonly guildSoundboardSound: (guildId, soundId?) => string

Returns guild soundboard sounds, or one sound.

string

string

string

readonly guildSticker: (guildId, stickerId?) => string

Returns guild stickers, or one sticker.

string

string

string

readonly guildVanity: (guildId) => string

Returns the guild vanity invite metadata.

string

Guild identifier.

string

Vanity URL route.

readonly guildVoiceState: (guildId, userId) => string

Edits a voice state in a stage channel (PATCH); "@me" is the bot.

string

Guild identifier.

string

User identifier or "@me".

string

readonly guildWebhooks: (guildId) => string

Returns webhooks for a guild.

string

Guild identifier.

string

readonly guildWelcomeScreen: (guildId) => string

Returns the welcome screen for a guild.

string

Guild identifier.

string

readonly interactionCallback: (interactionId, token) => string

Returns an interaction callback endpoint.

string

Interaction identifier.

string

Interaction token.

string

Interaction callback route.

readonly interactionOriginalResponse: (applicationId, token) => string

Returns the original interaction response endpoint.

string

Application identifier.

string

Interaction token.

string

Original-response route.

readonly invite: (code) => string

Returns an invite by code.

string

Invite code.

string

Invite route.

readonly message: (channelId, messageId) => string

Returns a message.

string

Channel identifier.

string

Message identifier.

string

Message route.

readonly messageReactionMe: (channelId, messageId, emoji) => string

The bot’s own reaction: PUT adds it, DELETE removes it.

string

Channel identifier.

string

Message identifier.

string

Emoji name or ID.

string

readonly messageReactions: (channelId, messageId, emoji) => string

Returns reactions for a message and emoji.

string

Channel identifier.

string

Message identifier.

string

Emoji name or ID.

string

Reaction route.

readonly messageReactionsAll: (channelId, messageId) => string

Removes all reactions from a message.

string

Channel identifier.

string

Message identifier.

string

Reaction collection route.

readonly messageReactionUser: (channelId, messageId, emoji, userId) => string

Removes one user’s reaction (DELETE).

string

Channel identifier.

string

Message identifier.

string

Emoji name or ID.

string

User identifier.

string

Reaction-user route.

readonly messageThread: (channelId, messageId) => string

Creates a thread from a message.

string

Channel identifier.

string

Message identifier.

string

Message-thread route.

readonly pollAnswerVoters: (channelId, messageId, answerId) => string

Returns the users who voted for a poll answer.

string

string

number

Answer identifier (an integer, not a snowflake).

string

readonly pollExpire: (channelId, messageId) => string

Ends a poll early.

string

Channel identifier.

string

Poll message identifier.

string

readonly sendSoundboardSound: (channelId) => string

Plays a soundboard sound in a voice channel.

string

string

readonly skuSubscription: (skuId, subscriptionId?) => string

Returns a SKU’s subscriptions, or one subscription.

string

string

string

readonly soundboardDefaultSounds: () => string

Returns Discord’s default soundboard sounds.

string

readonly stageInstanceByChannel: (channelId) => string

Returns a stage instance by its channel.

string

Stage channel identifier.

string

Stage instance route.

readonly stageInstances: () => string

Returns the stage instances collection.

string

Stage instance root route.

readonly sticker: (stickerId) => string

Returns a sticker.

string

Sticker identifier.

string

Sticker route.

readonly stickerPacks: (packId?) => string

Returns the sticker packs Nitro users can use, or one pack.

string

Optional pack identifier.

string

readonly threadMember: (threadId, userId) => string

Returns one member of a thread; "@me" is the current user (PUT joins, DELETE leaves).

string

Thread identifier.

string

User identifier or "@me".

string

readonly threadMembers: (threadId) => string

Returns a thread’s members.

string

Thread identifier.

string

Thread-member route.

readonly user: () => string

Returns the current bot user.

string

User route.

readonly userById: (userId) => string

Returns one user.

string

User identifier.

string

User route.

readonly userGuilds: () => string

Returns the guilds the bot is in (paged with before, after, limit).

string

readonly voiceRegions: () => string

Returns current voice regions.

string

Voice-region route.

readonly webhook: (webhookId, token?) => string

Returns a webhook.

string

Webhook identifier.

string

Optional webhook token.

string

Webhook route.

readonly webhookMessage: (webhookId, token, messageId) => string

Returns a webhook message.

string

string

string

string