Netmera Developer Guide
Netmera Docs
  • Netmera Developer Guide
  • Platforms
    • iOS
      • New iOS (Swift)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Widget and In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Advertising ID
        • Changelog
      • Former iOS (Objective-C)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Push Payload Receivers
          • Widget and In-App Messages
          • Customizing In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
          • Custom Web View Presentation
          • Push Icon
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Data Transfer
        • Advertising ID
        • SSL Pinning
        • Changelog
    • Android
      • SDK Integration
        • Huawei Integration
        • Huawei Message Receipt
        • Custom FCM and HMS Implementations
        • Android Integration FAQs
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
        • Custom Web View Presentation
        • Push Icon
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
        • Background Location Permission
      • User & Attributes
      • Data Transfer
      • Advertising ID
      • App Tracking
      • SSL Pinning
      • Changelog
    • Web
      • SDK Setup
        • Self-Hosted SDK Setup
      • Mobile Web Push for iOS
      • Deep Linking
        • Custom Deep Links
      • Events
      • User & Attributes
    • React Native
      • SDK Integration
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • Changelog
    • Flutter
      • SDK Integration
        • Custom FCM and HMS Implementations
      • Push Notifications
        • Push Notification Permissions
        • Widget and In-App Messages
        • Flutter iOS Media Push
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • SSL Pinning
      • Changelog
    • Cordova
      • SDK Integration
      • Push Notifications
      • Sound & Vibration
      • Push Inbox
      • Events
      • User & Attributes
    • Unity
      • SDK Integration
      • Sound & Vibration
      • Events
      • User & Attributes
      • Changelog
  • Integrated Modules
    • Optimove
    • Adjust
    • Mixpanel
    • IYS Integration
    • VIA Integration
      • Short URL Consent Requests
      • OTP Consent Requests
        • OTP Confirmation Completion
      • VIA Email Rejection Link Generation
      • ETK Rejection via SMS
  • API Documentation
    • REST API
      • Setup
      • Notifications
      • Events
      • User & Device Management
      • Inbox Feature
      • GDPR
      • Error Responses
  • FAQs
    • Push Notifications FAQs
Powered by GitBook
On this page
  • Parameters Sent in the Body and Their Meanings
  • REST/3.0/inbox/getAllInbox
  • REST/3.0/inbox/getAllInbox - Sample Response
  • REST/3.0/inbox/get?piid=
  • REST/3.0/inbox/statusChange
  • Using the Index Parameter

Was this helpful?

  1. API Documentation
  2. REST API

Inbox Feature

Parameters Sent in the Body and Their Meanings

  1. extId: This parameter represents the unique ID assigned to the user. It is a mandatory field and expects a string value.

  2. status: Indicates the status of messages in the user's inbox. It can take one of three values:

This field is mandatory and expects an integer value.

  • 1 (read)

  • 2 (unread)

  • 3 (read - unread but not deleted)

  • 4 (deleted)

  • 7 (all)

  1. numberOfNotification: Specifies the number of notifications/messages the client wants to see on a single page. It is not mandatory and expects an integer value. If not used, the default is to display the last 20 messages.

  2. prms: Contains the index parameter. The index value expects the pushInstanceId. This field is not mandatory and expects a long value.

  3. startDate: Specifies the start date of the inbox messages to be retrieved. It expects an epoch timestamp in milliseconds. This field is not mandatory and expects a long value.

  4. endDate: Specifies the end date of the inbox messages to be retrieved. It expects an epoch timestamp in milliseconds. This field is not mandatory and expects a long value.

  5. category: Indicates the message category. It is not mandatory and expects an integer array.

  6. piids: Expects the pushInstanceIds of the messages for which the status is to be changed. This field is mandatory and expects an integer array.

REST/3.0/inbox/getAllInbox

This endpoint is used to get all of the user inbox.

curl -X POST \
-H "X-netmera-api-key: your_rest_api_key" \
-H "Content-Type: application/json" \
-d '{
    "extId":"your_xid",
    "status": 2,
    "startDate":1681635178000,
    "endDate":1684227178000,
    "numberOfNotification":3,
    "prms": {
        "index": 2582035
    }
}' \
https://restapi.netmera.com/rest/3.0/inbox/getAllInbox

REST/3.0/inbox/getAllInbox - Sample Response

msgs": [
        {
            "msgId": 25965,
            "pushInstanceId": 3101819,
            "title": "test",
            "message": "Test",
            "deeplink": null,
            "androidMediaUrl": null,
            "iosMediaUrl": null,
            "personalizedMsg": null,
            "personalizedTitle": null,
            "subText": "test",
            "status": "UNREAD",
            "customParams": {},
            "personalizedSubText": null
            "sts": 1681635178000
        }
    ],
    "cnts": {
        "2": 1
    }
}

REST/3.0/inbox/get?piid=

curl --location --request GET 'https://restapi.netmera.com/rest/3.0/inbox/get?piid=3103726' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw ''

REST/3.0/inbox/statusChange

This endpoint is used for changing status of messages in the user inbox.

curl --location --request POST 'https://restapi.netmera.com/rest/3.0/inbox/statusChange' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "extId": "your_xid",
    "piids": [
        2584151
    
],
"st": 4
}'

Using the Index Parameter

Let's assume a user has 5 messages in their inbox. To view the latest 3 messages (by specifying the desired number of messages in numberOfNotification), an API request is made.

As a result of this request, if the total number of messages in the inbox is greater than the desired number of messages to be displayed, the prms object will contain an index value. The index value will be equal to the pushInstanceId of the last message displayed on that page. This allows you to navigate through the messages in a paginated manner.

Request Sent

curl -X POST \
-H "X-netmera-api-key: your_rest_api_key" \
-H "Content-Type: application/json" \
-d '{
    "extId": "your extID"
}' \
https://restapi.netmera.com/rest/3.0/inbox/getAllInbox
PreviousUser & Device ManagementNextGDPR

Last updated 1 month ago

Was this helpful?