Notifications
Create
Changed onYou 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 URLhttps://<base_url>
- AuthHTTP bearer
Headers
Acceptstring
e.g. application/json
Request body
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
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
- info
added the media type
application/jsonfor the response with the status
- info
- info
the endpoint scheme security
oauth2was removed from the API
- info