Campaigns List Endpoint
/campaigns/list
This endpoint allows you to export a list of campaigns, each of which will include its name, Campaign API Identifier, whether it is an API Campaign, and Tags associated with the campaign. The campaigns are returned in groups of 100 sorted by time of creation (oldest to newest by default).
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 |
---|---|---|---|
page |
No | Integer | The page of campaigns to return, defaults to 0 (returns the first set of up to 100) |
include_archived |
No | Boolean | Whether or not to include archived campaigns, defaults to false |
sort_direction |
No | String | Pass in the value desc to sort by creation time from newest to oldest. Pass in asc to sort from oldest to newest. If sort_direction is not included, the default order is oldest to newest. |
last_edit.time[gt] |
No | Time | Filters the results and only returns campaigns that were edited greater than the time provided till NOW. Format is yyyy-MM-DDTHH:mm:ss |
Example URL
https:///campaigns/list?page=0&include_archived=false&sort_direction=desc
Example Request
1
2
curl --location --request GET 'https://rest.iad-01.braze.com/campaigns/list?page=0&include_archived=false&sort_direction=desc' \
--header 'Authorization: Bearer YOUR_REST_API_KEY'
Campaign List Endpoint API Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Content-Type: application/json
Authorization: Bearer YOUR_REST_API_KEY
{
"message": (required, string) the status of the export, returns 'success' when completed without errors,
"campaigns" : [
{
"id" : (string) Campaign API Identifier,
"last_edited": (ISO 8601 string) the last edited time for the message
"name" : (string) campaign name,
"is_api_campaign" : (boolean) whether the campaign is an API Campaign,
"tags" : (array) tag names associated with the campaign
},
...
]
}
For help with CSV and API exports, visit our troubleshooting article here.