> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.brevo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.brevo.com/_mcp/server.

# Get an email campaign report

GET https://api.brevo.com/v3/emailCampaigns/{campaignId}

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.

Reference: https://developers.brevo.com/reference/get-email-campaign

## Authentication

- `api-key` header (required) — The API key should be passed in the request headers as `api-key` for authentication.

## Request

### Path parameters

- `campaignId` (long, required) — Id of the campaign

### Query parameters

- `statistics` (enum, optional) — 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).
  - Allowed values: `globalStats`, `linksStats`, `statsByDomain`, `statsByDevice`, `statsByBrowser`
- `excludeHtmlContent` (boolean, optional) — 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

### 200

Email campaign information

- `id` (long, required) — ID of the campaign
- `name` (string, required) — Name of the campaign
- `status` (enum, required) — Status of the campaign
  - Allowed values: `draft`, `sent`, `archive`, `queued`, `suspended`, `in_process`, `in_review`, `cancelling`, `cancelled`
- `type` (enum, required) — Type of campaign
  - Allowed values: `classic`, `trigger`
- `createdAt` (string, required) — Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
- `footer` (string, required) — Footer of the campaign
- `header` (string, required) — Header of the campaign
- `htmlContent` (string, required) — HTML content of the campaign
- `modifiedAt` (string, required) — UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
- `replyTo` (string, required) — Email defined as the "Reply to" of the campaign
- `sender` (object, required)
  - `email` (string, optional) — Sender email of the campaign
  - `id` (long, optional) — Sender id of the campaign
  - `name` (string, optional) — Sender name of the campaign
- `testSent` (boolean, required) — Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent)
- `recipients` (object, required)
  - `exclusionLists` (list of long, required)
  - `lists` (list of long, required)
  - `excludedSegments` (list of long, optional) — Segment IDs excluded from the campaign
  - `segments` (list of long, optional) — Segment IDs included in the campaign
- `statistics` (object, required)
  - `campaignStats` (list of object, required) — List-wise statistics of the campaign.
    - `appleMppOpens` (long, required, nullable) — Numbers of times your email has been opened automatically through Apple MPP.
    - `clickers` (long, required, nullable) — Number of total clicks for the campaign
    - `complaints` (long, required, nullable) — Number of complaints (Spam reports) for the campaign
    - `delivered` (long, required, nullable) — Number of delivered emails for the campaign
    - `hardBounces` (long, required, nullable) — Number of hard bounces for the campaign
    - `opensRate` (float, required, nullable) — Percentage of recipients who open the email out of your total number of recipients. Depending on your Campaign settings, they may include Apple MPP opens.
    - `sent` (long, required, nullable) — Number of sent emails for the campaign
    - `softBounces` (long, required, nullable) — Number of softbounce for the campaign
    - `trackableViews` (long, required, nullable) — Recipients without any privacy protection option enabled in their email email client
    - `uniqueClicks` (long, required, nullable) — Number of unique clicks for the campaign
    - `uniqueViews` (long, required, nullable) — Number of unique openings for the campaign
    - `unsubscriptions` (long, required, nullable) — Number of unsubscription for the campaign
    - `viewed` (long, required, nullable) — Number of openings for the campaign
    - `deferred` (long, optional) — Number of deferred emails for the campaign
    - `estimatedViews` (long, optional) — Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails
    - `listId` (long, optional) — List Id of email campaign (only in case of get email campaign(s)(not for global stats))
    - `returnBounce` (long, optional) — Total number of non-delivered campaigns for a particular campaign id.
    - `trackableViewsRate` (float, optional) — Rate of recipients without any privacy protection option enabled in their email client
  - `globalStats` (object, required) — Overall statistics of the campaign
    - `appleMppOpens` (long, required, nullable) — Numbers of times your email has been opened automatically through Apple MPP.
    - `clickers` (long, required, nullable) — Number of total clicks for the campaign
    - `complaints` (long, required, nullable) — Number of complaints (Spam reports) for the campaign
    - `delivered` (long, required, nullable) — Number of delivered emails for the campaign
    - `hardBounces` (long, required, nullable) — Number of hard bounces for the campaign
    - `opensRate` (float, required, nullable) — Percentage of recipients who open the email out of your total number of recipients. Depending on your Campaign settings, they may include Apple MPP opens.
    - `sent` (long, required, nullable) — Number of sent emails for the campaign
    - `softBounces` (long, required, nullable) — Number of softbounce for the campaign
    - `trackableViews` (long, required, nullable) — Recipients without any privacy protection option enabled in their email email client
    - `uniqueClicks` (long, required, nullable) — Number of unique clicks for the campaign
    - `uniqueViews` (long, required, nullable) — Number of unique openings for the campaign
    - `unsubscriptions` (long, required, nullable) — Number of unsubscription for the campaign
    - `viewed` (long, required, nullable) — Number of openings for the campaign
    - `deferred` (long, optional) — Number of deferred emails for the campaign
    - `estimatedViews` (long, optional) — Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails
    - `listId` (long, optional) — List Id of email campaign (only in case of get email campaign(s)(not for global stats))
    - `returnBounce` (long, optional) — Total number of non-delivered campaigns for a particular campaign id.
    - `trackableViewsRate` (float, optional) — Rate of recipients without any privacy protection option enabled in their email client
  - `linksStats` (map from string to long, required) — Statistics about the number of clicks for each link in the campaign. Keys are the link URLs, values are click counts. Only populated when the `statistics` query parameter is set to `linksStats`.
  - `mirrorClick` (long, required) — Number of clicks on mirror link
  - `remaining` (long, required) — Number of remaining emails to send
  - `statsByBrowser` (map from string to object, optional) — Statistics of the campaign grouped by browser. Only available when retrieving a single campaign with the `statistics` query parameter set to `statsByBrowser`.
    - `clickers` (long, required) — Number of total clicks for the campaign using the particular browser
    - `uniqueClicks` (long, required) — Number of unique clicks for the campaign using the particular browser
    - `uniqueViews` (long, required) — Number of unique openings for the campaign using the particular browser
    - `viewed` (long, required) — Number of openings for the campaign using the particular browser
  - `statsByDevice` (object, optional)
    - `desktop` (map from string to object, optional) — Statistics of the campaign on the basis of desktop devices
      - `clickers` (long, required) — Number of total clicks for the campaign using the particular browser
      - `uniqueClicks` (long, required) — Number of unique clicks for the campaign using the particular browser
      - `uniqueViews` (long, required) — Number of unique openings for the campaign using the particular browser
      - `viewed` (long, required) — Number of openings for the campaign using the particular browser
    - `mobile` (map from string to object, optional) — Statistics of the campaign on the basis of mobile devices
      - `clickers` (long, required) — Number of total clicks for the campaign using the particular browser
      - `uniqueClicks` (long, required) — Number of unique clicks for the campaign using the particular browser
      - `uniqueViews` (long, required) — Number of unique openings for the campaign using the particular browser
      - `viewed` (long, required) — Number of openings for the campaign using the particular browser
    - `tablet` (map from string to object, optional) — Statistics of the campaign on the basis of tablet devices
      - `clickers` (long, required) — Number of total clicks for the campaign using the particular browser
      - `uniqueClicks` (long, required) — Number of unique clicks for the campaign using the particular browser
      - `uniqueViews` (long, required) — Number of unique openings for the campaign using the particular browser
      - `viewed` (long, required) — Number of openings for the campaign using the particular browser
    - `unknown` (map from string to object, optional) — Statistics of the campaign on the basis of unknown devices
      - `clickers` (long, required) — Number of total clicks for the campaign using the particular browser
      - `uniqueClicks` (long, required) — Number of unique clicks for the campaign using the particular browser
      - `uniqueViews` (long, required) — Number of unique openings for the campaign using the particular browser
      - `viewed` (long, required) — Number of openings for the campaign using the particular browser
  - `statsByDomain` (map from string to object, optional) — Statistics of the campaign grouped by email domain. Only populated when the `statistics` query parameter is set to `statsByDomain`.
    - `appleMppOpens` (long, required, nullable) — Numbers of times your email has been opened automatically through Apple MPP.
    - `clickers` (long, required, nullable) — Number of total clicks for the campaign
    - `complaints` (long, required, nullable) — Number of complaints (Spam reports) for the campaign
    - `delivered` (long, required, nullable) — Number of delivered emails for the campaign
    - `hardBounces` (long, required, nullable) — Number of hard bounces for the campaign
    - `opensRate` (float, required, nullable) — Percentage of recipients who open the email out of your total number of recipients. Depending on your Campaign settings, they may include Apple MPP opens.
    - `sent` (long, required, nullable) — Number of sent emails for the campaign
    - `softBounces` (long, required, nullable) — Number of softbounce for the campaign
    - `trackableViews` (long, required, nullable) — Recipients without any privacy protection option enabled in their email email client
    - `uniqueClicks` (long, required, nullable) — Number of unique clicks for the campaign
    - `uniqueViews` (long, required, nullable) — Number of unique openings for the campaign
    - `unsubscriptions` (long, required, nullable) — Number of unsubscription for the campaign
    - `viewed` (long, required, nullable) — Number of openings for the campaign
    - `deferred` (long, optional) — Number of deferred emails for the campaign
    - `estimatedViews` (long, optional) — Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails
    - `listId` (long, optional) — List Id of email campaign (only in case of get email campaign(s)(not for global stats))
    - `returnBounce` (long, optional) — Total number of non-delivered campaigns for a particular campaign id.
    - `trackableViewsRate` (float, optional) — Rate of recipients without any privacy protection option enabled in their email client
- `attachmentFile` (string, optional) — Url of the attachment file. Only available if the campaign has an attachment.
- `abTesting` (boolean, optional) — Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
- `previewText` (string, optional) — Preview text or preheader of the email campaign
- `scheduledAt` (string, optional) — UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
- `sendAtBestTime` (boolean, optional) — It is true if you have chosen to send your campaign at best time, otherwise it is false
- `splitRule` (integer, optional) — The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
- `subject` (string, optional) — Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
- `subjectA` (string, optional) — Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
- `subjectB` (string, optional) — Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
- `winnerCriteria` (string, optional) — Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
- `winnerDelay` (integer, optional) — 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`
- `attachmentUrl` (string, optional) — URL of the attachment file associated with the campaign. Empty string if no attachment is present.
- `emailExpirationDate` (object, optional) — Expiration date configuration for the email campaign, if set. Contains the duration and unit of the email expiry.
  - `duration` (long, optional) — Duration of the email expiry
  - `unit` (enum, optional) — Unit of the duration
    - Allowed values: `days`, `weeks`, `months`
- `inlineImageActivation` (boolean, optional) — Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.
- `mirrorActive` (boolean, optional) — Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
- `recurring` (boolean, optional) — 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
- `returnBounce` (long, optional) — Total number of non-delivered campaigns for a particular campaign id.
- `sentDate` (string, optional) — Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
- `shareLink` (string, optional) — 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.
- `tag` (string, optional) — Tag of the campaign
- `tags` (list of string, optional) — List of tags of the campaign
- `toField` (string, optional) — Customisation of the "to" field of the campaign
- `utmCampaignValue` (string, optional) — The utm_campaign value associated with the campaign. Only present if a UTM campaign value was set.
- `utmContent` (string, optional) — The utm_content value associated with the campaign. Only present if a utm_content value was set on create or update.
- `utmID` (long, optional) — The campaign ID used as utm_id parameter. Only present if UTM campaign tracking with ID is enabled.
- `utmMedium` (string, optional) — The utm_medium value. Set to "EMAIL" when UTM campaign tracking is enabled.
- `utmSource` (string, optional) — The utm_source value. Set to "Brevo" when UTM campaign tracking is enabled.
- `utmTerm` (string, optional) — The utm_term value associated with the campaign. Only present if a utm_term value was set on create or update.

## Errors

### 400 Bad Request Error

bad request

- `code` (enum, required) — Error code displayed in case of a failure
  - Allowed values: `invalid_parameter`, `missing_parameter`, `out_of_range`, `campaign_processing`, `campaign_sent`, `document_not_found`, `not_enough_credits`, `permission_denied`, `duplicate_parameter`, `duplicate_request`, `method_not_allowed`, `unauthorized`, `account_under_validation`, `not_acceptable`, `bad_request`, `unprocessable_entity`, `Domain does not exist`, `Contact email not found`, `Attribute not found`, `Category id not found`, `Invalid parameters passed`, `Record(s) for identifier not found`, `Returned when query params are invalid`, `Returned when invalid data posted`, `Feed not found`, `Campaign ID not found`, `api-key not found`, `DMARC policy requires domain authentication`, `DNS records not properly configured`, `Invalid OTP code provided`, `OTP code has expired`, `Domain already exists in your account`, `The sum of all IP weights must equal 100`, `Authentication failed`, `Insufficient credits`, `Request already processed`
- `message` (string, required) — Readable message associated to the failure

### 404 Not Found Error

bad request

- `code` (enum, required) — Error code displayed in case of a failure
  - Allowed values: `invalid_parameter`, `missing_parameter`, `out_of_range`, `campaign_processing`, `campaign_sent`, `document_not_found`, `not_enough_credits`, `permission_denied`, `duplicate_parameter`, `duplicate_request`, `method_not_allowed`, `unauthorized`, `account_under_validation`, `not_acceptable`, `bad_request`, `unprocessable_entity`, `Domain does not exist`, `Contact email not found`, `Attribute not found`, `Category id not found`, `Invalid parameters passed`, `Record(s) for identifier not found`, `Returned when query params are invalid`, `Returned when invalid data posted`, `Feed not found`, `Campaign ID not found`, `api-key not found`, `DMARC policy requires domain authentication`, `DNS records not properly configured`, `Invalid OTP code provided`, `OTP code has expired`, `Domain already exists in your account`, `The sum of all IP weights must equal 100`, `Authentication failed`, `Insufficient credits`, `Request already processed`
- `message` (string, required) — Readable message associated to the failure

## Examples

**Response**

```json
{
  "id": 22,
  "name": "Weekly - 1",
  "status": "draft",
  "type": "classic",
  "createdAt": "2017-05-01T12:30:00Z",
  "footer": "[DEFAULT_FOOTER]",
  "header": "[DEFAULT_HEADER]",
  "htmlContent": "This is my HTML Content",
  "modifiedAt": "2017-05-01T12:30:00Z",
  "replyTo": "replyto@domain.com",
  "sender": {
    "email": "newsletter@mycompany.com",
    "id": 26,
    "name": "Newsletter"
  },
  "testSent": false,
  "recipients": {
    "exclusionLists": [
      45
    ],
    "lists": [
      22
    ]
  },
  "statistics": {
    "campaignStats": [
      {
        "appleMppOpens": 10,
        "clickers": 2665,
        "complaints": 1,
        "delivered": 19765,
        "hardBounces": 87,
        "opensRate": 29.54,
        "sent": 19887,
        "softBounces": 100,
        "trackableViews": 5661,
        "uniqueClicks": 2300,
        "uniqueViews": 7779,
        "unsubscriptions": 2,
        "viewed": 8999,
        "deferred": 30,
        "listId": 22
      }
    ],
    "globalStats": {
      "appleMppOpens": 10,
      "clickers": 2665,
      "complaints": 1,
      "delivered": 19765,
      "hardBounces": 87,
      "opensRate": 24.59,
      "sent": 19887,
      "softBounces": 100,
      "trackableViews": 5661,
      "uniqueClicks": 2300,
      "uniqueViews": 7779,
      "unsubscriptions": 2,
      "viewed": 8999,
      "estimatedViews": 560,
      "trackableViewsRate": 23.45
    },
    "linksStats": {
      "http://myUrl1.domain.com": {
        "nbClick": 80
      },
      "http://myUrl2.domain.com": {
        "nbClick": 80
      },
      "http://myUrl3.domain.com": {
        "nbClick": 80
      }
    },
    "mirrorClick": 120,
    "remaining": 1000,
    "statsByBrowser": {
      "internetExplorer": {
        "clickers": 0,
        "uniqueClicks": 0,
        "uniqueViews": 0,
        "viewed": 1
      },
      "safari": {
        "clickers": 1,
        "uniqueClicks": 0,
        "uniqueViews": 0,
        "viewed": 1
      },
      "thunderbird": {
        "clickers": 1,
        "uniqueClicks": 0,
        "uniqueViews": 0,
        "viewed": 1
      }
    },
    "statsByDevice": {
      "desktop": {
        "mac": {
          "clickers": 1,
          "uniqueClicks": 0,
          "uniqueViews": 1,
          "viewed": 2
        }
      },
      "mobile": {
        "androidMobile": {
          "clickers": 1,
          "uniqueClicks": 0,
          "uniqueViews": 0,
          "viewed": 1
        },
        "iPhone": {
          "clickers": 1,
          "uniqueClicks": 0,
          "uniqueViews": 0,
          "viewed": 2
        }
      }
    },
    "statsByDomain": {
      "gmail": {
        "clickers": 2665,
        "complaints": 1,
        "delivered": 19765,
        "hardBounces": 87,
        "sent": 19887,
        "softBounces": 100,
        "uniqueClicks": 2300,
        "uniqueViews": 7779,
        "unsubscriptions": 2,
        "viewed": 8999,
        "deferred": 30
      }
    }
  },
  "attachmentFile": "http://img.mailinblue.com/{clientID-campaignID}/attachments/{fileName}",
  "previewText": "your weekly newsletter",
  "scheduledAt": "2017-09-22T12:30:00Z",
  "subject": "Week 1 - Newsletter",
  "inlineImageActivation": true,
  "mirrorActive": true,
  "recurring": false,
  "shareLink": "http://dhh.brevo.com/fhsgccc.html?t=9865448900",
  "tag": "Newsletter",
  "tags": [
    "Newsletter",
    "Weekly"
  ],
  "toField": "{FNAME} {LNAME}"
}
```

**SDK Code**

```typescript response
import { BrevoClient } from "@getbrevo/brevo";

async function main() {
    const client = new BrevoClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.emailCampaigns.getEmailCampaign({
        campaignId: 1,
    });
}
main();

```

```python response
from brevo import Brevo

client = Brevo(
    api_key="YOUR_API_KEY_HERE",
)

client.email_campaigns.get_email_campaign(
    campaign_id=1,
)

```

```php response
<?php

namespace Example;

use Brevo\Brevo;
use Brevo\EmailCampaigns\Requests\GetEmailCampaignRequest;

$client = new Brevo(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->emailCampaigns->getEmailCampaign(
    1,
    new GetEmailCampaignRequest([]),
);

```

```go response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.brevo.com/v3/emailCampaigns/1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://api.brevo.com/v3/emailCampaigns/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.brevo.com/v3/emailCampaigns/1")
  .header("api-key", "<apiKey>")
  .asString();
```

```csharp response
using RestSharp;

var client = new RestClient("https://api.brevo.com/v3/emailCampaigns/1");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.brevo.com/v3/emailCampaigns/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```