Skip to content

API usage alerts

API usage alerts provide critical visibility into your API usage, allowing you to proactively detect unexpected traffic. By setting up these alerts to track key API request volumes, you can receive real-time notifications and address problems before they impact your marketing campaigns.

About API usage alerts

You can use API usage alerts to monitor request volumes for the following categories:

Creating an API usage alert

To create an API usage alert:

  1. Go to Settings > APIs and Identifiers > API Usage Alerts, then create a new alert.
  2. Enter a name for your alert and choose the REST API endpoints and API keys you’d like to be alerted for.
  3. Define your alert criteria by choosing one or more response codes and specifying the alert thresholds.
  4. When you’re finished, toggle Alert enabled. An example of an API usage alert that sends notifications when the Track users endpoint increases by 100 percent within one hour.

Alert thresholds

When you define your alert criteria you can adjust the following thresholds:

Setting up alert notifications

You can set up an email alert, a webhook alert or both. Webhook alerts can be very useful for use cases such as sending an alert to external platforms, such as a Slack channel. For an example, see our documentation on integrating alerts with Slack for our notification preferences.

An email will be sent to the selected email when the criteria for the alert is reached.

Sample payload

The following is a sample payload for the body of an API Usage Alert webhook.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "data": {
    "alert_name": "My First API Usage Alert",
    "alert_type": "API Usage Alert",
    "alert_criteria": [
    	"response_codes": ["201", "202", "203"],
    	"threshold_condition: "Increased by %",
    	"threshold_volume": 50,
    	"within": "1 day"
    	],
    "timeframe_start": 2025-03-20T15:35:00Z,
    "timeframe_end": 2025-03-20T16:35:00Z,
    "volume": 1500,
    "previous_timeframe_start": 2025-03-20T14:35:00Z,
    "previous_timeframe_end": 2025-03-20T15:35:00Z,
    "previous_volume": 1000
  },
  "text": "Your My First API Usage Alert alert has triggered. You can view your alert and usage here: <link>. Note that this alert will reset in 1 day, as each alert will only send one notification per 8 hours."
}

Example alerts

Here are some ways to set up your API usage alert configurations to be notified in the following scenarios.

You can set up alerts to monitor the general health of your API. For example, you can set up these alerts when API errors increase drastically, such as 20% from the previous hour.

Be alerted when your workspace reaches its rate limit for /users/track endpoint. You can also apply this configuration for other Braze endpoints.

This alert configuration notifies you when errors occur for API triggered campaigns and Canvases, some of which may be high-priority.

Use the following alert configuration to be alerted when a partner integration stops sending data to Braze.

Considerations

  • Each active alert will only send an email or webhook notification once every 8 hours. This is to prevent too many notifications from a single alert. If your alert is notifying you prematurely, consider editing the alert criteria to better match your use case.
  • You can have up to 10 alerts per workspace.
HOW HELPFUL WAS THIS PAGE?
New Stuff!