---
agentTools:
  projectIndex: https://sendinblue.readme.io/llms.txt
---

# Get an email campaign report

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "contact": {
      "email": "contact@brevo.com",
      "name": "Brevo Support",
      "url": "https://account.brevo.com/support"
    },
    "description": "Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to :\n  - Manage your campaigns and get the statistics\n  - Manage your contacts\n  - Send transactional Emails and SMS\n  - and much more...\n\nYou can download our wrappers at https://github.com/orgs/brevo\n**Possible responses**\n  | Code | Message |\n  | :-------------: | ------------- |\n  | 200  | OK. Successful Request  |\n  | 201  | OK. Successful Creation |\n  | 202  | OK. Request accepted |\n  | 204  | OK. Successful Update/Deletion  |\n  | 400  | Error. Bad Request  |\n  | 401  | Error. Authentication Needed  |\n  | 402  | Error. Not enough credit, plan upgrade needed  |\n  | 403  | Error. Permission denied  |\n  | 404  | Error. Object does not exist |\n  | 405  | Error. Method not allowed  |\n  | 406  | Error. Not Acceptable  |\n  | 422  | Error. Unprocessable Entity |\n",
    "license": {
      "name": "MIT",
      "url": "http://opensource.org/licenses/MIT"
    },
    "title": "Brevo API",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.brevo.com/v3"
    }
  ],
  "security": [
    {
      "api-key": []
    },
    {
      "partner-key": []
    }
  ],
  "paths": {
    "/emailCampaigns/{campaignId}": {
      "get": {
        "operationId": "getEmailCampaign",
        "parameters": [
          {
            "description": "Id of the campaign",
            "in": "path",
            "name": "campaignId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.",
            "in": "query",
            "name": "statistics",
            "required": false,
            "schema": {
              "enum": [
                "globalStats",
                "linksStats",
                "statsByDomain",
                "statsByDevice",
                "statsByBrowser"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "createdAt": "2017-05-01T12:30:00Z",
                      "footer": "[DEFAULT_FOOTER]",
                      "header": "[DEFAULT_HEADER]",
                      "htmlContent": "This is my HTML Content",
                      "id": 22,
                      "inlineImageActivation": true,
                      "mirrorActive": true,
                      "modifiedAt": "2017-05-01T12:30:00Z",
                      "name": "Weekly - 1",
                      "previewText": "your weekly newsletter",
                      "recipients": {
                        "exclusionLists": [
                          45
                        ],
                        "lists": [
                          22
                        ]
                      },
                      "recurring": false,
                      "replyTo": "replyto@domain.com",
                      "scheduledAt": "2017-09-22T12:30:00Z",
                      "sender": {
                        "email": "newsletter@mycompany.com",
                        "id": 26,
                        "name": "Newsletter"
                      },
                      "shareLink": "http://dhh.brevo.com/fhsgccc.html?t=9865448900",
                      "statistics": {
                        "campaignStats": [
                          {
                            "clickers": 2665,
                            "complaints": 1,
                            "deferred": 30,
                            "delivered": 19765,
                            "hardBounces": 87,
                            "listId": 22,
                            "sent": 19887,
                            "softBounces": 100,
                            "trackableViews": 5661,
                            "uniqueClicks": 2300,
                            "uniqueViews": 7779,
                            "unsubscriptions": 2,
                            "viewed": 8999
                          }
                        ],
                        "globalStats": {
                          "appleMppOpens": 10,
                          "clickers": 2665,
                          "complaints": 1,
                          "delivered": 19765,
                          "estimatedViews": 560,
                          "hardBounces": 87,
                          "opensRate": 24.59,
                          "sent": 19887,
                          "softBounces": 100,
                          "trackableViews": 5661,
                          "trackableViewsRate": 23.45,
                          "uniqueClicks": 2300,
                          "uniqueViews": 7779,
                          "unsubscriptions": 2,
                          "viewed": 8999
                        },
                        "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,
                            "deferred": 30,
                            "delivered": 19765,
                            "hardBounces": 87,
                            "sent": 19887,
                            "softBounces": 100,
                            "uniqueClicks": 2300,
                            "uniqueViews": 7779,
                            "unsubscriptions": 2,
                            "viewed": 8999
                          }
                        }
                      },
                      "status": "draft",
                      "subject": "Week 1 - Newsletter",
                      "tag": "Newsletter",
                      "testSent": false,
                      "toField": "{FNAME} {LNAME}",
                      "type": "classic"
                    }
                  }
                },
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/getExtendedCampaignOverview"
                    },
                    {
                      "properties": {
                        "recipients": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/getCampaignRecipients"
                            }
                          ],
                          "type": "object"
                        },
                        "statistics": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/getExtendedCampaignStats"
                            }
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "recipients",
                        "statistics"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Email campaign informations"
          },
          "400": {
            "$ref": "#/components/responses/errorModel"
          },
          "404": {
            "$ref": "#/components/responses/errorModel"
          }
        },
        "summary": "Get an email campaign report",
        "tags": [
          "Email Campaigns"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api-key": {
        "description": "The API key should be passed in the request headers as `api-key` for authentication.",
        "in": "header",
        "name": "api-key",
        "type": "apiKey"
      },
      "partner-key": {
        "description": "The partner key should be passed in the request headers as `partner-key` along with `api-key` pair for successful authentication of partner (Optional).",
        "in": "header",
        "name": "partner-key",
        "type": "apiKey"
      }
    },
    "schemas": {
      "getCampaignStats": {
        "properties": {
          "appleMppOpens": {
            "description": "Numbers of times your email has been opened automatically through Apple MPP.",
            "example": 10,
            "format": "int64",
            "type": "integer"
          },
          "clickers": {
            "description": "Number of total clicks for the campaign",
            "example": 2665,
            "format": "int64",
            "type": "integer"
          },
          "complaints": {
            "description": "Number of complaints (Spam reports) for the campaign",
            "example": 1,
            "format": "int64",
            "type": "integer"
          },
          "deferred": {
            "description": "Number of deferred emails for the campaign",
            "example": 30,
            "format": "int64",
            "type": "integer"
          },
          "delivered": {
            "description": "Number of delivered emails for the campaign",
            "example": 19765,
            "format": "int64",
            "type": "integer"
          },
          "estimatedViews": {
            "description": "Rate of recipients without any privacy protection option enabled in their email client_dev, applied to all delivered emails",
            "example": 560,
            "format": "int64",
            "type": "integer"
          },
          "hardBounces": {
            "description": "Number of harbounce for the campaign",
            "example": 87,
            "format": "int64",
            "type": "integer"
          },
          "listId": {
            "description": "List Id of email campaign (only in case of get email campaign(s)(not for global stats))",
            "example": 2,
            "format": "int64",
            "type": "integer"
          },
          "opensRate": {
            "description": "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.",
            "example": 29.54,
            "format": "float",
            "type": "number"
          },
          "returnBounce": {
            "description": "Total number of non-delivered campaigns for a particular campaign id.",
            "example": 5,
            "format": "int64",
            "type": "integer"
          },
          "sent": {
            "description": "Number of sent emails for the campaign",
            "example": 19887,
            "format": "int64",
            "type": "integer"
          },
          "softBounces": {
            "description": "Number of softbounce for the campaign",
            "example": 100,
            "format": "int64",
            "type": "integer"
          },
          "trackableViews": {
            "description": "Recipients without any privacy protection option enabled in their email client_dev",
            "example": 5661,
            "format": "int64",
            "type": "integer"
          },
          "trackableViewsRate": {
            "description": "Rate of recipients without any privacy protection option enabled in their email client_dev",
            "example": 23.45,
            "format": "float",
            "type": "number"
          },
          "uniqueClicks": {
            "description": "Number of unique clicks for the campaign",
            "example": 2300,
            "format": "int64",
            "type": "integer"
          },
          "uniqueViews": {
            "description": "Number of unique openings for the campaign",
            "example": 7779,
            "format": "int64",
            "type": "integer"
          },
          "unsubscriptions": {
            "description": "Number of unsubscription for the campaign",
            "example": 2,
            "format": "int64",
            "type": "integer"
          },
          "viewed": {
            "description": "Number of openings for the campaign",
            "example": 8999,
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "clickers",
          "complaints",
          "delivered",
          "hardBounces",
          "sent",
          "softBounces",
          "uniqueClicks",
          "uniqueViews",
          "unsubscriptions",
          "viewed",
          "trackableViews",
          "opensRate",
          "appleMppOpens"
        ],
        "type": "object"
      },
      "getExtendedCampaignOverview": {
        "allOf": [
          {
            "properties": {
              "abTesting": {
                "description": "Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.",
                "example": true,
                "type": "boolean"
              },
              "id": {
                "description": "ID of the campaign",
                "example": 12,
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "description": "Name of the campaign",
                "example": "EN - Sales Summer 2017",
                "type": "string"
              },
              "previewText": {
                "description": "Preview text or preheader of the email campaign",
                "example": "Thanks for your order!",
                "type": "string"
              },
              "scheduledAt": {
                "description": "UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)",
                "example": "2017-06-01T12:30:00Z",
                "type": "string"
              },
              "sendAtBestTime": {
                "description": "It is true if you have chosen to send your campaign at best time, otherwise it is false",
                "example": true,
                "type": "boolean"
              },
              "splitRule": {
                "description": "The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`",
                "example": 25,
                "type": "integer"
              },
              "status": {
                "description": "Status of the campaign",
                "enum": [
                  "draft",
                  "sent",
                  "archive",
                  "queued",
                  "suspended",
                  "in_process"
                ],
                "example": "sent",
                "type": "string"
              },
              "subject": {
                "description": "Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`",
                "example": "20% OFF for 2017 Summer Sales",
                "type": "string"
              },
              "subjectA": {
                "description": "Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`",
                "example": "Discover the New Collection!",
                "type": "string"
              },
              "subjectB": {
                "description": "Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`",
                "example": "Want to discover the New Collection?",
                "type": "string"
              },
              "type": {
                "description": "Type of campaign",
                "enum": [
                  "classic",
                  "trigger"
                ],
                "example": "classic",
                "type": "string"
              },
              "winnerCriteria": {
                "description": "Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`",
                "example": "open",
                "type": "string"
              },
              "winnerDelay": {
                "description": "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`",
                "example": 50,
                "type": "integer"
              }
            },
            "required": [
              "id",
              "name",
              "status",
              "type"
            ],
            "type": "object"
          },
          {
            "properties": {
              "createdAt": {
                "description": "Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)",
                "example": "2017-05-01T12:30:00Z",
                "type": "string"
              },
              "footer": {
                "description": "Footer of the campaign",
                "example": "[DEFAULT_FOOTER]",
                "type": "string"
              },
              "header": {
                "description": "Header of the campaign",
                "example": "[DEFAULT_HEADER]",
                "type": "string"
              },
              "htmlContent": {
                "description": "HTML content of the campaign",
                "example": "This is my HTML Content",
                "type": "string"
              },
              "inlineImageActivation": {
                "description": "Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.",
                "example": true,
                "type": "boolean"
              },
              "mirrorActive": {
                "description": "Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign",
                "example": true,
                "type": "boolean"
              },
              "modifiedAt": {
                "description": "UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)",
                "example": "2017-05-01T12:30:00Z",
                "type": "string"
              },
              "recurring": {
                "description": "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",
                "example": true,
                "type": "boolean"
              },
              "replyTo": {
                "description": "Email defined as the \"Reply to\" of the campaign",
                "example": "replyto@domain.com",
                "format": "email",
                "type": "string"
              },
              "returnBounce": {
                "description": "Total number of non-delivered campaigns for a particular campaign id.",
                "example": 5,
                "format": "int64",
                "type": "integer"
              },
              "sender": {
                "properties": {
                  "email": {
                    "description": "Sender email of the campaign",
                    "example": "marketing@mycompany.com",
                    "format": "email",
                    "type": "string"
                  },
                  "id": {
                    "description": "Sender id of the campaign",
                    "example": 43,
                    "format": "int64",
                    "type": "integer"
                  },
                  "name": {
                    "description": "Sender name of the campaign",
                    "example": "Marketing",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "sentDate": {
                "description": "Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'",
                "example": "2018-12-01T16:30:00Z",
                "type": "string"
              },
              "shareLink": {
                "description": "Link to share the campaign on social medias",
                "example": "http://dhh.brevo.com/fhsgccc.html?t=9865448900",
                "format": "url",
                "type": "string"
              },
              "tag": {
                "description": "Tag of the campaign",
                "example": "Newsletter",
                "type": "string"
              },
              "testSent": {
                "description": "Retrieved the status of test email sending. (true=Test email has been sent  false=Test email has not been sent)",
                "example": true,
                "type": "boolean"
              },
              "toField": {
                "description": "Customisation of the \"to\" field of the campaign",
                "example": "{FNAME} {LNAME}",
                "type": "string"
              },
              "utmCampaignValue": {
                "description": "utm parameter associated with campaign",
                "example": "myutm",
                "type": "string"
              },
              "utmIDActive": {
                "description": "utm id active",
                "example": true,
                "type": "boolean"
              },
              "utmMedium": {
                "example": "EMAIL",
                "type": "string"
              },
              "utmSource": {
                "description": "source of utm",
                "example": "Brevo",
                "type": "string"
              }
            },
            "required": [
              "createdAt",
              "footer",
              "header",
              "htmlContent",
              "modifiedAt",
              "replyTo",
              "sender",
              "testSent"
            ],
            "type": "object"
          }
        ]
      },
      "getCampaignRecipients": {
        "properties": {
          "exclusionLists": {
            "items": {
              "description": "List IDs excluded of the campaign",
              "example": 13,
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "lists": {
            "items": {
              "description": "List IDs included in the campaign",
              "example": 21,
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          }
        },
        "required": [
          "exclusionLists",
          "lists"
        ],
        "type": "object"
      },
      "getDeviceBrowserStats": {
        "properties": {
          "clickers": {
            "description": "Number of total clicks for the campaign using the particular browser",
            "example": 2665,
            "format": "int64",
            "type": "integer"
          },
          "uniqueClicks": {
            "description": "Number of unique clicks for the campaign using the particular browser",
            "example": 2300,
            "format": "int64",
            "type": "integer"
          },
          "uniqueViews": {
            "description": "Number of unique openings for the campaign using the particular browser",
            "example": 7779,
            "format": "int64",
            "type": "integer"
          },
          "viewed": {
            "description": "Number of openings for the campaign using the particular browser",
            "example": 8999,
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "clickers",
          "uniqueClicks",
          "uniqueViews",
          "viewed"
        ],
        "type": "object"
      },
      "getExtendedCampaignStats": {
        "properties": {
          "campaignStats": {
            "description": "List-wise statistics of the campaign.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/getCampaignStats"
                }
              ],
              "type": "object"
            },
            "type": "array"
          },
          "globalStats": {
            "allOf": [
              {
                "$ref": "#/components/schemas/getCampaignStats"
              }
            ],
            "description": "Overall statistics of the campaign",
            "type": "object"
          },
          "linksStats": {
            "description": "Statistics about the number of clicks for the links",
            "example": {
              "example.abc.com": 7,
              "example.domain.com": 10
            },
            "properties": {},
            "type": "object"
          },
          "mirrorClick": {
            "description": "Number of clicks on mirror link",
            "example": 120,
            "format": "int64",
            "type": "integer"
          },
          "remaining": {
            "description": "Number of remaning emails to send",
            "example": 1000,
            "format": "int64",
            "type": "integer"
          },
          "statsByBrowser": {
            "additionalProperties": {
              "$ref": "#/components/schemas/getDeviceBrowserStats"
            },
            "type": "object"
          },
          "statsByDevice": {
            "properties": {
              "desktop": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/getDeviceBrowserStats"
                },
                "description": "Statistics of the campaign on the basis of desktop devices",
                "type": "object"
              },
              "mobile": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/getDeviceBrowserStats"
                },
                "description": "Statistics of the campaign on the basis of mobile devices",
                "type": "object"
              },
              "tablet": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/getDeviceBrowserStats"
                },
                "description": "Statistics of the campaign on the basis of tablet devices",
                "type": "object"
              },
              "unknown": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/getDeviceBrowserStats"
                },
                "description": "Statistics of the campaign on the basis of unknown devices",
                "type": "object"
              }
            },
            "type": "object"
          },
          "statsByDomain": {
            "additionalProperties": {
              "$ref": "#/components/schemas/getCampaignStats"
            },
            "type": "object"
          }
        },
        "required": [
          "campaignStats",
          "globalStats",
          "linksStats",
          "mirrorClick",
          "remaining",
          "statsByBrowser",
          "statsByDevice",
          "statsByDomain"
        ],
        "type": "object"
      }
    },
    "responses": {
      "errorModel": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "code": {
                  "description": "Error code displayed in case of a failure",
                  "enum": [
                    "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"
                  ],
                  "example": "method_not_allowed",
                  "type": "string"
                },
                "message": {
                  "description": "Readable message associated to the failure",
                  "example": "POST Method is not allowed on this path",
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "type": "object"
            }
          }
        },
        "description": "bad request"
      }
    }
  },
  "x-samples-languages": [
    "curl"
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 91,
      "1": 104,
      "2": 180,
      "3": 205,
      "4": 240,
      "5": 82,
      "6": 207,
      "7": 0,
      "8": 3,
      "9": 36,
      "10": 63,
      "11": 142
    }
  }
}
```