Available APIs

Available APIs

A direct REST API and WebSocket API is also available, eliminating the necessity of installing an SDK. This option is valuable when no PUBQ client library SDK supports your chosen platform, or if you prefer to bypass a client library SDK due to resource limitations.

Using the REST API and WebSocket API directly is fully supported. However, we recommend that customers utilize the PUBQ SDKs, which support a range of platforms available on the PUBQ SDK Downloads page.

REST API

REST API domain:

rest.pubq.dev

REST protocol:

PUBQ REST only accepts SSL secured requests so you should use https://.

Endpoints

NameEndpointMethodAvailable VersionsNotes
Publish messagehttps://rest.pubq.dev/v1/channels/{channel}/messagesPOSTv1
Generate tokenhttps://rest.pubq.dev/v1/keys/tokensPOSTv1
Refresh tokenhttps://rest.pubq.dev/v1/keys/tokens/refreshPOSTv1
Revoke tokenhttps://rest.pubq.dev/v1/keys/tokens/revokePOSTv1

WebSocket API

Realtime connection domain:

realtime.pubq.dev

Connection protocol:

PUBQ Realtime only accepts SSL secured connections so you can use wss://.

Events

NameTypeEventDataFormatNotes
HandshakeSend#handshakeauthToken (default: null)JSON
PingReceiveserver pings client
PongSendclient pongs server
Basic authSend#basicAuthkeyJSON
SubscribeSend#subscribechannelJSON
PublishSend#publishchannel, dataJSON
NEXT PAGE
Authentication: Overview
Provides an overview of the authentication process.
Start Building with PUBQ
Sign up for free
No credit card required