Get Pushes with Message Center API
  • 07 Aug 2023
  • 1 Minute to read

    Get Pushes with Message Center API


      Article Summary

      Overview

      Message Center API allows you to get the push notifications of any type delivered to your users during a defined time interval, including the push notifications delivered in Architect journeys.

      Endpoint and Headers

      POST https://mobile.useinsider.com/api/message_center/v1

      Headers

      HeaderSample ValueDescription
      X-INSIDER-API-KEY1a2b3c4d5e6fThis key is required to authorize your request. Refer to API Authentication Tokens to get your token.
      Content-Typeapplication/jsonThis header specifies the media type of the resource.

      Body Parameters

      ParameterDescriptionData TypeRequired
      identifiersUser's identifier information. Identifiers can be Email, Phone Number, UUID (unique user ID), or a custom identifier. The identifiers need to be written in the mentioned letter cases in the request, while the custom attribute needs to be written in the attribute_name format.ObjectYes
      start_dateStart date of the timeline push notifications are delivered within, in timestamp format.IntegerYes
      end_dateEnd date of the timeline push notifications are delivered within, in timestamp format.IntegerYes
      limitNumber of push notifications you can get in one request. The value can be between1-100. IntegerYes

      Sample Example

      Sample Body

      Before sending the request, make sure to replace the values in your request body.

      {
        "identifiers": {
          "Email": "j.doe@mail.com"
        },
        "start_date": 1633068172,
        "end_date": 2143433430,
        "limit": 100
      }

      Sample Responses

      200 OK

      The following is a sample response for a successful request with a limit of 3.

      [
          {
              "camp_id": 650,
              "camp_type": "Single Push",
              "created_at": "2023-01-23T18:10:17Z",
              "deep_links": {
                  "Page": "Cart",
                  "category": "insider_int_push",
                  "mutable-content": "1"
              },
              "message": "This is my message",
              "title": "This is my title 💜 ",
              "variant_id": 1907
          },
          {
              "camp_id": 101,
              "camp_type": "Recurring Push",
              "created_at": "2023-01-18T21:00:21Z",
              "deep_links": {
                  "MyKey01": "MyValue01"
              },
              "message": "New women's clothing has launched...",
              "title": "Don't forget about me!",
              "variant_id": 898
          },
          {
              "camp_id": 132,
              "camp_type": "Recurring Push",
              "created_at": "2023-01-18T21:00:20Z",
              "deep_links": {
                  "Page": "Cart",
                  "MyKey02": "MyValue02"
              },
              "message": "You favorite items are waiting for you. ",
              "title": "Retail",
              "variant_id": 1122
          }
      ]

      400 Bad Request

      The following is a sample response for a request where the start date is greater than the end date.

      bad payload

      400 Bad Request

      The following is a sample response for a request where the limit is greater than 100.

      limit should be between 1 and 100.

      401 Unauthorized

      A request with an invalid API key will return a 401 Unauthorized response.

      Limitations

      • All functions must be executed with a simple HTTPS POST request.
      • Each request can get push notifications only for one single user.

      Was this article helpful?

      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses