Notifications

Notifications

Account related activity is presented as notifications from the API. The notifications are similar to activity feed that a user can consume and dismiss as needed.

The notification object

Each notification instance has the following fields

AttributesTypeDescription
idint

The unique ID of the notification object.

typestring

The type of notification. More details on each type can be found below.

is_dismissableboolean

Whether this notification dismissable by the end-user.

contextjson

Additional context for this notification. More information can be found below.

created_atstring

The timestamp when this instance was created.

updated_atstring

The timestamp when this instance was last updated.

dismissed_atstring

The timestamp of when this notification was dismissed. May be null.

In JSON format

{
    "id": 13,
    "type": "too_much_bandwidth_too_little_proxies",
    "is_dismissable": true,
    "context": {},
    "created_at": "2022-06-14T11:58:10.246406-07:00",
    "updated_at": "2022-06-14T11:58:10.246406-07:00",
    "dismissed_at": null,
}

Current supported notification types

The too_much_bandwidth_too_little_proxies type

This notification is triggered when a user has too much bandwidth and too little proxies. This notification type does not include a context.

The subscription_renew_failed type

This notification is triggered when a user failed to renew his subscription. This notification type includes a context with one parameter "effect" which can take three values:

  • null: For the first renew failed operation, with no further effect.
  • proxies_stopped_working: In the second faluire, the proxies will be stopped working.
  • converted_to_free_plan: In the third faluire, the subscription will be converted to free plan.

The projected_proxy_usage_over_80 type

This notification is triggered when a user reached 80 percent of projected bandwidth usage. This notification type includes one parameter "plan_limit" in the context. Which is the subscription's plan bandwidth limit.

The projected_proxy_usage_over_100 type

This notification is triggered when a user reached 100 percent of projected bandwidth usage. This notification type includes one parameter "plan_limit" in the context. Which is the subscription's plan bandwidth limit.

The high_concurrency_error type

This notification is triggered when a user subscription gets high concurrency errors. This notification type includes two parameters:

  • projected_bandwidth_gbs: the current projected bandwidth usage rate.
  • plan_limit: the subscription's plan bandwidth limit.

The 100_percent_bandwidth_used type

This notification is triggered when a user subscription reached %100 of bandwidth usage. This notification type does not include a context.

The question_is_added type

The user needs to answer account verification question. This notification type does not include a context.