Tyk Portal: Events and Notifications

Tyk enables you to actively monitor both user quotas. The machinery that manages these active notifications is the same as webhooks and provides an easy way to notify your stakeholders, your own organisation or the API end user when certain thresholds have been reached for their token.

Tyk cloud users

Monitors are disabled by default in Tyk cloud. Portal events are enabled and can be defined by raising a support ticket.

enable_trigger_monitors: Set to true to have the monitors start to measure quota thresholds.

configuration: A webhook configuration object, please see the webhooks documentation for details.

global_trigger_limit: This is the global trigger threshold and will be applied to all tokens being measured. This number is a percentage of the quota that the user must reach before the notification is triggered.

monitor_user_keys: Set to true to monitor individual tokens, this may result in a large amount of webhooks.

monitor_org_keys: Set to true to have global organisation quotas monitored.

Setting custom triggers on a per key or a per-organisation basis

Sometimes you will not want to have every user have a trigger event at the same levels, you can set manual trigger levels by adding a monitor section to the Session Object that defines a keys access details, this can also be added to the session object of an organisation ID:

"monitor": {
"trigger_limits": [80.0, 60.0, 50.0]
}

The trigger limits should be in descending order and represent the percentage of the quota that must be reached in order for the trigger to be fired.

Webhook data

If the event is triggered by an organisation, then the key field will be empty, if it is an auth token, then the key field will have raw representation of the token that caused the quota trigger to fire.

Portal Events

Tyk Dashboard and the Portal now support email notifications powered by Mandrill, Sendgrid, Mailgun and Amazon SES.

How email notifications work.

If you have enabled email notifications, the Portal will attempt to send notifications regarding a user’s sign-up status or key request status to their username email-address. These templates can be found in the portal/email_templates folder.

The templates are twofold, text-only and HTML, please see the standard included ones to see the various template fields that can be customised.

Extra Portal Events

The Dashboard and Portal also support a certain level of events that you can use to notify your systems of various things that have happened in the Portal.

To configure them, add an event_options section to an Organisation document when you are creating them (see the Dashboard REST API documentation to see how to create an Organisation record using the API).

Within this object, you can then register either webhooks or an email address to notify when an event occurs:

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.