API Overview¶
Daemon: privitty-edged
Default base URL: http://127.0.0.1:7200
Transport: HTTP/1.1
Every privitty-edge CLI command is a thin wrapper over the HTTP API described here. Integrate from any language that can make HTTP requests — curl, Python, Go, C#, etc.
Architecture¶
Your application ──HTTP POST /rpc──► privitty-edged ──► encrypted transport
│
GET /events (SSE)
GET /health
| Concept | Value |
|---|---|
| Account ID | Always 1 on edge devices |
| Auth | None on /rpc — bind to localhost or protect with network policy |
| Format | JSON-RPC 2.0 over HTTP |
HTTP endpoints¶
| Method | Path | Purpose |
|---|---|---|
POST |
/rpc |
JSON-RPC gateway — all automation commands |
GET |
/events |
Server-Sent Events — real-time push stream |
GET |
/health |
Liveness probe |
POST |
/auth |
Viewer session token (requires privitty-viewer) |
GET |
/stream/:msg_id |
Decrypted file stream (requires viewer token) |
Detailed reference: HTTP Endpoints
JSON-RPC basics¶
All /rpc calls use JSON-RPC 2.0 with positional parameters (array):
Success:
Error (still HTTP 200):
Full method reference: JSON-RPC Methods
Common operations map¶
| Task | Primary method(s) |
|---|---|
| Health check | GET /health |
| Account address | get_config(1, "addr") |
| Invite peer | get_chat_securejoin_qr_code(1, null) |
| Join peer | secure_join(1, link) |
| Send text | lookup_contact_id_by_addr → create_chat_by_contact_id → send_msg |
| Send file | privitty_send_file → send_msg |
| List chats | get_chatlist_entries → get_chatlist_items_by_entries |
| List messages | get_message_ids → get_messages |
| Revoke file access | privitty_revoke_file_access |
| Real-time events | GET /events (SSE) |
Copy-paste curl commands: Curl Cookbook
License-gated methods¶
These Privitty operations require an active license (privitty.lic):
privitty_send_file,privitty_send_group_fileprivitty_revoke_file_access- Other
privitty_*handshake and send methods
Without a license, gated calls return:
{
"error": {
"code": -32001,
"message": "Privitty license required: status is 'no_license'. Run `privitty-edge license activate <url>` to install or renew."
}
}
Infrastructure methods (get_config, get_info, health, etc.) always work. See License Management.