Basics

Braze provides a high performance REST API to allow you to track users, send messages, export data, and more.

What is a REST API?

A REST API is a way to programmatically transfer information over the web using a predefined schema. Braze has created many different endpoints with specific requirements that will perform various actions and/or return various data. API access is done using HTTPS web requests to your company’s REST API endpoint. Typically this is https://rest.iad-01.braze.com, but your Success Manager will provide an alternative endpoint URL if necessary.

API Definitions

Below is some terminology that you may see in the Braze REST API documentation and what it means.

Endpoints

Braze manages a number of different instances for our Dashboard and REST Endpoints. When your account is provisioned you will log in to one of the corresponding URLs below. Use the correct REST Endpoint based on which instance you are provisioned to. If you are unsure, open a support ticket or use the table below to match the URL of the dashboard you use to the correct REST Endpoint.

Instance Dashboard URL REST Endpoint
US-01 https://dashboard.braze.com or
https://dashboard-01.braze.com
https://rest.iad-01.braze.com
US-02 https://dashboard-02.braze.com https://rest.iad-02.braze.com
US-03 https://dashboard-03.braze.com https://rest.iad-03.braze.com
US-04 https://dashboard-04.braze.com https://rest.iad-04.braze.com
US-06 https://dashboard-06.braze.com https://rest.iad-06.braze.com
EU-01 https://dashboard.braze.eu or
https://dashboard-01.braze.eu
https://rest.fra-01.braze.eu

Company Secret Explanation

The company_secret was formerly included with all API requests but has been deprecated as of October 2014. This field will be ignored for all future API requests to ensure backwards compatibility.

App Group REST API Keys

The api_key included in each request acts as an authentication key that allows your server code to utilize our REST APIs. Within your company, each app group will have a unique set of REST API Keys. They can be found within the Braze dashboard by navigating to the Developer Console section for each app group. To use the REST API for any given App Group, you must create keys and give them permissions.

REST API Keys

API Key Permissions

API Keys are used to authenticate an API call. When you create a new REST API Key, you need to give it access to specific endpoints. By assigning specific permissions to an API Key, you can limit exactly which calls an API Key is able to authenticate.

A good security practice is to assign a user only as much access as is necessary to complete his or her job: this principle can also be applied to API Keys by assigning permissions to each key. These permissions give you better security and control over the different areas of your account.

REST API Key Permissions

If accidental exposure of a key occurs, it can be deleted from the Developer Console. For help with this process, please open a support ticket.

API IP Whitelisting

For additional security, you can specify a whitelist of IP addresses and subnets which are allowed to make REST API requests for a given REST API Key. To whitelist specific IP addresses or subnets, add them to the API IP Whitelisting section when creating a new REST API Key:

API IP Whitelisting

Creating and Managing REST API Keys

To create a new REST API Key, visit the Developer Console on your Braze Dashboard. This page displays your existing API Keys. To create a new key, click the “Create New API Key” button.

Create New API Key

You will then be able to:

  • Give your new key a name for easy identification
  • Select which permissions you would like to be associated with your new key
  • Specify whitelisted IP addresses and subnets for the new key

Existing REST API Keys can be Viewed or Deleted by clicking the gear icon and selecting the corresponding option.

API Key Options

External User ID Explanation

The external_id serves as a unique user identifier for whom you are submitting data. This identifier should be the same as the one you set in the Braze SDK in order to avoid creating multiple profiles for the same user.

User Alias Object

An alias serves as an alternative unique user identifier. Use aliases to identify users along different dimensions than your core user ID:

  • Set a consistent identifier for analytics that will follow a given user both before and after they have logged in to a mobile app or website.
  • Add the identifiers used by a third party vendor to your Braze users in order to more easily reconcile your data externally.

Each alias consists of two parts: a name for the identifier itself, and a label indicating the type of alias. Users can have multiple aliases with different labels, but only one name per label.

1
2
3
4
{
  "alias_name" : (required, string),
  "alias_label" : (required, string)
}

Braze User ID Explanation

The braze_id serves as a unique user identifier that is set by Braze. This identifier can be used to delete users through the REST API in addition to external_ids.

For more information see:

API Limits

The Braze API infrastructure is designed to handle high volumes of data across our customer base. We enforce API rate limits in order to ensure responsible use of the API.

Initial API Rate Limit Value
Requests of any kind (this does not include the /users/track endpoint) 250,000 per hour
Requests to the Send endpoint specifying a Segment or Connected Audience 250 per minute
Users modified per User Track request 75 Events, 75 Purchases, and 75 Attributes per API call
Send Identifier Creation 100 per day

REST API rate limit increases are considered based on need for customers who are making use of the API batching capabilities. Please batch requests to our API endpoints:

  • A single request to the User Track endpoint can contain Purchases, Custom Events and/or Custom Attribute updates for up to 75 users, specified by external_id
  • A single request to the Messaging endpoints can reach any one of the following:
    • Up to 50 specific external_ids, each with individual message parameters
    • A segment of any size created in the Braze dashboard, specified by its segment_id
    • An ad-hoc audience segment of any size, defined in the request as a Connected Audience object

The response headers for any valid request include the current rate limit status:

Header Name Description
X-RateLimit-Limit The maximum number of requests that the consumer is permitted to make per hour.
X-RateLimit-Remaining The number of requests remaining in the current rate limit window.
X-RateLimit-Reset The time at which the current rate limit window resets in UTC epoch seconds.

If you have questions about API limits please contact your Customer Success Manager or please open a support ticket.

WAS THIS PAGE HELPFUL?