List Available Content Blocks
/content_blocks/list
This endpoint will list your existing Content Blocks.
Looking for the api_key
parameter?
As of May 2020, Braze has changed how we read API keys to be more secure. Now API keys must be passed as a request header, please see YOUR_REST_API_KEY
within the Example Request below.
Braze will continue to support the api_key
being passed through the request body and URL parameters, but will eventually be sunset. Please update your API calls accordingly.
Request Parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
modified_after |
No | String in ISO 8601 | Retrieve only content blocks updated at or after the given time. |
modified_before |
No | String in ISO 8601 | Retrieve only content blocks updated at or before the given time. |
limit |
No | Positive Number | Maximum number of content blocks to retrieve, default to 100 if not provided, maximum acceptable value is 1000. |
offset |
No | Positive Number | Number of content blocks to skip before returning rest of the templates that fit the search criteria. |
Example URL
https://rest.iad-01.braze.com/content_blocks/list?modified_after=2020-01-01T01:01:01.000000&modified_before=2029-03-01T01:01:01.000000&limit=1&offset=0
Example Request
1
2
curl --location --request GET 'https://rest.iad-01.braze.com/content_blocks/list?modified_after=2020-01-01T01:01:01.000000&modified_before=2029-03-01T01:01:01.000000&limit=1&offset=0' \
--header 'Authorization: Bearer YOUR_REST_API_KEY'
Successful Response Properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
GET https://YOUR_REST_API_URL/content_blocks/list
Content-Type: application/json
Authorization: Bearer YOUR_REST_API_KEY
{
"count": "integer",
"content_blocks": [
{
"content_block_id": "string",
"name": "string",
"content_type": "html or text",
"liquid_tag": "string",
"inclusion_count" : integer,
"created_at": "time-in-iso",
"last_edited": "time-in-iso",
"tags" : "array of strings"
}
]
}
Possible Errors
-
Modified after time is invalid.
- The date you have provided is not a valid or parsable date. Please reformat this value as a string in ISO 8601 format (yyyy-mm-ddThh:mm:ss.ffffff
). -
Modified before time is invalid.
- The date you have provided is not a valid or parsable date. Please reformat this value as a string in ISO 8601 format (yyyy-mm-ddThh:mm:ss.ffffff
). -
Modified after time must be earlier than or the same as modified before time.
-
Content Block number limit is invalid.
- Thelimit
parameter must be an integer (positive number) greater than 0. -
Content Block number limit must be greater than 0.
- Thelimit
parameter must be an integer (positive number) greater than 0. -
Content Block number limit exceeds maximum of 1000.
- Thelimit
parameter must be an integer (positive number) greater than 0. -
Offset is invalid.
- Theoffset
parameter must be an integer (positive number) greater than 0. -
Offset must be greater than 0.
- Theoffset
parameter must be an integer (positive number) greater than 0.