Notification

getNotificationsV2

Changed on

Get notifications items. These items may eventually contain entities within their payload, which can be hydrated by the client if desired by calling the Entity API directly.

get/v2/notification/notifications

Request

  • Base URL
    https://notification.sls.epilot.io
  • URL
    https://notification.sls.epilot.io/v2/notification/notifications
  • Auth
    • HTTP bearer
    • or API key in header x-epilot-org-id

Query parameters

cursorstring

Base64 encoded cursor to be used for pagination

after_idinteger
limitinteger

The numbers of items to return

Response

Success

cursorstring

Base64 encoded cursor to be used for pagination

totalinteger
total_unreadinteger

Example response

{
  "cursor": "eyJjcmVhd",
  "total": 1,
  "total_unread": 1,
  "results": [
    {
      "id": 123456789,
      "notification_id": 123456789,
      "type": "workflow",
      "redirect_url": "https://epilot.cloud",
      "organization_id": "206801",
      "title": {
        "en": "My custom notification",
        "de": "Meine benutzerdefinierte Aktivität"
      },
      "message": {
        "en": "{{caller}} did something with {{contact.entity.id}} {{branch.name}}.",
        "de": "{{caller}} habe etwas damit gemacht {{contact.entity.id}} {{branch.name}}."
      },
      "payload": {
        "entity": {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "schema": "contact"
        }
      },
      "caller": {
        "EpilotAuth": {
          "token": {
            "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
            "cognito:groups": [
              "Administrator"
            ],
            "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
            "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
            "custom:ivy_org_id": "739224",
            "cognito:username": "n.ahmad@epilot.cloud",
            "custom:ivy_user_id": "10006129",
            "cognito:roles": [
              "arn:aws:iam::912468240823:role/base-administrator-role"
            ],
            "aud": "6e0jbdnger7nmoktaaflarue1l",
            "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
            "token_use": "id",
            "auth_time": 1614333023,
            "exp": 1614336623,
            "iat": 1614333023,
            "email": "n.ahmad@epilot.cloud"
          }
        }
      },
      "operations": [
        {
          "operation": "updateEntity",
          "params": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "slug": "contact"
          },
          "payload": {
            "_schema": "contact",
            "_org": "123",
            "status": "Inactive"
          }
        }
      ],
      "force_notify_users": {
        "12345": {
          "email": false,
          "in_app": false
        }
      },
      "allowed_channels": [
        "in_app"
      ]
    }
  ]
}

Changes

    • info

      added the optional property ////// to the response with the status