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

# Email provider metrics timeseries

> Get email delivery, open, click, bounce, failure, and spam complaint counts for a sending domain over time, bucketed by hour, day, or month and totaled across the requested inbox providers.

## Overview

**For customers using OneSignal Email.** The Email provider metrics timeseries API allows you to check email delivery, opens, clicks, bounces, failures, and spam complaints for a sending domain over time to pinpoint where deliverability problems are coming from. Metrics are bucketed by hour, day, or month.

Use it to find where deliverability is slipping and act before it drags down your whole sender reputation.

***

## How to Use this API

Use `providers[]` to narrow the totals to specific inbox providers (Gmail, Outlook, Yahoo, Apple, and more) and track how deliverability to them changes. Each event's metrics are totaled across the requested providers, or across all providers when none are given.

`start` must be before `end` and no more than 365 days ago, or 60 days ago for `hourly` granularity.

`events` is empty when the domain is not found for the app or is not currently active for sending.

***


## OpenAPI

````yaml GET /apps/{app_id}/email_analytics/provider_metrics_timeseries
openapi: 3.1.0
info:
  title: api.onesignal.com
  version: '11.6'
servers:
  - url: https://api.onesignal.com
security:
  - {}
paths:
  /apps/{app_id}/email_analytics/provider_metrics_timeseries:
    get:
      summary: Get email inbox provider metrics over time
      description: >-
        Get email delivery, open, click, bounce, failure, and spam complaint
        counts for a sending domain over time, bucketed by hour, day, or month
        and totaled across the requested inbox providers.
      operationId: get-email-provider-metrics-timeseries
      parameters:
        - name: app_id
          in: path
          description: >-
            Your OneSignal App ID in UUID v4 format. See [Keys &
            IDs](/docs/en/keys-and-ids).
          schema:
            type: string
          required: true
        - name: domain
          in: query
          description: >-
            The sending domain to report on. Must be an email domain configured
            for this app.
          required: true
          schema:
            type: string
            example: mail.example.com
        - name: start
          in: query
          description: >-
            Start of the reporting window as an ISO 8601 timestamp, for example
            `2026-08-01T00:00:00Z`. Must be before `end` and no more than 365
            days ago, or 60 days ago when `granularity` is `hourly`.
          required: true
          schema:
            type: string
            format: date-time
            example: '2026-08-01T00:00:00Z'
        - name: end
          in: query
          description: >-
            End of the reporting window as an ISO 8601 timestamp, for example
            `2026-08-08T00:00:00Z`.
          required: true
          schema:
            type: string
            format: date-time
            example: '2026-08-08T00:00:00Z'
        - name: granularity
          in: query
          description: >-
            The size of each time bucket. `hourly` is only available for the
            last 60 days.
          required: true
          schema:
            type: string
            enum:
              - hourly
              - daily
              - monthly
            example: daily
        - name: providers[]
          in: query
          description: >-
            Inbox providers to include in the totals. Repeat the parameter for
            each provider, for example `providers[]=gmail&providers[]=yahoo_us`.
            Omit to include all providers. Accepted values: `apple`, `att`,
            `canadian`, `chinese`, `comcast`, `free_fr`, `french`, `german`,
            `gmail`, `google_workspace`, `googlers`, `inbox_lv`, `italian`,
            `japanese`, `outlook_365`, `outlook_eu`, `outlook_us`, `proton`,
            `rackspace`, `russian`, `uk`, `united_online`, `yahoo_eu`,
            `yahoo_us`, `other_eu`, `other_us`, and `other`.
          required: false
          schema:
            type: array
            items:
              type: string
              example: gmail
          style: form
          explode: true
        - name: Authorization
          in: header
          description: >-
            Your App API key with prefix `Key `. See [Keys &
            IDs](/docs/en/keys-and-ids).
          required: true
          schema:
            type: string
            default: Key YOUR_APP_API_KEY
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailProviderMetricsTimeseriesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicErrorResponse'
              example:
                errors:
                  - Invalid app_id format
        '404':
          description: The referenced app was not found, or your API key cannot reach it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicErrorResponse'
        '429':
          description: >-
            Rate limit exceeded. Wait the number of seconds in the `Retry-After`
            header before retrying.
          headers:
            Retry-After:
              description: >-
                Number of seconds to wait before retrying the request. Always
                emitted on 429 responses.
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicErrorResponse'
              example:
                errors:
                  - API rate limit exceeded
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicErrorResponse'
      deprecated: false
components:
  schemas:
    EmailProviderMetricsTimeseriesResponse:
      type: object
      description: Email metrics for a sending domain over time.
      properties:
        events:
          type: array
          description: >-
            One entry for every time bucket in the reporting window, oldest
            first. Buckets with no email activity are included with all metrics
            set to `0`. Empty when the domain is not found for the app or is not
            currently active for sending.
          items:
            $ref: '#/components/schemas/EmailProviderMetricsEvent'
    BasicErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: One or more human-readable error messages.
        success:
          type: boolean
          description: >-
            Present (and `false`) on some endpoints (notifications, templates,
            segments). Not emitted by every endpoint.
        reference:
          type: array
          items:
            type: string
          description: >-
            Documentation URL fragments related to the error. Only emitted by
            the API-key auth error helpers.
    EmailProviderMetricsEvent:
      type: object
      description: >-
        Email metrics for a single time bucket, totaled across the requested
        inbox providers.
      properties:
        date:
          type: string
          format: date-time
          description: >-
            The start of the time bucket, aligned to the hour, day, or month in
            UTC.
          example: '2026-08-01T00:00:00.000Z'
        metrics:
          $ref: '#/components/schemas/EmailMetrics'
    EmailMetrics:
      type: object
      description: Email delivery and engagement counts for the reporting window.
      properties:
        sent:
          type: integer
          format: int64
          description: The number of emails sent.
          example: 100
        delivered:
          type: integer
          format: int64
          description: The number of emails successfully delivered.
          example: 95
        opened:
          type: integer
          format: int64
          description: >-
            The total number of email opens, including repeat opens by the same
            recipient.
          example: 40
        clicked:
          type: integer
          format: int64
          description: >-
            The total number of email link clicks, including repeat clicks by
            the same recipient.
          example: 10
        unique_opened:
          type: integer
          format: int64
          description: The number of emails opened at least once.
          example: 35
        unique_clicked:
          type: integer
          format: int64
          description: The number of emails with at least one link click.
          example: 8
        failed:
          type: integer
          format: int64
          description: The number of emails that failed to send.
          example: 5
        bounced:
          type: integer
          format: int64
          description: The number of emails that bounced.
          example: 3
        complained:
          type: integer
          format: int64
          description: The number of emails that recipients reported as spam.
          example: 1

````

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