> 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.

# Return all your created email campaigns

GET https://api.brevo.com/v3/emailCampaigns

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/2023/2/7).

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

## Authentication

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

## Request

### Query parameters

- `type` (enum, optional) — Filter on the type of the campaigns
  - Allowed values: `classic`, `trigger`
- `status` (enum, optional) — Filter on the status of the campaign
  - Allowed values: `suspended`, `archive`, `sent`, `queued`, `draft`, `inProcess`, `inReview`, `cancelling`, `cancelled`
- `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. This option only returns data for events that occurred in the last 6 months. For older campaigns, it is advisable to use the **Get Campaign Report** endpoint.
  - Allowed values: `globalStats`, `linksStats`, `statsByDomain`
- `startDate` (string, optional) — **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 `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `startDate` must not be in the future.
- `endDate` (string, optional) — **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 `status` is not passed or is set to `sent`. The date range between `startDate` and `endDate` must not exceed 2 years. `endDate` must not be in the future.
- `limit` (long, optional, default: 50) — Number of documents per page
- `offset` (long, optional, default: 0) — Index of the first document in the page
- `sort` (enum, optional, default: desc) — Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
  - Allowed values: `asc`, `desc`
- `excludeHtmlContent` (boolean, optional) — Use this flag to exclude htmlContent from the response body. If set to **true**, the htmlContent field will be returned as an empty string in the response body.
- `excludePdfAttachment` (boolean, optional) — Use this flag to filter out campaigns that have a PDF attachment. If set to **true**, only campaigns without a PDF attachment (or with no attachment at all) will be returned.

## Response

### 200

Email campaigns information

- `campaigns` (list of object, optional)
  - `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 medias
  - `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.
- `count` (long, optional) — Number of Email campaigns retrieved

## Examples

**Response**

```json
{
  "campaigns": [
    {
      "id": 12,
      "name": "EN - Sales Summer 2017",
      "status": "sent",
      "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": "marketing@mycompany.com",
        "id": 26,
        "name": "Marketing"
      },
      "testSent": true,
      "recipients": {
        "exclusionLists": [
          13
        ],
        "lists": [
          5
        ]
      },
      "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": 5
          }
        ],
        "globalStats": {
          "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,
          "estimatedViews": 560,
          "trackableViewsRate": 23.45
        },
        "linksStats": {
          "http://myUrl1.domain.com": 80
        },
        "mirrorClick": 120,
        "remaining": 1000,
        "statsByDomain": {
          "hotmail.co.uk": {
            "clickers": 2720,
            "complaints": 5,
            "delivered": 117056,
            "hardBounces": 0,
            "sent": 117055,
            "softBounces": 111,
            "uniqueClicks": 1970,
            "uniqueViews": 21111,
            "unsubscriptions": 105,
            "viewed": 35251
          },
          "yahoo.com": {
            "clickers": 533,
            "complaints": 0,
            "delivered": 25596,
            "hardBounces": 0,
            "sent": 25601,
            "softBounces": 5,
            "uniqueClicks": 298,
            "uniqueViews": 3527,
            "unsubscriptions": 17,
            "viewed": 5255
          }
        }
      },
      "previewText": "Don't miss the sale!",
      "scheduledAt": "2017-06-01T12:30:00Z",
      "subject": "20% OFF for 2017 Summer Sales",
      "inlineImageActivation": true,
      "mirrorActive": true,
      "recurring": false,
      "shareLink": "http://example.com/fhsgccc.html?t=9865448900",
      "tag": "Newsletter",
      "toField": "{FNAME} {LNAME}"
    },
    {
      "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": [
          10
        ]
      },
      "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": 10
          }
        ],
        "globalStats": {
          "appleMppOpens": 10,
          "clickers": 2665,
          "complaints": 1,
          "delivered": 19765,
          "hardBounces": 87,
          "opensRate": 29.42,
          "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,
        "statsByDomain": {
          "aol": {
            "clickers": 2665,
            "complaints": 1,
            "delivered": 19765,
            "hardBounces": 87,
            "sent": 19887,
            "softBounces": 100,
            "uniqueClicks": 2300,
            "uniqueViews": 7779,
            "unsubscriptions": 2,
            "viewed": 8999,
            "deferred": 30
          },
          "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": "",
      "subject": "Week 1 - Newsletter",
      "inlineImageActivation": true,
      "mirrorActive": true,
      "recurring": false,
      "shareLink": "http://example.com/fhsgccc.html?t=9865448900",
      "tag": "Newsletter",
      "tags": [
        "Newsletter",
        "Weekly"
      ],
      "toField": "{FNAME} {LNAME}"
    }
  ],
  "count": 2
}
```

**SDK Code**

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

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

```

```python response
from brevo import Brevo

client = Brevo(
    api_key="YOUR_API_KEY_HERE",
)

client.email_campaigns.get_email_campaigns()

```

```php response
<?php

namespace Example;

use Brevo\Brevo;
use Brevo\EmailCampaigns\Requests\GetEmailCampaignsRequest;

$client = new Brevo(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->emailCampaigns->getEmailCampaigns(
    new GetEmailCampaignsRequest([]),
);

```

```go response
package main

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

func main() {

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

	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")

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")
  .header("api-key", "<apiKey>")
  .asString();
```

```csharp response
using RestSharp;

var client = new RestClient("https://api.brevo.com/v3/emailCampaigns");
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")! 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()
```