/api/qmail/local/identity/whoami

GET

Return the user's QMail email address and the basic identity-coin information held in memory by this server.

Description

This is the canonical "who am I?" call. The server picks an identity coin out of the Mail wallet at startup and exposes its serial number, denomination, the user's first/last name and description, and the auto-generated QMail email address derived from the serial number.

If no identity coin has been registered yet (the Mail wallet has no coins, or none of them are valid identity coins), the response sets registered: false and the message field explains.

Use this to display the user's address

Most clients call whoami once on startup to populate the "from" line in the compose view and the user-info area in the header.

Parameters

None.

Response

Registered identity (typical case)

{
  "command": "whoami",
  "success": true,
  "registered": true,
  "serial_number": 8189,
  "sn": 8189,
  "denomination": 1,
  "email": "JANE.SMITH.kilo@8189",
  "first_name": "Jane",
  "last_name": "Smith",
  "description": "",
  "class_name": "kilo",
  "class": "kilo",
  "beacon_raida": 11
}

No identity registered

{
  "command": "whoami",
  "success": true,
  "registered": false,
  "message": "No identity coin registered. Place a coin in the Mail wallet."
}

Response Fields

FieldTypeDescription
registeredbooltrue when an identity coin is loaded; false otherwise.
serial_number / snintThe identity coin's serial number. sn is a short alias for the same value.
denominationintDenomination class index (e.g. 1 = kilo).
emailstringThe user's QMail email address. Format: FIRST.LAST.classname@SN.
first_name, last_name, descriptionstringNames and free-form description from the identity coin.
class_name / classstringDenomination class name (e.g. kilo, milli).
beacon_raidaintIndex (0–24) of the RAIDA the beacon currently polls for this identity.

Errors

None — this endpoint always returns 200. An "unregistered" state is reported as registered: false, not as an HTTP error.

Examples

curl "http://localhost:8081/api/qmail/local/identity/whoami"
const r = await fetch('http://localhost:8081/api/qmail/local/identity/whoami').then(r => r.json());
if (r.registered) {
  console.log('Logged in as', r.email);
} else {
  console.warn('No identity yet:', r.message);
}
import requests
r = requests.get('http://localhost:8081/api/qmail/local/identity/whoami').json()
print(r['email'] if r['registered'] else r['message'])

Related Endpoints