API Overview

QPub exposes two public messaging surfaces plus a dashboard API for account management.

Hosts

APIBase URL
RESThttps://rest.qpub.io/v1
WebSocketwss://socket.qpub.io/v1

SDK defaults match these hosts (httpHost: "rest.qpub.io", wsHost: "socket.qpub.io").

When to use which

NeedUse
Subscribe to messagesWebSocket
Publish from a connected clientWebSocket or REST
Publish from a server / cronREST
Batch publish to many channelsREST
Issue JWTs / token requestsREST
Queues and workersREST
Manage projects and keysDashboard (UI)

Authentication (messaging APIs)

Both REST and WebSocket accept:

  1. API keyAuthorization: Basic <base64(publicId:secret)> or api_key query param
  2. JWTAuthorization: Bearer <token> or access_token query param

Optional alias can be sent as X-Alias (REST) or alias query param (Socket).

Details: Authentication.

REST capabilities

Public REST routes under /v1:

  • Token issue and token request
  • Publish to one or many channels
  • Queue config, jobs, pull/ack/nack, workers

Full list: REST API.

WebSocket capabilities

Connect to GET /v1 with auth credentials, then exchange JSON messages with numeric action codes (subscribe, publish, ping, …).

Full protocol: Socket Protocol.

Dashboard API

The dashboard uses a separate user-auth API (email/password or OAuth) for accounts, projects, API keys, usage, and billing. It is not used by Socket/REST messaging clients. See Dashboard.