/api/qmail/local/identity/whoami
GETReturn 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.
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
| Field | Type | Description |
|---|---|---|
registered | bool | true when an identity coin is loaded; false otherwise. |
serial_number / sn | int | The identity coin's serial number. sn is a short alias for the same value. |
denomination | int | Denomination class index (e.g. 1 = kilo). |
email | string | The user's QMail email address. Format: FIRST.LAST.classname@SN. |
first_name, last_name, description | string | Names and free-form description from the identity coin. |
class_name / class | string | Denomination class name (e.g. kilo, milli). |
beacon_raida | int | Index (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
- /api/qmail/local/identity/get — Same data plus a computed
display_nameand a fallbackaddressfor unregistered identities. - /api/qmail/local/identity/exists — Cheap probe — does the Mail wallet have any coin file at all?
- /api/qmail/raida/identity/heal — Heal the identity coin's fracked RAIDA shares.