How to configure notifications and notification templates in Azure API Management

APPLIES TO: Developer | Basic | Basic v2 | Standard | Standard v2 | Premium | Premium v2

API Management provides the ability to configure email notifications for specific events, and to configure the email templates that are used to communicate with the administrators and developers of an API Management instance. This article shows how to configure notifications for the available events, and provides an overview of configuring the email templates used for these events.

Prerequisites

If you don't have an API Management service instance, complete the following quickstart: Create an Azure API Management instance.

Go to your API Management instance

  1. In the Azure portal, search for and select API Management services.

    Select API Management services

  2. On the API Management services page, select your API Management instance.

    Select your API Management instance

Configure notifications in the portal

  1. In the left navigation of your API Management instance, select Notifications to view the available notifications.

    The following list of events can be configured for notifications.

    • Subscription requests (requiring approval) - The specified email recipients and users will receive email notifications about subscription requests for products requiring approval.
    • New subscriptions - The specified email recipients and users will receive email notifications about new product subscriptions.
    • BCC - The specified email recipients and users will receive email blind carbon copies of all emails sent to developers.
    • Close account message - The specified email recipients and users will receive email notifications when an account is closed.
    • Approaching subscription quota limit - The specified email recipients and users will receive email notifications when subscription usage gets close to usage quota.
  2. Select a notification, and specify one or more email addresses to be notified:

    • To add the administrator email address, select + Add admin.
    • To add another email address, select + Add email, enter an email address, and select Add.
    • Continue adding email addresses as needed.

    Screenshot showing how to add notification recipients in the portal

Configure notification templates

API Management provides notification templates for the administrative email messages that are sent automatically to developers when they access and use the service. The following notification templates are provided:

  • Application gallery submission approved (deprecated)
  • Developer farewell letter
  • Developer quota limit approaching notification
  • Developer welcome letter
  • Email change notification
  • Invite user
  • New comment added to an issue (deprecated)
  • New developer account confirmation
  • New issue received (deprecated)
  • New subscription activated
  • Password change confirmation
  • Subscription request declined
  • Subscription request received

Each email template has a subject in plain text, and a body definition in HTML format. Each item can be customized as desired.

Note

HTML content in a template must be well-formed and adhere to the XML specification. The   character isn't allowed.

To view and configure a notification template in the portal:

  1. In the left menu, select Notification templates. Screenshot of notification templates in the portal

  2. Select a notification template, and configure the template using the editor.

    Screenshot of notification template editor in the portal

    • The Parameters list contains a list of parameters, which when inserted into the subject or body, will be replaced by the designated value when the email is sent.
    • To insert a parameter, place the cursor where you wish the parameter to go, and select the parameter name.
  3. To save the changes to the email template, select Save, or to cancel the changes select Discard.

Configure email settings

You can modify general email settings for notifications that are sent from your API Management instance. You can change the administrator email address, the name of the organization sending notifications, and the originating email address.

Important

Changing the originating email address may affect recipients' ability to receive email. See the considerations in the following section.

To modify email settings:

  1. In the left menu, select Notification templates.
  2. Select E-mail settings.
  3. On the General email settings page, enter values for:
    • Administrator email - the email address to receive all system notifications and other configured notifications

    • Organization name - the name of your organization for use in the developer portal and notifications

    • Originating email address - The value of the From header for notifications from the API Management instance. API Management sends notifications on behalf of this originating address.

      Screenshot of API Management email settings in the portal

  4. Select Save.

Considerations for changing the originating email address

Recipients of email notifications from API Management could be affected when you change the originating email address.

  • Change to From address - When you change the originating email address (for example, to [email protected]), the From address header will be [email protected] [email protected]. This is because the email is being sent by API Management, and not the email server of the originating email address.

  • Email set to Junk or Spam folder - Some recipients may not receive the email notifications from API Management or emails may get sent to the Junk or Spam folder. This can happen depending on the organization's SPF or DKIM email authentication settings:

    • SPF authentication - Email might no longer pass SPF authentication after you change the originating email address domain. To ensure successful SPF authentication and delivery of email, create the following TXT record in the DNS database of the domain specified in the email address. For instance, if the email address is [email protected], contact the administrator of contoso.com to add the following TXT record: "v=spf1 include:spf.protection.outlook.com include:_spf-ssg-a.microsoft.com -all"

    • DKIM authentication - To generate a valid signature for DKIM for email authentication, API Management requires the private key associated with the domain of the originating email address. However, it is currently not possible to upload this private key in API Management. Therefore, to assign a valid signature, API Management uses the private key associated with the mail.windowsazure.com domain.

Next steps