WebSockets · Schema
WebSocket Handshake Response
Schema describing the HTTP 101 Switching Protocols response that completes the WebSocket opening handshake as defined in RFC 6455 Section 4.2.2.
Full DuplexNetworkingReal-Time CommunicationRFC 6455Web Technology
Properties
| Name | Type | Description |
|---|---|---|
| statusCode | integer | HTTP status code 101 Switching Protocols, indicating the server agrees to upgrade the connection. |
| statusMessage | string | The HTTP reason phrase for the 101 status code. |
| headers | object | HTTP headers in the server's handshake response. |
JSON Schema
{
"$id": "websocket-handshake-response.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "WebSocket Handshake Response",
"description": "Schema describing the HTTP 101 Switching Protocols response that completes the WebSocket opening handshake as defined in RFC 6455 Section 4.2.2.",
"type": "object",
"required": [
"statusCode",
"headers"
],
"properties": {
"statusCode": {
"type": "integer",
"const": 101,
"description": "HTTP status code 101 Switching Protocols, indicating the server agrees to upgrade the connection."
},
"statusMessage": {
"type": "string",
"const": "Switching Protocols",
"description": "The HTTP reason phrase for the 101 status code."
},
"headers": {
"type": "object",
"description": "HTTP headers in the server's handshake response.",
"required": [
"Upgrade",
"Connection",
"Sec-WebSocket-Accept"
],
"properties": {
"Upgrade": {
"type": "string",
"const": "websocket",
"description": "Confirms the protocol upgrade to WebSocket."
},
"Connection": {
"type": "string",
"const": "Upgrade",
"description": "Confirms the connection is being upgraded."
},
"Sec-WebSocket-Accept": {
"type": "string",
"description": "A base64-encoded SHA-1 hash of the client's Sec-WebSocket-Key concatenated with the GUID '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'. Used to prove the server received the client's handshake.",
"pattern": "^[A-Za-z0-9+/]{27}=$"
},
"Sec-WebSocket-Protocol": {
"type": "string",
"description": "The subprotocol selected by the server from the client's list.",
"examples": [
"chat",
"graphql-ws"
]
},
"Sec-WebSocket-Extensions": {
"type": "string",
"description": "The extensions selected by the server.",
"examples": [
"permessage-deflate"
]
}
},
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/websocket-handshake-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.