WebSocket
One connection: JSON text messages, each {"type", "id", "data"}. Nothing goes in the URL.
{
"data": {
"token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0.eyJleHAiOjE3OTU1MTU2MDB9.c2lnbmF0dXJl"
},
"id": "1",
"type": "authenticate"
}{
"data": 42,
"id": "p1",
"type": "ping"
}{
"data": {
"filter": {
"location_id": "5620bf8d-88e0-4d6f-9153-4a3b97e5ae30"
},
"topic": "chargers/live"
},
"id": "garage",
"type": "subscribe"
}{
"id": "garage",
"type": "unsubscribe"
}{
"data": {
"authenticate_within_s": 10,
"connection_id": "6f1c2d3e-8a4b-4c5d-9e6f-7a8b9c0d1e2f",
"heartbeat_interval_s": 25
},
"type": "hello"
}{
"data": {
"expires_at": "2026-11-24T10:20:00Z",
"scopes": [
"chargers:read",
"chargers:control"
]
},
"id": "1",
"type": "authenticated"
}{
"data": {
"count": 2,
"topic": "chargers/live"
},
"id": "garage",
"type": "subscribed"
}{
"data": {
"reason": "requested"
},
"id": "garage",
"type": "unsubscribed"
}{
"data": {
"charger_id": "0f8d4c1e-7b5e-4a5e-9a51-3c1f0e8b2d47",
"connection": {
"last_seen_at": "2026-11-24T09:00:00Z",
"status": "online"
},
"evses": [
{
"allocation": null,
"id": 1,
"limit": {
"current_a": 16,
"power_w": null,
"set_by": "api"
},
"measurements": {
"current_a": {
"l1": 16,
"l2": 16.1,
"l3": 15.9
},
"energy_register_wh": 1523400,
"measured_at": "2026-11-24T10:15:30Z",
"power_w": 11040,
"soc_percent": null,
"voltage_v": null
},
"status": "charging",
"status_changed_at": "2026-11-24T09:30:00Z",
"transaction": {
"energy_wh": 5300,
"id": "8d3c2a90-51f7-4c1e-b7d2-6f0e9a4c3b18",
"started_at": "2026-11-24T09:30:00Z"
}
}
]
},
"id": "garage",
"type": "live"
}{
"data": {
"charger_id": "3b7e9a15-c2d4-4f86-8a0e-91d5f6c7b204"
},
"id": "garage",
"type": "removed"
}{
"data": 42,
"id": "p1",
"type": "pong"
}{
"type": "heartbeat"
}{
"data": {
"expires_at": "2026-11-24T10:20:00Z"
},
"type": "token_expiring"
}{
"data": {
"close_in_s": 10,
"reason": "server_stopping"
},
"type": "reconnect"
}{
"data": {
"code": "not-found",
"status": 404,
"title": "Not found",
"type": "https://developer.plugchoice.com/api/errors/not-found"
},
"id": "garage",
"type": "error"
}The token: the first message, within 10 seconds of hello, and later a fresh token on the open connection.
Asks whether the connection works: pong comes back with the same data.
Follows what a list of the HTTP API answers, with its filters, scope and access: the state now, then each change.
Ends the subscription its id names.
The first message, right after the upgrade.
The token counts: until when, and with which scopes.
The subscription is made; its state now follows, a message per resource.
The subscription ended, asked for or not; nothing of it follows.
A charger's live state, as GET /v4/chargers/{charger}/live answers it: first the state now, then after each change, at most one per charger a second.
A charger left the subscription: it sends nothing more here.
The answer to ping, with its data.
After 25 seconds without another message: the connection lives.
The authentication ends in 60 seconds: send a fresh token with authenticate.
The server closes this connection soon: open a new one first, then close this one.
A request failed, as the HTTP API's problems: code says why. The connection stays open.
{
"data": {
"token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0.eyJleHAiOjE3OTU1MTU2MDB9.c2lnbmF0dXJl"
},
"id": "1",
"type": "authenticate"
}{
"data": 42,
"id": "p1",
"type": "ping"
}{
"data": {
"filter": {
"location_id": "5620bf8d-88e0-4d6f-9153-4a3b97e5ae30"
},
"topic": "chargers/live"
},
"id": "garage",
"type": "subscribe"
}{
"id": "garage",
"type": "unsubscribe"
}{
"data": {
"authenticate_within_s": 10,
"connection_id": "6f1c2d3e-8a4b-4c5d-9e6f-7a8b9c0d1e2f",
"heartbeat_interval_s": 25
},
"type": "hello"
}{
"data": {
"expires_at": "2026-11-24T10:20:00Z",
"scopes": [
"chargers:read",
"chargers:control"
]
},
"id": "1",
"type": "authenticated"
}{
"data": {
"count": 2,
"topic": "chargers/live"
},
"id": "garage",
"type": "subscribed"
}{
"data": {
"reason": "requested"
},
"id": "garage",
"type": "unsubscribed"
}{
"data": {
"charger_id": "0f8d4c1e-7b5e-4a5e-9a51-3c1f0e8b2d47",
"connection": {
"last_seen_at": "2026-11-24T09:00:00Z",
"status": "online"
},
"evses": [
{
"allocation": null,
"id": 1,
"limit": {
"current_a": 16,
"power_w": null,
"set_by": "api"
},
"measurements": {
"current_a": {
"l1": 16,
"l2": 16.1,
"l3": 15.9
},
"energy_register_wh": 1523400,
"measured_at": "2026-11-24T10:15:30Z",
"power_w": 11040,
"soc_percent": null,
"voltage_v": null
},
"status": "charging",
"status_changed_at": "2026-11-24T09:30:00Z",
"transaction": {
"energy_wh": 5300,
"id": "8d3c2a90-51f7-4c1e-b7d2-6f0e9a4c3b18",
"started_at": "2026-11-24T09:30:00Z"
}
}
]
},
"id": "garage",
"type": "live"
}{
"data": {
"charger_id": "3b7e9a15-c2d4-4f86-8a0e-91d5f6c7b204"
},
"id": "garage",
"type": "removed"
}{
"data": 42,
"id": "p1",
"type": "pong"
}{
"type": "heartbeat"
}{
"data": {
"expires_at": "2026-11-24T10:20:00Z"
},
"type": "token_expiring"
}{
"data": {
"close_in_s": 10,
"reason": "server_stopping"
},
"type": "reconnect"
}{
"data": {
"code": "not-found",
"status": 404,
"title": "Not found",
"type": "https://developer.plugchoice.com/api/errors/not-found"
},
"id": "garage",
"type": "error"
}