- Docs
- Getting Started
- API Overview
API Overview
QPub exposes two public messaging surfaces plus a dashboard API for account management.
Hosts
| API | Base URL |
|---|---|
| REST | https://rest.qpub.io/v1 |
| WebSocket | wss://socket.qpub.io/v1 |
SDK defaults match these hosts (httpHost: "rest.qpub.io", wsHost: "socket.qpub.io").
When to use which
| Need | Use |
|---|---|
| Subscribe to messages | WebSocket |
| Publish from a connected client | WebSocket or REST |
| Publish from a server / cron | REST |
| Batch publish to many channels | REST |
| Issue JWTs / token requests | REST |
| Queues and workers | REST |
| Manage projects and keys | Dashboard (UI) |
Authentication (messaging APIs)
Both REST and WebSocket accept:
- API key —
Authorization: Basic <base64(publicId:secret)>orapi_keyquery param - JWT —
Authorization: Bearer <token>oraccess_tokenquery 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.
Previous
Choose an SDK
Next
Authentication