Skip to main content
GET
/
api
/
events
/
getWebsocket
/
:instance
Check Websocket
curl --request GET \
  --url https://api.example.com/api/events/getWebsocket/:instance \
  --header 'token: <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate limit: Global (100/min) • Idempotent: yes

Description

Returns the instance’s current WebSocket configuration. Returns 404 when there is no row in websocket_configs (the instance was never configured via POST), there is no “implicit default config”.
Watch the spelling: the correct path is getWebsocket (lowercase w in socket), different from POST /websocket. This inconsistency is historical, use the exact literal from the registry.

Path parameters

instance
string
required
Instance name.

Example

curl -X GET "https://ryzeapi.cloud/api/events/getWebsocket/$Instance_Name" \
  -H "token: $Token_Instance"

Headers

token
string
required
TokenAccount or TokenInstance.

Success response

Returns the websocket object with the current configuration: enabled, events and mediaBase64. Note: 404 means “never configured” (no row in websocket_configs), different from enabled=false (which returns 200 with the persisted row and the fields cleared). Handle both cases on the client.
200 OK
{
  "success": true,
  "message": "WebSocket configuration retrieved",
  "websocket": {
    "enabled":     true,
    "events":      ["message.exchange"],
    "mediaBase64": false
  }
}
200 OK (disabled)
{
  "success": true,
  "message": "WebSocket configuration retrieved",
  "websocket": {
    "enabled":     false,
    "events":      [],
    "mediaBase64": false
  }
}

Errors

HTTPerror.message
401Invalid token
404Instance not found
404WebSocket not configured for this instance
429Rate limit exceeded. Try again later.
500Failed to get instance
500Failed to get websocket configuration
Envelope:
{
  "success": false,
  "error": { "message": "WebSocket not configured for this instance" }
}

Notes

  • 404 ≠ “disabled”: 404 means “never created a row”; an enabled=false returns 200 normally with "enabled": false. Handle both cases on the client.
  • No GET /websocket/:instance alias: unlike the webhook, there is no alias with the “regular” spelling, only getWebsocket (lowercase).

Next

Configure WebSocket

POST /api/events/websocket/:instance

Connect via WebSocket

GET /ws/:instance