> ## 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

> Get email delivery, open, click, bounce, failure, and spam complaint counts for a sending domain, broken down by inbox provider.

## Overview

**For customers using OneSignal Email.** The Email provider metrics API allows you to check email delivery, opens, clicks, bounces, failures, and spam complaints broken down by inbox provider (Gmail, Outlook, Yahoo, Apple, and more) to pinpoint where deliverability problems are coming from.

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

***

## How to Use this API

Metrics are reported for a single sending domain over the requested time range.

`start` must be before `end` and no more than 365 days ago.

`providers` in the response will be 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
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:
    get:
      summary: Get email inbox provider metrics
      description: >-
        Get email delivery, open, click, bounce, failure, and spam complaint
        counts for a sending domain, broken down by inbox provider.
      operationId: get-email-provider-metrics
      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.
          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: 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/EmailProviderMetricsResponse'
        '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:
    EmailProviderMetricsResponse:
      type: object
      description: Email metrics for a sending domain, broken down by inbox provider.
      properties:
        providers:
          type: array
          description: >-
            One entry per inbox provider that received email from the domain
            during the reporting window. Empty when the domain is not found for
            the app or is not currently active for sending.
          items:
            $ref: '#/components/schemas/EmailProviderMetrics'
    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.
    EmailProviderMetrics:
      type: object
      description: Email metrics for a single inbox provider.
      properties:
        provider:
          type: string
          description: >-
            The inbox provider. Known values include `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`. New providers may be added over
            time.
          example: gmail
        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.