> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Resend: Emails Metrics

> Retrieve account-level email metrics. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Retrieve account-level email metrics.

> [!NOTE]
>
> Tool ID: `resend_emails_metrics`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'resend_emails_metrics',
  {
    "start_date": "2026-01-15T12:00:00Z",
    "end_date": "2026-01-15T12:00:00Z",
    "timezone": "UTC"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run resend_emails_metrics --input '{
  "start_date": "2026-01-15T12:00:00Z",
  "end_date": "2026-01-15T12:00:00Z",
  "timezone": "UTC"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "example",
    "start_date": "2026-01-15T12:00:00Z",
    "end_date": "2026-01-15T12:00:00Z"
  }
}
```

Use `deepline describe resend_emails_metrics --json` for the latest machine-readable contract.

## Input reference

Retrieve account-level email metrics

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.start_date` | `string` | No | — | The start of the date range, as an ISO 8601 date or datetime. Must be on or before `end_date`. Defaults to 6 days before `end_date`. |
| `payload.end_date` | `string` | No | — | The end of the date range, as an ISO 8601 date or datetime. Values in the future are clamped to the current time. Defaults to now. |
| `payload.timezone` | `string` | No | `"UTC"` | The IANA timezone (e.g. `America/New_York`) used to bucket periods when `period` is in `dimensions`. |
| `payload.granularity` | `"hourly" \| "daily" \| "weekly" \| "monthly"` | No | `"daily"` | The bucket size used when `period` is in `dimensions`. The date range can't produce more than 10,000 periods at the chosen granularity. Allowed: `hourly`, `daily`, `weekly`, `monthly`. |
| `payload.metrics` | `array` | No | — | List of metrics to include in the response. Defaults to all metrics. Accepts a comma-separated value, the parameter repeated, or a mix of both. |
| `payload.dimensions` | `array` | No | — | List of dimensions to break the response down by. `email` cannot be combined with `broadcast`. Defaults to `[]`, returning a single `totals` row for the whole range, with no `data`. Accepts a comma-separated value, the parameter repeated, or a mix of both. |
| `payload.domain_id` | `array` | No | — | List of sending domain IDs to restrict the response to, up to 100. Accepts a comma-separated value, the parameter repeated, or a mix of both. |
| `payload.email_id` | `array` | No | — | List of email IDs to restrict the response to, up to 100. Cannot be combined with the `broadcast` dimension or `broadcast_id`. Accepts a comma-separated value, the parameter repeated, or a mix of both. |
| `payload.broadcast_id` | `array` | No | — | List of broadcast IDs to restrict the response to, up to 100. Cannot be combined with the `email` dimension or `email_id`. Accepts a comma-separated value, the parameter repeated, or a mix of both. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Retrieve account-level email metrics",
    "properties": {
      "start_date": {
        "type": "string",
        "description": "The start of the date range, as an ISO 8601 date or datetime. Must be on or before `end_date`. Defaults to 6 days before `end_date`."
      },
      "end_date": {
        "type": "string",
        "description": "The end of the date range, as an ISO 8601 date or datetime. Values in the future are clamped to the current time. Defaults to now."
      },
      "timezone": {
        "type": "string",
        "description": "The IANA timezone (e.g. `America/New_York`) used to bucket periods when `period` is in `dimensions`.",
        "default": "UTC"
      },
      "granularity": {
        "type": "string",
        "description": "The bucket size used when `period` is in `dimensions`. The date range can't produce more than 10,000 periods at the chosen granularity.",
        "default": "daily",
        "enum": [
          "hourly",
          "daily",
          "weekly",
          "monthly"
        ]
      },
      "metrics": {
        "type": "array",
        "description": "List of metrics to include in the response. Defaults to all metrics. Accepts a comma-separated value, the parameter repeated, or a mix of both.",
        "items": {
          "type": "string",
          "enum": [
            "received",
            "delivered",
            "complained",
            "suppressed",
            "bounced",
            "bounced_transient",
            "bounced_permanent",
            "bounced_undetermined",
            "opened",
            "clicked",
            "unsubscribed",
            "delivery_delayed",
            "failed",
            "sent",
            "unique_opened",
            "unique_clicked",
            "delivery_rate",
            "open_rate",
            "click_rate",
            "bounce_rate",
            "complaint_rate",
            "unsubscribe_rate"
          ]
        }
      },
      "dimensions": {
        "type": "array",
        "description": "List of dimensions to break the response down by. `email` cannot be combined with `broadcast`. Defaults to `[]`, returning a single `totals` row for the whole range, with no `data`. Accepts a comma-separated value, the parameter repeated, or a mix of both.",
        "items": {
          "type": "string",
          "enum": [
            "period",
            "domain",
            "email",
            "broadcast"
          ]
        }
      },
      "domain_id": {
        "type": "array",
        "description": "List of sending domain IDs to restrict the response to, up to 100. Accepts a comma-separated value, the parameter repeated, or a mix of both.",
        "items": {
          "type": "string",
          "format": "uuid"
        }
      },
      "email_id": {
        "type": "array",
        "description": "List of email IDs to restrict the response to, up to 100. Cannot be combined with the `broadcast` dimension or `broadcast_id`. Accepts a comma-separated value, the parameter repeated, or a mix of both.",
        "items": {
          "type": "string",
          "format": "uuid"
        }
      },
      "broadcast_id": {
        "type": "array",
        "description": "List of broadcast IDs to restrict the response to, up to 100. Cannot be combined with the `email` dimension or `email_id`. Accepts a comma-separated value, the parameter repeated, or a mix of both.",
        "items": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `string` | No | — | Type of the response object. |
| `result.data.start_date` | `string` | No | — | The start of the requested date range, as an ISO 8601 datetime. |
| `result.data.end_date` | `string` | No | — | The end of the requested date range, as an ISO 8601 datetime. |
| `result.data.metrics` | `array` | No | — | The metrics included in the response. |
| `result.data.dimensions` | `array` | No | — | The dimensions the response is broken down by. |
| `result.data.granularity` | `"hourly" \| "daily" \| "weekly" \| "monthly"` | No | — | The bucket size used when `period` is in `dimensions`. Allowed: `hourly`, `daily`, `weekly`, `monthly`. |
| `result.data.totals` | `record` | No | — | The requested metrics, totaled over the whole date range. |
| `result.data.data` | `array` | No | — | One row per unique combination of the requested `dimensions`. Omitted when `dimensions` is empty. |
| `result.data.data[].period` | `string` | No | — | Present when `period` is in `dimensions`. |
| `result.data.data[].domain_id` | `string` | No | — | Present when `domain` is in `dimensions`. Format: `uuid`. |
| `result.data.data[].domain_name` | `string` | No | — | Present when `domain` is in `dimensions`. |
| `result.data.data[].email_id` | `string` | No | — | Present when `email` is in `dimensions`. Format: `uuid`. |
| `result.data.data[].broadcast_id` | `string` | No | — | Present when `broadcast` is in `dimensions`. Format: `uuid`. |
| `result.data.data[].broadcast_name` | `string` | No | — | Present when `broadcast` is in `dimensions`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Type of the response object."
          },
          "start_date": {
            "type": "string",
            "description": "The start of the requested date range, as an ISO 8601 datetime."
          },
          "end_date": {
            "type": "string",
            "description": "The end of the requested date range, as an ISO 8601 datetime."
          },
          "metrics": {
            "type": "array",
            "description": "The metrics included in the response.",
            "items": {
              "type": "string"
            }
          },
          "dimensions": {
            "type": "array",
            "description": "The dimensions the response is broken down by.",
            "items": {
              "type": "string",
              "enum": [
                "period",
                "domain",
                "email",
                "broadcast"
              ]
            }
          },
          "granularity": {
            "type": "string",
            "description": "The bucket size used when `period` is in `dimensions`.",
            "enum": [
              "hourly",
              "daily",
              "weekly",
              "monthly"
            ]
          },
          "totals": {
            "type": "object",
            "description": "The requested metrics, totaled over the whole date range.",
            "additionalProperties": {
              "type": "number"
            }
          },
          "data": {
            "type": "array",
            "description": "One row per unique combination of the requested `dimensions`. Omitted when `dimensions` is empty.",
            "items": {
              "type": "object",
              "description": "A single breakdown row. Which dimension fields are present depends on the requested `dimensions`; which metric fields are present depends on the requested `metrics`.",
              "properties": {
                "period": {
                  "type": "string",
                  "description": "Present when `period` is in `dimensions`."
                },
                "domain_id": {
                  "type": "string",
                  "description": "Present when `domain` is in `dimensions`.",
                  "format": "uuid"
                },
                "domain_name": {
                  "type": "string",
                  "description": "Present when `domain` is in `dimensions`."
                },
                "email_id": {
                  "type": "string",
                  "description": "Present when `email` is in `dimensions`.",
                  "format": "uuid"
                },
                "broadcast_id": {
                  "type": "string",
                  "description": "Present when `broadcast` is in `dimensions`.",
                  "format": "uuid"
                },
                "broadcast_name": {
                  "type": "string",
                  "description": "Present when `broadcast` is in `dimensions`."
                }
              },
              "additionalProperties": {
                "type": "number"
              }
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.