The caller's own notification preferences
const url = 'https://example.com/api/users/me/notifications';const options = {method: 'GET', headers: {'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/users/me/notifications \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'Every notification kind this server knows how to send, with the caller’s answer for each. Kinds the caller has never answered report the kind’s own default. Also reports whether the server is configured to send mail at all, the address it would send to, and how much each message carries (the email detail level).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The caller’s notification preferences
object
object
Address is where notifications would be sent, from the users table. Empty when the identity provider releases no email claim — the other reason nothing arrives, and equally worth showing.
DetailLevel is how much of the covered pages this person sees: “simplified” or “advanced”. Stored on the server so it follows the person between browsers; the email level is separate and travels with the notification preferences.
Groups is every group the kinds are shown under, in page order.
object
Description is one sentence saying what the group’s kinds are about.
Group is the identifier kinds name in NotificationKindResponse.Group.
Title is the group’s heading.
Kinds is every notification the server knows how to send, in a stable order.
object
Description is the sentence explaining when this one fires.
Enabled is this user’s answer, or the kind’s default when they have never given one.
Group names the NotificationGroupResponse this kind is shown under.
Kind is the stable identifier, the key the update body uses.
Title is the short label shown beside the toggle.
MailEnabled reports whether the server can send mail at all. False means the toggles are still recorded but nothing is delivered, which the page says out loud rather than leaving the user to infer.
Example
{ "data": { "detail_level": "simplified" }}No valid session
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}The session has no user record
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}