Skip to content

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):

{
  "jsonrpc": "2.0",
  "method":  "get_config",
  "params":  [1, "addr"],
  "id":      1
}

Success:

{"jsonrpc":"2.0","result":"abc123@chat.privittytech.com","id":1}

Error (still HTTP 200):

{"jsonrpc":"2.0","error":{"code":-32603,"message":"…"},"id":1}

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_addrcreate_chat_by_contact_idsend_msg
Send file privitty_send_filesend_msg
List chats get_chatlist_entriesget_chatlist_items_by_entries
List messages get_message_idsget_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_file
  • privitty_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.


Further reading