emailCampaigns

Get an email campaign report

Retrieve detailed information about a specific email campaign by its ID, including recipients, statistics, and HTML content. Use the statistics query parameter to select which statistics to include (globalStats, linksStats, statsByDomain, statsByDevice, or statsByBrowser); statsByDevice and statsByBrowser are only available on this single-campaign endpoint. You can exclude HTML content from the response by setting excludeHtmlContent to true.

get/emailCampaigns/{campaignId}

Request

  • Base URL: https://api.brevo.com/v3
  • URL: https://api.brevo.com/v3/emailCampaigns/{campaignId}
  • Auth: API key in header api-key

Path parameters

campaignIdinteger required

Id of the campaign

Query parameters

statistics'globalStats' | 'linksStats' | 'statsByDomain' | 'statsByDevice' | 'statsByBrowser'

Filter on the type of statistics required. Example: globalStats value will only fetch globalStats info of the campaign in the returned response. statsByDevice and statsByBrowser are only available when retrieving a single campaign (not in the list endpoint).

excludeHtmlContentboolean

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 campaign information

attachmentFilestring

Url of the attachment file. Only available if the campaign has an attachment.

abTestingboolean

Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.

idinteger required

ID of the campaign

namestring required

Name of the campaign

previewTextstring

Preview text or preheader of the email campaign

scheduledAtstring

UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)

sendAtBestTimeboolean

It is true if you have chosen to send your campaign at best time, otherwise it is false

splitRuleinteger

The size of your ab-test groups. Only available if abTesting flag of the campaign is true

status'draft' | 'sent' | 'archive' | 'queued' | 'suspended' | 'in_process' | 'in_review' | 'cancelling' | 'cancelled' required

Status of the campaign

subjectstring

Subject of the campaign. Only available if abTesting flag of the campaign is false

subjectAstring

Subject A of the ab-test campaign. Only available if abTesting flag of the campaign is true

subjectBstring

Subject B of the ab-test campaign. Only available if abTesting flag of the campaign is true

type'classic' | 'trigger' required

Type of campaign

winnerCriteriastring

Criteria for the winning version. Only available if abTesting flag of the campaign is true

winnerDelayinteger

The duration of the test in hours at the end of which the winning version will be sent. Only available if abTesting flag of the campaign is true

attachmentUrlstring

URL of the attachment file associated with the campaign. Empty string if no attachment is present.

createdAtstring required

Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)

footerstring required

Footer of the campaign

headerstring required

Header of the campaign

htmlContentstring required

HTML content of the campaign

inlineImageActivationboolean

Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.

mirrorActiveboolean

Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign

modifiedAtstring required

UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)

recurringboolean

FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times

replyTostring email required

Email defined as the "Reply to" of the campaign

returnBounceinteger

Total number of non-delivered campaigns for a particular campaign id.

sentDatestring

Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'

shareLinkstring

Link to share the campaign on social media. For trigger campaigns, this returns a descriptive message instead of a URL. For classic campaigns that have not been sent, this also returns a descriptive message.

tagstring

Tag of the campaign

tagsstring[]

List of tags of the campaign

testSentboolean required

Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent)

toFieldstring

Customisation of the "to" field of the campaign

utmCampaignValuestring

The utm_campaign value applied to the campaign's tracking links. Falls back to your account's global UTM settings when no custom value was set on the campaign, or the campaign name if neither is configured. Only returned when UTM tracking is enabled on the campaign.

utmContentstring

The utm_content value applied to the campaign's tracking links. Falls back to your account's global UTM settings when no custom value was set on the campaign. Only returned when UTM tracking is enabled on the campaign and a value is set at one of these levels.

utmIDinteger

Legacy numeric utm_id value applied to the campaign's tracking links. Present only when UTM tracking is enabled on the campaign and the resolved utm_id is numeric (typically the campaign's ID). For customer-supplied non-numeric values (for example promo_042), read utmId (string) instead. Kept for backward compatibility.

utmIdstring

The utm_id value applied to the campaign's tracking links, returned verbatim as a string. Falls back to your account's global UTM settings when no custom value was set on the campaign. Only returned when UTM tracking is enabled on the campaign and a value is set at one of these levels. Preferred field for new consumers — covers both numeric IDs and customer-supplied non-numeric strings.

utmMediumstring

The utm_medium value applied to the campaign's tracking links. Falls back to your account's global UTM settings when no custom value was set on the campaign, or the default email if neither is configured. Case is preserved verbatim. Only returned when UTM tracking is enabled on the campaign.

utmSourcestring

The utm_source value applied to the campaign's tracking links. Falls back to your account's global UTM settings when no custom value was set on the campaign, or the account default (brevo or sendinblue) if neither is configured. Case is preserved verbatim. Only returned when UTM tracking is enabled on the campaign.

utmTermstring

The utm_term value applied to the campaign's tracking links. Falls back to your account's global UTM settings when no custom value was set on the campaign. Only returned when UTM tracking is enabled on the campaign and a value is set at one of these levels.

Changes

No recorded changes to this operation across all 1 revision of this API.