Skip to content

The AsyncAPI document defines incoming commands, outgoing events, and acknowledgement shapes. Its messages describe Socket.IO argument tuples; use a Socket.IO client to encode the transport packets.

Download the AsyncAPI contract

Download the generated event contract.

The schema is generated from runtime definitions and checked for drift. Behavioral tests separately check sequencing, replay, limits, and cleanup. See Start a session and Cursors and replay for those obligations.

WSS/
Messages
[
  {
    "eventId": "<string>",
    "body": "<string>",
    "errorReason": "<string>",
    "headers": {},
    "status": 0
  }
]

Security Schemes

Enter your complete project API key (pho_sk_...) without the Bearer prefix. It is sent as Authorization: Bearer <project API key>. The key must belong to the projectId in the connection URL.

Bindings

headersobject
Show child attributes
methodstring
const: "GET"
queryobject
externalDocs: {"description":"Engine.IO Protocol","url":"https://socket.io/docs/v4/engine-io-protocol/"}
Show child attributes
Server

Send

replyarray

Incoming event reply

maxItems: 1
minItems: 1
Show child attributes
reply acknowledgement

Incoming event subscribe

maxItems: 1
minItems: 1
Show child attributes
subscribe acknowledgement

Receive

Outgoing event delivery

maxItems: 2
minItems: 2
Show child attributes

Outgoing event delivery_error

maxItems: 1
minItems: 1
Show child attributes