How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Discord Gateway API

The Discord Gateway API provides persistent, stateful WebSocket connections between your client and Discord servers. These connections are used for sending and receiving real-time events your client can use to track and update local state, including message creation, guild updates, presence changes, and voice state updates.

Discord Gateway API is one of 29 APIs that Discord publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Gateway. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This event API exposes 2 operations across 1 channel, and defines 56 schemas. It is described by AsyncAPI 2.6.0, at version 10.

The API connects through a single server, wss://gateway.discord.gg/?v=10&encoding=json (wss).

2 operations 1 channels 56 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
10
Server
wss://gateway.discord.gg/?v=10&encoding=json (wss)
License
MIT
Resource Areas
1

Channels & Operations 2

Across 1 channel, the API surfaces 2 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 2
SUB
/
Receive events from Gateway
receiveGatewayEvent body
PUB
/
Send message to Gateway
sendGatewayMessage body

Messages & Schemas 56

The contract defines 56 schemas that model the data carried by its messages. The most detailed are User (7 properties), Activity (4 properties), DispatchEvent (4 properties). Each schema is shown below with its type and property counts.

Identify
message
Sent to trigger the initial handshake with the gateway
Resume
message
Sent to resume a disconnected session
Heartbeat
message
Sent periodically to maintain the connection
RequestGuildMembers
message
Request guild members for a guild
UpdateVoiceState
message
Sent to join, move, or disconnect from a voice channel
UpdatePresence
message
Sent to update the client's presence
Hello
message
Received after connecting, contains heartbeat interval
HeartbeatAck
message
Acknowledgment of a heartbeat
Ready
message
Dispatched after a successful Identify
Resumed
message
Dispatched after a successful Resume
Reconnect
message
Server requests the client to reconnect
InvalidSession
message
Session is invalid, d indicates if resumable
ChannelCreate
message
New channel created
ChannelUpdate
message
Channel was updated
ChannelDelete
message
Channel was deleted
ChannelPinsUpdate
message
Message was pinned or unpinned
ThreadCreate
message
Thread created or current user added to thread
ThreadUpdate
message
Thread was updated
ThreadDelete
message
Thread was deleted
ThreadListSync
message
Sent when gaining access to a channel with active threads
GuildCreate
message
Lazy-loaded guild available or user joined a new guild
GuildUpdate
message
Guild was updated
GuildDelete
message
Guild became unavailable or user left/was removed from guild
GuildBanAdd
message
User was banned from a guild
GuildBanRemove
message
User was unbanned from a guild
GuildEmojisUpdate
message
Guild emojis were updated
GuildStickersUpdate
message
Guild stickers were updated
GuildMemberAdd
message
New user joined a guild
GuildMemberRemove
message
User was removed from a guild
GuildMemberUpdate
message
Guild member was updated
GuildMembersChunk
message
Response to Request Guild Members
GuildRoleCreate
message
Guild role was created
GuildRoleUpdate
message
Guild role was updated
GuildRoleDelete
message
Guild role was deleted
GuildScheduledEventCreate
message
Guild scheduled event was created
GuildScheduledEventUpdate
message
Guild scheduled event was updated
GuildScheduledEventDelete
message
Guild scheduled event was deleted
InteractionCreate
message
User used an interaction
InviteCreate
message
Invite to a channel was created
InviteDelete
message
Invite to a channel was deleted
MessageCreate
message
Message was created
MessageUpdate
message
Message was edited
MessageDelete
message
Message was deleted
MessageDeleteBulk
message
Multiple messages were deleted at once
MessageReactionAdd
message
User reacted to a message
MessageReactionRemove
message
User removed a reaction from a message
MessageReactionRemoveAll
message
All reactions were explicitly removed from a message
PresenceUpdate
message
User's presence or info was updated
TypingStart
message
User started typing in a channel
UserUpdate
message
Properties about the current user changed
VoiceStateUpdate
message
Someone joined, left, or moved a voice channel
VoiceServerUpdate
message
Guild's voice server was updated
WebhooksUpdate
message
Guild channel webhook was created, updated, or deleted
DispatchEvent
object
4 properties 4 required
User
object
7 properties 2 required
Activity
object
4 properties 2 required

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

discord-gateway-api-asyncapi.yml Raw ↑

Other APIs Discord publishes across the network.

Discord Interactions API
Discord OAuth2 API
Discord Webhook Events API
Discord Embedded App SDK
Discord Voice API
Discord Social SDK
Discord Application Commands API
Discord Applications API
Discord Audit Log API
Discord Auto Moderation API
Discord Channels API
Discord Emojis API
Where this information came from

This is an independent, third-party profile of Discord Gateway API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.