Admin API

Write fields from your backend, moderate, and push manifests — with the admin key.

Everything the Slash Socket app does to a server, your backend can do too: write fields as the owner (a value only the owner may set, a post from your CMS), clear things, remove connections. Every call carries the server's admin key as a bearer token. Keep that key on servers you control — never in a page.

PropTypeDescription
GET /admin/snapshot—The manifest, every field's full state, the connections, and counts.
POST /admin/op{ op, field, … }set · incr { by } · push · put { key } · drop { key } · send · remove { id } (a list item) · reset (a counter back to initial or { value }; a list or map cleared; a value back to initial) · kick { id, ban? } · ban { ip } · unban { ip }.
PUT /admin/manifestmanifest JSONSwitches the server to another manifest. Refused with 409 when SOCKET_MANIFEST pins it.

The page protocol, for clients in other languages: connect a WebSocket to /live and send JSON text frames. The first is a hello; the server answers with a welcome holding every readable field's state, then pushes changes.

PropTypeDescription
hellopage → server{ op: "hello", name?, avatar?, color?, token?, visitor? } — first, within 10 seconds.
set · incr · push · put · drop · sendpage → server{ op, field, value?, by?, ref? } — with a ref, the server answers ack { ref } or error { ref, code, message }.
pingpage → serverAnswered with pong.
welcomeserver → page{ id, you, server, fields: { name: { type, read, write, keep?, state? } } }
value · counter · push · remove · reset · put · dropserver → pageA stored field changed: { op, field, … }.
stream · join · member · leaveserver → pageA stream frame { from, value }; presence changes { member } or { id }.
goneserver → pageA connection closed: { id } — drop its stream frames.
close codes—4000 reconnect (the manifest changed) · 4001 token refused or sign-in required · 4003 removed by the owner · 4008 no hello · 4009 frame over 16 KB.