Skip to main content
CA Colombia exposes a WebSocket server that pushes real-time events to connected clients. Rather than polling the REST API for changes, you subscribe to named topics and receive a message the moment something changes — a character’s status updates, a user account is modified, or a new character is created. Authentication is handled automatically through your existing session cookie, so no additional credentials are needed beyond an active login.

Connecting

The WebSocket server is available at:
Authentication happens during the WebSocket upgrade handshake. The server reads your session cookie from the request headers and validates it before the connection is established. If the cookie is missing or invalid, the server responds with HTTP 401 Unauthorized and closes the socket — no WebSocket connection is opened.
Because the session cookie is sent automatically by the browser during the upgrade handshake, you do not need to pass any credentials in the WebSocket constructor or send an authentication message after connecting.

Subscribing to Topics

Once connected, send a JSON message with type: "subscribe" and a topics array containing the topic names you want to receive events for. You can subscribe to one topic or several at once.

Available Topics

Subscribe to characters:update to get real-time notifications when staff approve or reject a character submission, rather than polling the REST API.

Unsubscribing from Topics

Send a message with type: "unsubscribe" and the topics you no longer want to receive. Topics not listed remain active.

Incoming Message Format

Every event the server pushes to your client follows this structure:
A minimal handler that routes messages by channel:
If you send a message with an invalid format (for example, a type value other than subscribe or unsubscribe), the server responds with an error object:

Connection Keep-Alive

The server sends a WebSocket ping frame to every connected client every 30 seconds. Your WebSocket client must respond with a pong frame to confirm the connection is still alive. Most browser WebSocket implementations handle ping/pong frames automatically and transparently — you do not need to write any code for this. If you are using a Node.js ws client or a similar library, respond to pings explicitly:
If the server does not receive a pong response before the next ping cycle (30 seconds), it marks the connection as dead, terminates the socket, and removes it from the connection pool. Your client should listen for the close event and implement reconnection logic with an appropriate back-off strategy.

Authentication Errors

The WebSocket server validates your session at connection time using your access token cookie. If your access token expires while you are connected, the server will terminate the connection. Use the REST OAuth flow to refresh your tokens, then reconnect.