---
updatedAt: 2026-11-11T07:32:40.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Email analytics

Retrieve aggregated data for email metrics based on the defined email type value and group data by metrics.

> 👍 How to use this endpoint
>
> * For example responses, click the relevant status code on the right.

> 📘 Notes:
>
> * The `since` and `until` parameters always refer to sent emails, regardless of which metric was requested. Metrics are retrieved from emails which were sent within the date range defined. For example, if you're requesting data on reviews within the date range of Jan 01 (`since`) - Jan 05 (`until`), note that while the review request emails were sent within the date range, the actual reviews may have only been created after Jan 05 (`until`).
> * The `date_bucket` default value is `month` and returns values as a calendar month. For example, **\&since=2017-07-15\&until=2017-08-15\&date\_bucket=month** will return monthly buckets as July 15 -31, August 01 - 15

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Reviews API (V1)",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.yotpo.com",
      "description": "Main API server for authenticated and write operations"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Your Yotpo account access token. See [Yotpo Authentication](ref:yotpo-authentication) to learn how to generate your token."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid access token",
        "content": {
          "application/json": {
            "examples": {
              "Unauthorized": {
                "value": {
                  "status": {
                    "message": "You are not authorized to access this page.",
                    "code": 401,
                    "error_type": "Exceptions::AccessDenied"
                  }
                }
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message"
                    },
                    "code": {
                      "type": "integer",
                      "description": "HTTP status code"
                    },
                    "error_type": {
                      "type": "string",
                      "description": "Internal error class"
                    }
                  },
                  "description": "Error details."
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "paths": {
    "/analytics/v1/emails/{store_id}/{metric_name}": {
      "get": {
        "summary": "Email analytics",
        "description": "Retrieve aggregated data for email metrics based on the defined email type value and group data by metrics.",
        "operationId": "email-analytics",
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "description": "The store ID",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "since",
            "in": "query",
            "description": "Retrieve email analytics since and including this date (Default: Last 30 days). Note: `until` is required when using this param.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "until",
            "in": "query",
            "description": "Retrieve email analytics until and including this date (Default: Last 30 days). Note: `since` is required when using this param.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_bucket",
            "in": "query",
            "description": "Bucket size for the returned date series. Lowercase only. Default: `month`.",
            "schema": {
              "type": "string",
              "default": "month",
              "enum": [
                "day",
                "month",
                "year"
              ]
            }
          },
          {
            "name": "reminder_num",
            "in": "query",
            "description": "The number of the MAP reminder email. Must be an integer greater than zero and can only be used when the email type is `product_reminder` or `site_reminder`",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "email_type",
            "in": "query",
            "description": "Choose one `email_type` value from the table of [Supported Email Types](ref:about-analytics#supported-email-types) or exclude this parameter to retrieve data for all emails.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric_name",
            "in": "path",
            "description": "Supports one metric per request. Choose a metric from the table of [Email Analytics Metrics](ref:about-analytics#email-analytics-metrics)",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "group_by",
            "in": "query",
            "description": "Returns itemized grouped data. Choose a `group_by` value from [this table](ref:about-analytics#group-by)",
            "schema": {
              "type": "string",
              "default": "email_type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Query date_bucket=day": {
                    "value": "{\n    \"date_series_points\": [\n        {\n            \"since\": \"2017-07-01\",\n            \"until\": \"2017-07-01\",\n            \"values\": {}\n        },\n        {\n            \"since\": \"2017-07-02\",\n            \"until\": \"2017-07-02\",\n            \"values\": {}\n        },\n        {\n            \"since\": \"2017-07-03\",\n            \"until\": \"2017-07-03\",\n            \"values\": {}\n        }\n    ]\n}"
                  },
                  "Query date_bucket=month": {
                    "value": "{\n    \"date_series_points\": [\n        {\n            \"since\": \"2017-07-15\",\n            \"until\": \"2017-07-31\",\n            \"values\": {}\n        },\n        {\n            \"since\": \"2017-08-01\",\n            \"until\": \"2017-08-15\",\n            \"values\": {}\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Query date_bucket=day",
                      "type": "object",
                      "properties": {
                        "date_series_points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "since": {
                                "type": "string",
                                "example": "2017-07-01"
                              },
                              "until": {
                                "type": "string",
                                "example": "2017-07-01"
                              },
                              "values": {
                                "type": "object",
                                "properties": {}
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Query date_bucket=month",
                      "type": "object",
                      "properties": {
                        "date_series_points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "since": {
                                "type": "string",
                                "example": "2017-07-15"
                              },
                              "until": {
                                "type": "string",
                                "example": "2017-07-31"
                              },
                              "values": {
                                "type": "object",
                                "properties": {}
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "ratelimit-limit": {
                "description": "The maximum number of requests allowed in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-remaining": {
                "description": "The number of requests remaining in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-reset": {
                "description": "The time (in seconds) until the rate limit resets",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-limit-minute": {
                "description": "The maximum number of requests allowed per minute",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining-minute": {
                "description": "The number of requests remaining in the current minute",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "http",
              "code": "GET https://api.yotpo.com/analytics/v1/emails/YOUR_STORE_ID/emails_sent?since=2017-07-01&until=2017-08-20&date_bucket=day&email_type=reminder&group_by=reminder_num"
            },
            {
              "language": "http",
              "code": "GET https://api.yotpo.com/analytics/v1/emails/YOUR_STORE_ID/emails_sent",
              "name": "Path Params"
            }
          ],
          "samples-languages": [
            "http"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```