Notifications

You may create a new single notification or multiple notifications using this action.
When creating a single notification the body contains a json object, when creating multiple notifications the body contains an array of objects.
Warning: a maximum of 1000 items can be sent in a single request.

post/public/api/notifications

Request

  • Base URL
    https://<base_url>
  • Auth
    HTTP bearer

Headers

Acceptstring

e.g. application/json

Request body

user_idsstring[]
group_idsstring[]
titlestring
bodystring
modestring
entity_typestring
entity_idstring

Example request

{
  "user_ids": [
    "5babb8a69fa6ae919f675715",
    "5babb8a69fa6ae919f675716"
  ],
  "group_ids": [
    "company_employees"
  ],
  "title": "Major news",
  "body": "New deal signed with ...",
  "mode": "push",
  "entity_type": "news",
  "entity_id": "54ab03c6546847ee0d30084a"
}

Response

OK

notification_idstring required
user_idsstring[] required
titlestring required
bodystring required
modestring required
entity_typestring required
entity_idstring required
push_recipientsnumber required
sender_idstring required
created_datestring required
updated_datestring required

Example response

[
  {
    "notification_id": "5b2122014ebf5300360acae1",
    "user_ids": [
      "5babb8a69fa6ae919f675716",
      "5babb8a69fa6ae919f675717"
    ],
    "title": "New mission available!",
    "body": "Your new mission has been created and is ready to start.",
    "mode": "push",
    "entity_type": "missions",
    "entity_id": "54ab03c6546847ee0d30084a",
    "push_recipients": 2,
    "sender_id": "5c6be69a65067e004742a82a",
    "created_date": "2019-05-23T04:51:40.862Z",
    "updated_date": "2019-05-23T04:51:40.862Z"
  },
  {
    "notification_id": "5b2122014ebf5300360acaf2",
    "user_ids": [
      "5babb8a69fa6ae919f675716",
      "5babb8a69fa6ae919f675717"
    ],
    "title": "Update in news feed",
    "body": "A new post on the news feed is available.",
    "mode": "push",
    "entity_type": "news",
    "entity_id": "54ab03c6546847ee0d30081a",
    "push_recipients": 2,
    "sender_id": "5c6be69a65067e004742a82a",
    "created_date": "2019-05-23T04:51:40.862Z",
    "updated_date": "2015-09-07T11:40:58.643Z"
  }
]

Changes