Skip to main content
POST
/
v1
/
regions
/
global
/
notifications
Create notification
const options = {
  method: 'POST',
  headers: {cookie: 'session=', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    type: '<string>',
    title: '<string>',
    message: '<string>',
    clickActionUrl: '<string>',
    primaryActionLabel: '<string>',
    primaryActionUrl: '<string>',
    secondaryActionLabel: '<string>',
    secondaryActionUrl: '<string>'
  })
};

fetch('https://api.example.com/v1/regions/global/notifications', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "id": "<string>"
  },
  "meta": {
    "requestId": "<string>",
    "timestamp": "2023-11-07T05:31:56Z"
  }
}

Authorizations

session
string
cookie
required

Session-based authentication via HTTP-only cookie

Body

application/json
type
string
required

Notification event type

title
string
required
message
string
required
clickActionUrl
string | null
primaryActionLabel
string | null
primaryActionUrl
string | null
secondaryActionLabel
string | null
secondaryActionUrl
string | null

Response

Notification created

success
enum<boolean>
Available options:
true
data
object
meta
object