Get BrevoEmailCampaign - tsubotitsch/Brevo GitHub Wiki
Retrieves email campaigns based on specified filters.
Get-BrevoEmailCampaign [[-id] <Int32[]>] [[-name] <String[]>] [[-type] <String>] [[-status] <String>]
[[-statistics] <String>] [[-startDate] <String>] [[-endDate] <String>] [[-limit] <String>] [[-offset] <Int32>]
[[-sort] <String>] [[-excludeHtmlContent] <Boolean>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
The Get-BrevoEmailCampaign function retrieves email campaigns from the Brevo API based on various optional filters such as type, status, statistics, date range, and more.
Get-BrevoEmailCampaign -type "classic" -status "sent" -startDate "2023-01-01T00:00:00.000Z" -endDate "2023-01-31T23:59:59.999Z"
Retrieves all classic email campaigns that were sent in January 2023.
Get-BrevoEmailCampaign -statistics "globalStats" -limit 10 -offset 0 -sort "asc"
Retrieves the first 10 email campaigns sorted in ascending order, including only global statistics.
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' is not passed or if passed is set to 'sent'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Use this flag to exclude htmlContent from the response body. If set to true, htmlContent field will be returned as an empty string in the response body.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The ID(s) of the specific campaign to retrieve. If not specified, all campaigns are retrieved.
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Number of documents per page. Defaults to 50. Valid range is 0 to 100.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name(s) of the specific campaign to retrieve. If not specified, all campaigns are retrieved.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Index of the first document in the page. Defaults to 0.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Sort the results in the ascending/descending order of record creation. Default order is descending if sort is not passed.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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' is not passed or if passed is set to 'sent'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Filter on the type of statistics required. Valid values are "globalStats", "linkStats", and "statsByDomain". This option only returns data for events occurred in the last 6 months.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Filter on the status of the campaign. Valid values are "suspended", "archive", "sent", "queued", "draft", and "inProgress".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Filter on the type of the campaigns. Valid values are "classic" and "trigger".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.