---
title: "POST /v2/email/metrics/batch"
method: POST
path: "/v2/email/metrics/batch"
---

# POST /v2/email/metrics/batch

`POST /v2/email/metrics/batch`

Retrieves batches of metric data collected based on your sending activity.

You can execute this operation no more than 16 times per second, and with at most 160 queries from the batches per second (cumulative).

## Request body

- object
  - `Queries` BatchGetMetricDataQuery[], required — A list of queries for metrics to be retrieved.
    - `Id` string, required — The query identifier.
    - `Namespace` 'VDM', required — The query namespace - e.g. <code>VDM</code>
    - `Metric` 'SEND' | 'COMPLAINT' | 'PERMANENT_BOUNCE' | 'TRANSIENT_BOUNCE' | 'OPEN' | 'CLICK' | 'DELIVERY' | 'DELIVERY_OPEN' | 'DELIVERY_CLICK' | 'DELIVERY_COMPLAINT', required — <p>The queried metric. This can be one of the following:</p> <ul> <li> <p> <code>SEND</code> – Emails sent eligible for tracking in the VDM dashboard. This excludes emails sent to the mailbox simulator and emails addressed to more than one recipient.</p> </li> <li> <p> <code>COMPLAINT</code> – Complaints received for your account. This excludes complaints from the mailbox simulator, those originating from your account-level suppression list (if enabled), and those for emails addressed to more than one recipient</p> </li> <li> <p> <code>PERMANENT_BOUNCE</code> – Permanent bounces - i.e. feedback received for emails sent to non-existent mailboxes. Excludes bounces from the mailbox simulator, those originating from your account-level suppression list (if enabled), and those for emails addressed to more than one recipient.</p> </li> <li> <p> <code>TRANSIENT_BOUNCE</code> – Transient bounces - i.e. feedback received for delivery failures excluding issues with non-existent mailboxes. Excludes bounces from the mailbox simulator, and those for emails addressed to more than one recipient.</p> </li> <li> <p> <code>OPEN</code> – Unique open events for emails including open trackers. Excludes opens for emails addressed to more than one recipient.</p> </li> <li> <p> <code>CLICK</code> – Unique click events for emails including wrapped links. Excludes clicks for emails addressed to more than one recipient.</p> </li> <li> <p> <code>DELIVERY</code> – Successful deliveries for email sending attempts. Excludes deliveries to the mailbox simulator and for emails addressed to more than one recipient.</p> </li> <li> <p> <code>DELIVERY_OPEN</code> – Successful deliveries for email sending attempts. Excludes deliveries to the mailbox simulator, for emails addressed to more than one recipient, and emails without open trackers.</p> </li> <li> <p> <code>DELIVERY_CLICK</code> – Successful deliveries for email sending attempts. Excludes deliveries to the mailbox simulator, for emails addressed to more than one recipient, and emails without click trackers.</p> </li> <li> <p> <code>DELIVERY_COMPLAINT</code> – Successful deliveries for email sending attempts. Excludes deliveries to the mailbox simulator, for emails addressed to more than one recipient, and emails addressed to recipients hosted by ISPs with which Amazon SES does not have a feedback loop agreement.</p> </li> </ul>
    - `Dimensions` object — An object that contains mapping between <code>MetricDimensionName</code> and <code>MetricDimensionValue</code> to filter metrics by.
    - `StartDate` string, date-time, required — Represents the start date for the query interval.
    - `EndDate` string, date-time, required — Represents the end date for the query interval.

## Response `200`

Success

- BatchGetMetricDataResponse — Represents the result of processing your metric data batch request
  - `Results` MetricDataResult[] — A list of successfully retrieved <code>MetricDataResult</code>.
    - `Id` string — The query identifier.
    - `Timestamps` Timestamp[] — A list of timestamps for the metric data results.
    - `Values` Counter[] — A list of values (cumulative / sum) for the metric data results.
  - `Errors` MetricDataError[] — A list of <code>MetricDataError</code> encountered while processing your metric data batch request.
    - `Id` string — The query identifier.
    - `Code` 'INTERNAL_FAILURE' | 'ACCESS_DENIED' — <p>The query error code. Can be one of:</p> <ul> <li> <p> <code>INTERNAL_FAILURE</code> – Amazon SES has failed to process one of the queries.</p> </li> <li> <p> <code>ACCESS_DENIED</code> – You have insufficient access to retrieve metrics based on the given query.</p> </li> </ul>
    - `Message` string — The error message associated with the current query error.

## Other responses

- `480` — BadRequestException
- `481` — InternalServiceErrorException
- `482` — TooManyRequestsException
- `483` — NotFoundException

---

[API](https://skmtc.net/aws/apis/sesv2.md) · [All operations](https://skmtc.net/aws/apis/sesv2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/sesv2/revisions/25eba06e7f64/schema)
