Skip to content

The caller's own notification preferences

GET
/api/users/me/notifications
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).

The caller’s notification preferences

Media typeapplication/json
object
data
required
object
address

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.

string
detail_level
required

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.

string
Allowed values: simplified advanced simplified advanced simplified advanced simplified advanced simplified advanced simplified advanced
groups
required

Groups is every group the kinds are shown under, in page order.

Array<object>
object
description
required

Description is one sentence saying what the group’s kinds are about.

string
group
required

Group is the identifier kinds name in NotificationKindResponse.Group.

string
title
required

Title is the group’s heading.

string
kinds
required

Kinds is every notification the server knows how to send, in a stable order.

Array<object>
object
description
required

Description is the sentence explaining when this one fires.

string
enabled

Enabled is this user’s answer, or the kind’s default when they have never given one.

boolean
group
required

Group names the NotificationGroupResponse this kind is shown under.

string
kind
required

Kind is the stable identifier, the key the update body uses.

string
title
required

Title is the short label shown beside the toggle.

string
mail_enabled

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.

boolean
error
string

Example

{
"data": {
"detail_level": "simplified"
}
}

No valid session

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

The session has no user record

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}