Docs

  • Channels Channels
  • Beams Beams
  • Developers
  • Support
  • Blog
  • Sign up
    • Search powered by Algolia
    • Sign in
    • Sign up
    • Channels
    • Beams
    • Getting started
      • Android
        • 1. Configure FCM
        • 2. Integrate SDK
        • 3. Initialize Beams
        • 4. Publish Notifications
      • iOS
        • 1. Configure APNS
        • 2. Integrate SDK
        • 3. Publish Notifications
      • Web
        • 1. SDK integration
        • 2. Safari configuration
      • Flutter
        • 1. Configure FCM and APNS
        • 2. Integrate SDK
        • 4. Publish Notifications
    • Concepts
      • Subscribers
      • Device interests
      • Authenticated users
      • Insights
      • Webhooks
    • Guides
      • Handle incoming notifications
        • Android
        • iOS
        • Web
        • Flutter
      • Publishing to multiple devices
      • Publish to specific user
        • Android
        • iOS
        • Web
        • Flutter
      • Web push guides
        • Using an existing service worker
        • Web notification permissions in Firefox
        • Handling Safari certificate expiration
    • Reference
      • Client SDKs
        • Android
        • iOS
        • Web
      • All Libraries
      • Server SDKs
        • Go
        • PHP
        • Node.js
        • Python
        • Java/Kotlin
        • Ruby
        • Swift
      • API
        • Publish API
        • Customer API
        • Device API
        • Reporting API
        • Webhooks
      • Platform Publish Formats
    • Pusher lab

    Reporting API

    This is the API used by our Android, iOS and Web SDKs to report back notification events.

    We highly recommend that you use our official Android, iOS and Web SDKs. If your use case requires this documentation, please contact us betterbeams@pusher.com

    ∞ Reporting a notification acknowledgment

    This event should be triggered when a device receives a notification.

    POST https://<YOUR_INSTANCE_ID>.pushnotifications.pusher.com/reporting_api/v2/instances/<YOUR_INSTANCE_ID>/events

    ∞ Request headers

    The following headers are necessary:

    • Content-Type: with the value always set to application/json.

    ∞ Request body

    A JSON object with the following keys:

    ∞ eventString Required

    Must be set to delivery.

    ∞ publishIdString Required

    The ID used to identify the publish request that led to this notification.

    ∞ deviceIdString Required

    The ID used to identify the device.

    ∞ timestampSecsInt Required

    The unix timestamp in seconds.

    ∞ userIdString Optional

    The ID of the User that received this notification. This is required if using Authenticated Users and Webhooks.

    ∞ appInBackgroundBoolean Optional

    Describes if the application was in background when a notification was delivered.

    ∞ hasDisplayableContentBoolean Optional

    Describes if the notification had an UI element to the user.

    ∞ hasDataBoolean Optional

    Describes if the notification contained an additional data payload.

    ∞ Response

    If the event is well formed, the success response will be a 200 OK.

    ∞ Error Responses

    Title Status Code Description
    Invalid content type 400 Only application/json is supported.
    Incomplete Request 400 instance-id param is missing from path.
    Bad request 400 The instance id given is invalid. It is expected to be in this format: 426abfc7-41fe-492f-bcf1-27586fa9bd3f .
    Bad request 400 Failed to read body as a JSON object.
    Bad request 400 event is missing from body.
    Bad request 400 publishId is missing from body.
    Bad request 400 deviceId is missing from body.
    Bad request 400 timestampSecs is missing from body.
    Something went wrong 500 Internal server error.

    ∞ Reporting a notification open

    This event should be triggered when a user taps on a notification.

    POST https://<YOUR_INSTANCE_ID>.pushnotifications.pusher.com/reporting_api/v2/instances/<YOUR_INSTANCE_ID>/events

    ∞ Request headers

    The following headers are necessary:

    • Content-Type: with the value always set to application/json.

    ∞ Request body

    A JSON object with the following keys:

    ∞ eventString Required

    Must be set to open.

    ∞ publishIdString Required

    The ID used to identify the publish request that led to this notification.

    ∞ deviceIdString Required

    The ID used to identify the device.

    ∞ timestampSecsInt Required

    The unix timestamp in seconds.

    ∞ userIdString Optional

    The ID of the User that received this notification. This is required if using Authenticated Users and Webhooks.

    ∞ Response

    If the event is well formed, the success response will be a 200 OK.

    ∞ Error Responses

    Title Status Code Description
    Invalid content type 400 Only application/json is supported.
    Incomplete Request 400 instance-id param is missing from path.
    Bad request 400 The instance id given is invalid. It is expected to be in this format: 426abfc7-41fe-492f-bcf1-27586fa9bd3f .
    Bad request 400 Failed to read body as a JSON object.
    Bad request 400 event is missing from body.
    Bad request 400 publishId is missing from body.
    Bad request 400 deviceId is missing from body.
    Bad request 400 timestampSecs is missing from body.
    Something went wrong 500 Internal server error.

    Contents

    • Reporting a notification acknowledgment
      • Request headers
      • Request body
      • Response
      • Error Responses
    • Reporting a notification open
      • Request headers
      • Request body
      • Response
      • Error Responses

    Spotted something that isn’t quite right? Create an issue on GitHub.

    Copyright © 2023 Pusher Ltd. All rights reserved.

    • Support,
    • Status
    • Follow Pusher on Twitter Twitter
    • Subscribe to Pusher’s channel on YouTube
    • Follow Pusher on LinkedIn
    • Follow Pusher on Github GitHub
    • Follow Pusher on Twitch Twitch
    • Follow Pusher on Discord Discord