Skip to Content

UpdateNotificationPreference

PATCH
/auth/v1/notifications/{org_id}/preferences

Authorization

headerX-API-Key<token>

API key for protected endpoints, supplied in the X-API-Key header.

Path Parameters

org_id*org_id

Request Body

required
application/json
{
  "type": "object",
  "properties": {
    "category": {
      "title": "category",
      "$ref": "#/components/schemas/auth.v1.NotificationCategory",
      "$ref-value": {
        "type": "string",
        "title": "NotificationCategory",
        "enum": [
          "NOTIFICATION_CATEGORY_UNSPECIFIED",
          "NOTIFICATION_CATEGORY_USAGE",
          "NOTIFICATION_CATEGORY_PAYMENT"
        ]
      }
    },
    "email_enabled": {
      "type": "boolean",
      "title": "email_enabled"
    }
  },
  "title": "UpdateNotificationPreferenceRequest",
  "additionalProperties": false
}
category?unknown
email_enabled?boolean

Response Body

200application/json

Success

type: unknown

{
  "$ref": "#/components/schemas/auth.v1.NotificationPreference",
  "$ref-value": {
    "type": "object",
    "properties": {
      "category": {
        "title": "category",
        "$ref": "#/components/schemas/auth.v1.NotificationCategory",
        "$ref-value": {
          "type": "string",
          "title": "NotificationCategory",
          "enum": [
            "NOTIFICATION_CATEGORY_UNSPECIFIED",
            "NOTIFICATION_CATEGORY_USAGE",
            "NOTIFICATION_CATEGORY_PAYMENT"
          ]
        }
      },
      "email_enabled": {
        "type": "boolean",
        "title": "email_enabled"
      },
      "locked": {
        "type": "boolean",
        "title": "locked",
        "description": "locked is true when the caller's role cannot disable the category."
      },
      "always_sent": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "title": "always_sent",
        "description": "always_sent lists the notices in this category the caller receives even with email disabled."
      }
    },
    "title": "NotificationPreference",
    "additionalProperties": false
  }
}
default
curl -X PATCH 'https://api.rixl.com/auth/v1/notifications/string/preferences'

Success

application/json

{
  "$ref": "#/components/schemas/auth.v1.NotificationPreference",
  "$ref-value": {
    "type": "object",
    "properties": {
      "category": {
        "title": "category",
        "$ref": "#/components/schemas/auth.v1.NotificationCategory",
        "$ref-value": {
          "type": "string",
          "title": "NotificationCategory",
          "enum": [
            "NOTIFICATION_CATEGORY_UNSPECIFIED",
            "NOTIFICATION_CATEGORY_USAGE",
            "NOTIFICATION_CATEGORY_PAYMENT"
          ]
        }
      },
      "email_enabled": {
        "type": "boolean",
        "title": "email_enabled"
      },
      "locked": {
        "type": "boolean",
        "title": "locked",
        "description": "locked is true when the caller's role cannot disable the category."
      },
      "always_sent": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "title": "always_sent",
        "description": "always_sent lists the notices in this category the caller receives even with email disabled."
      }
    },
    "title": "NotificationPreference",
    "additionalProperties": false
  }
}