PLEXICHATNarrative Docs

Index

Guides, route-group overviews, and live schema entry points for the Plexichat backend.

REST http://api.plexichat.com/api/v1Gateway ws://api.plexichat.com/gatewayVersion a.1.0-49

WebSocket Gateway

The Plexichat gateway delivers real-time events and accepts client-side signaling such as heartbeats, identify, presence updates, typing, and voice messages.

Gateway URL

ws://api.plexichat.com/gateway

Core Lifecycle

  1. connect to the gateway
  2. receive HELLO
  3. send IDENTIFY with a session or bot token
  4. heartbeat on the provided interval
  5. consume DISPATCH events such as READY, MESSAGE_CREATE, and PRESENCE_UPDATE
  6. resume or reconnect when the connection is interrupted

Payload Shape

Gateway payloads use the familiar structure:


{"op":0,"d":{},"s":1,"t":"EVENT_NAME"}
FieldMeaning
opopcode
devent or command data
ssequence number on dispatch payloads
tdispatch event type when op is DISPATCH

Code-Defined Opcode Families

  • core opcodes such as HELLO, IDENTIFY, HEARTBEAT, RESUME, INVALID_SESSION
  • Plexichat status opcodes such as SERVER_STATUS and VERSION_CHECK
  • voice signaling opcodes such as VOICE_CONNECT and VOICE_ICE_CANDIDATE
  • typing opcodes TYPING_START and TYPING_STOP

See Connection, Events, Intents, Opcodes, and Close Codes for details.