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

> Get email bounce and spam complaint rates received for the app over the last 24 hours, 7 days, and 30 days.

## Overview

**For customers using OneSignal Email.** The Email reputation API allows you to check email bounce and spam complaint rates for the app over the last 24 hours, 7 days, and 30 days.

Monitor your rates to preserve your sending reputation and ensure you remain within the limits of OneSignal's [Acceptable Use Policy (AUP)](https://onesignal.com/aup).

***

## How to Use this API

Rates are expressed as fractions of successfully delivered emails (for example, `0.02` means 2%).

A window reports `0` for both rates when the app has not successfully delivered any email in that period.

***


## OpenAPI

````yaml GET /apps/{app_id}/email_analytics/delivery_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/delivery_metrics:
    get:
      summary: Get email reputation statistics
      description: >-
        Get email bounce and spam complaint rates received for the app over the
        last 24 hours, 7 days, and 30 days.
      operationId: get-email-delivery-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: 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:
                type: object
                properties:
                  last_24_hours:
                    type: object
                    properties:
                      bounce_rate:
                        type: number
                        format: double
                        example: 0.02
                        description: >-
                          The fraction of successfully delivered emails that
                          hard or soft bounced in the last 24 hours.
                      complaint_rate:
                        type: number
                        format: double
                        example: 0.001
                        description: >-
                          The fraction of successfully delivered emails that
                          recipients reported as spam in the last 24 hours.
                  last_7_days:
                    type: object
                    properties:
                      bounce_rate:
                        type: number
                        format: double
                        example: 0.015
                        description: >-
                          The fraction of successfully delivered emails that
                          hard or soft bounced in the last 7 days.
                      complaint_rate:
                        type: number
                        format: double
                        example: 0.0008
                        description: >-
                          The fraction of successfully delivered emails that
                          recipients reported as spam in the last 7 days.
                  last_30_days:
                    type: object
                    properties:
                      bounce_rate:
                        type: number
                        format: double
                        example: 0.012
                        description: >-
                          The fraction of successfully delivered emails that
                          hard or soft bounced in the last 30 days.
                      complaint_rate:
                        type: number
                        format: double
                        example: 0.0005
                        description: >-
                          The fraction of successfully delivered emails that
                          recipients reported as spam in the last 30 days.
        '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'
              example:
                errors:
                  - App not found
        '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:
    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.

````