Skip to main content
Version: Next

Connect to an org websocket subscription

GET

/org/{tenant_code}/v2/event-publisher/websockets/connect/{id}

Platform support: MT and CC

Token Cost: 1 token (low)

Opens a websocket connection to a subscription created through this organization's route. Connect to the url returned when the subscription was created, as a websocket upgrade, with the api_key that created it as a Bearer token. Each matched event then arrives as one text message. A subscription outside this organization is answered 404, the same as an unknown id. A refused connect is answered before the upgrade with a JSON error; a connection limit or a deletion that races the handshake is reported after the upgrade instead, as the close reason connection limit reached or subscription was removed.

Request​

Responses​

Switching Protocols. The connection is now a websocket; matched events arrive as text messages until either side closes it.