Skip to content
GitmoapAPIBeta
Organizenotifications
GET/user/notifications/preferences

Read your notification preferences

get_my_notification_preferences
  • notification:read
    A token needs the notification:read scope: Read your notification preferences and the notifications sent to youGranted by read_api, write_api.Every operation this scope unlocks

How each kind of notification reaches you on each channel — in the app, as an item in your attention inbox, and by email — and when email may reach you: your time zone, your quiet hours and your digest. Every category is listed on every channel, with the default for any you have not changed, and says whether it can be turned off.

Responses

200Your notification preferencesapplication/json
  • preferencesarray of NotificationPreferenceOne entry per category and channel, whether you have changed it or not.
    • The NotificationPreference schema
    • categoryNotificationCategorygate_requestedgate_expiringescalationquestion_to_youmentiondigest_readybudget_thresholdritual_inviteWhat the notification is about.
    • channelNotificationChannelin_appemailWhere it reaches you.
    • modeNotificationModeimmediatedigestoffHow it reaches you there — your choice, or the category's default.
    • requiredbooleanWhether the category cannot be turned off.
  • settingsNotificationSettingsWhen email may reach you.
    • The NotificationSettings schema
    • digest_frequencyDigestFrequencyhourlydailyWhether digests are sent hourly or daily.
    • digest_hourinteger · int320–23The local hour, 0 to 23, a daily digest is sent at.
    • time_zoneTimeZoneName (string)The time zone your quiet hours and digest hour are in.
    • quiet_hoursQuietHours or nulloptionalHours in which email waits, unless what it reports cannot be turned off. Absent when email is never held back.
      • The QuietHours schema
      • from_hourinteger · int320–23The first quiet hour, 0 to 23, in your time zone.
      • until_hourinteger · int320–23The hour email may be sent again, 0 to 23, in your time zone. Differs from from_hour.
200 exampleSynthesized example
{
"preferences": [
{
"category": "gate_requested",
"channel": "in_app",
"mode": "immediate",
"required": false
}
],
"settings": {
"digest_frequency": "hourly",
"digest_hour": 7,
"time_zone": "time-zone-3fba",
"quiet_hours": {
"from_hour": 15,
"until_hour": 8
}
}
}
401Not authenticatedapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-4f5c",
"message": "Inline scalar newtypes but keep their brand"
}
}
403The caller is not a personapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-91ef",
"message": "Stream pipeline status into the run header"
}
}

CLI

gitmoap notifications get-my-notification-preferences