Skip to content

May 2020

Google Tag Manager

Added documentation and examples of how to deploy and manage Braze’s Android SDK using Google Tag Manager.

New blacklist email API endpoint

You can now blacklist email addresses via the Braze API. Blacklisting an email address will unsubscribe the user from email and mark them as hard bounced.

API key change for Braze API endpoints

As of May 2020, Braze has changed how we read API keys to be more secure. Now API keys should be passed in as a request header. Examples can be found on individual endpoint pages under Example Request, as well as in the API Key Explanation.

Braze will continue to support the api_key being passed through the request body and URL parameters, but will eventually be sunset (TBD). Update your API calls accordingly. These changes have been updated within Postman.

API Key Explanation

This example uses the /email/hard_bounces endpoint.

Before: API Key in Request Body

1
curl --location --request GET 'https://rest.iad-01.braze.com/email/hard_bounces?api_key={YOUR_REST_API_KEY}&start_date=2019-01-01&end_date=2019-02-01&limit=100&offset=1&[email protected]' \

Now: API Key in Header

1
2
curl --location --request GET 'https://rest.iad-01.braze.com/email/hard_bounces?start_date=2019-01-01&end_date=2019-02-01&limit=100&offset=1&[email protected]' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

This example uses the /user/track endpoint.

Before: API Key in Request Body

1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl --location --request POST 'https://rest.iad-01.braze.com/users/track' \
--header 'Content-Type: application/json' \
--data-raw '{
	"api_key": YOUR-API-KEY-HERE ,
	"attributes": [ 
 	{
 	  "external_id":"user_id",
      "string_attribute": "sherman",
      "boolean_attribute_1": true,
      "integer_attribute": 25,
      "array_attribute": ["banana", "apple"]
    }
    ]
}'

Now: API Key in Header

1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl --location --request POST 'https://rest.iad-01.braze.com/users/track' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR-REST-API-KEY' \
--data-raw '{
	"attributes": [ 
 	{
	  "external_id":"user_id",
      "string_attribute": "sherman",
      "boolean_attribute_1": true,
      "integer_attribute": 25,
      "array_attribute": ["banana", "apple"]
    }
    ]
}'
HOW HELPFUL WAS THIS PAGE?
New Stuff!