Return all your created email campaigns

<Note> The response payload for this endpoint has changed You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns). </Note>

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Query parameters

typeenumOptional
Filter on the type of the campaigns
Allowed values:
statusenumOptional
Filter on the status of the campaign
statisticsenumOptional

Filter on type of the statistics required. Example globalStats value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the Get Campaign Report endpoint.

Allowed values:
startDatestringOptional

Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either ‘status’ not passed and if passed is set to ‘sent’ )

endDatestringOptional

Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either ‘status’ not passed and if passed is set to ‘sent’ )

limitlongOptionalDefaults to 50
Number of documents per page
offsetlongOptionalDefaults to 0
Index of the first document in the page
sortenumOptionalDefaults to desc

Sort the results in the ascending/descending order of record creation. Default order is descending if sort is not passed

Allowed values:
excludeHtmlContentbooleanOptional

Use this flag to exclude htmlContent from the response body. If set to true, htmlContent field will be returned as empty string in the response body

Response

Email campaigns informations
campaignslist of objects or null
countlong or null
Number of Email campaigns retrieved

Errors