Connect an Agent WebSocket
curl --request GET \
--url https://api.staging.relayapp.im/v1/websocket \
--header 'Authorization: Bearer <token>'{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}Authorizations
Bearer token authentication. Include your API token in the Authorization header.
Format: Authorization: Bearer <your-token>
Query Parameters
Read-only diagnostic event view. The ready frame includes observational:true. Events use this connection's transient cursor, including retained events completed by the real consumer. ACK and full_sync_complete frames are rejected. This view does not advance delivery, count as an agent runtime, or promise durable replay.
The event types this connection receives, one parameter per type, for example subscribed_events=message.received&subscribed_events=call.created. A connection that names none receives every event type, including types Relay adds later. A connection that names types receives only those. A name Relay does not know is ignored. Every consuming connection of one Agent shares one sequence, so Relay queues only the types that all of them accept; a connection that names none accepts every type. An event of a type left out is not delivered later. When a new connection leaves out a type that is already queued, Relay removes those events, sends the rest again under new sequence numbers with the same event_id values, and closes the other connections with a restart disconnect so they reconnect from the new checkpoint. An observer receives only the types it names, or every type when it names none.
64Response
WebSocket connection accepted
curl --request GET \
--url https://api.staging.relayapp.im/v1/websocket \
--header 'Authorization: Bearer <token>'{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}
