Uplink Developer docs Get Uplink
APIs

API overview and Postman

The two APIs, how each is reached and signed, and a Postman collection of both.

Uplink has two APIs. The app's API controls one running app: its conversations, plugins, other networks and screens. The relay server's API is what every app speaks to the server that carries messages between them. Both are documented in full here, and both are in one Postman collection.

The Postman collection

ghost-messaging.postman_collection.json (Postman's v2.1 format; Insomnia, Bruno and others read it too). In Postman: Import, then choose the file or paste its address, https://gogho.st/docs/api/ghost-messaging.postman_collection.json.

It holds every method of the app's API and every HTTP route of the relay, each with its parameters described and an example body. It is made from the same lists these pages are drawn from, so it matches them. Set its variables before the first call:

VariableStarts asWhat it is
apphttp://127.0.0.1:8765Where the app serves its API (Turn it on).
tokenemptyThe app's token, from Settings › API › Copy the token. Sent as Authorization: Bearer on every app request.
relayhttps://gogho.stThe relay server. Your own, if you run one.
filesTokenemptyA Files space's token, for the Files routes.
ghostKey, ghostTime, ghostSigemptyThe signing headers of a signed relay route (below).

The hub and the pairing channels are WebSockets with binary frames, which a collection of HTTP requests can't hold. They are written out in The hub and pairing protocols.

The app's API

WhereOn the device, http://127.0.0.1:8765 (the port can be changed); on your network too where allowed; from anywhere through the relay, sealed.
Who may callWhoever holds the token (HTTP) or the connection string (through the relay). Off until turned on in developer mode.
ShapePOST /api/<method> with the parameters as a JSON object. Answers {"ok": true, "result": …} or {"ok": false, "error": {"code", "message"}}.
ReferenceApp API: every method.

The relay server's API

Wherehttps://gogho.st, or any server running relay/.
Who may callAnyone, for what is public (the Marketplace's catalog). A Files space's routes need its token. Routes that change something are signed with an install's key.
ShapePlain HTTP with JSON or raw bytes, for files, the Marketplace and feedback. WebSockets for the hub and pairing.
ReferenceRelay server API (HTTP) and The hub and pairing protocols (WebSocket).

What the relay can and can't see

The relay is built to carry what it can't read. Packets, rooms' chat, calls' setup, files and account backups are sealed on the device with keys the server never holds. It sees which installs connect, which talk to which, when, and how much. It knows an install by a name made from its public key, and keeps usernames, linked handles and numbers as hashes. Privacy and safety says the same for people who aren't reading the source.

Something wrong or missing here? Tell us in the Alpha testers circle, or at the app's GitHub.