Update alert preferences

PUT /accounts/{account_id}/alerts/{alert_id}/preferences

Updates preferences of an alert. In particular, it indicates the weight of an alert, that is, how important it is.

Parameters

  • account_id (string) - Id of the account
  • alert_id (number) - Id of the alert

Page content


Minimal curl example

curl -ig 'https://api.mention.net/api/accounts/{account_id}/alerts/{alert_id}/preferences' \
    -X PUT \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -H 'Accept-Version: 1.14' \
    -d '{"push_notification_frequency":"never"}'

As you see in the curl example, there is no minimal requirement in the PUT request in terms of attributes sent. Therefore, you can modify only a single parameter if you wish to.


Available properties

Any attribute returned by the get request can be updated.


Request example

  • Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept-Version: 1.14
  • Body
{
    "push_notification_frequency": "never",
    "weight": 1
}

Response example

If the request was successful, the response will return the full preferences data, just as if you did a GET request on these preferences.

  • Body
{
    "preferences": {
        "email_notification_frequency": "default",
        "push_notification_frequency": "never",
        "desktop_notification_frequency": "default",
        "trending_email_notification_frequency": "default",
        "trending_sms_notification_frequency": "default",
        "weight": 1
    }
}

All frequency attributes, that is email_notification_frequency, email_notification_frequency, etc... May vary in the future without special notice.

Email notification frequency

email_notification_frequency

Preferred settings concerning email notification frequency. For a list of email notification frequencies available, fetch the app/data, where there is a section about email notification frequencies

Push notification frequency

email_notification_frequency

Preferred settings concerning push notification frequency, that is, frequency for notification on mobile devices. For a list of push notification frequencies available, fetch the app/data, where there is a section about push notification frequencies

Desktop notification frequency

desktop_notification_frequency

Preferred settings concerning desktop notification frequency, that is, frequency for notifications on webapp and computer installed app. For a list of desktop notification frequencies available, fetch the app/data, where there is a section about desktop notification frequencies

Weight

weight

Weight of an alert, that is, how important it is in the alerts pool. In the webapp, we use this parameter to order alerts: the higher the weight, the higher in sidebar the alert will be.