POST
/
notifications
Create a notification
curl --request POST \
  --url https://api.smokeball.com/notifications \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "staffId": "832e778f-83df-454a-b344-768a862a7e67",
  "icon": "",
  "iconColor": "#25C9A4",
  "message": "[@staffId] has **assigned** you a Task.",
  "toastyIcon": "<string>",
  "toastyMessage": "<string>",
  "actionUri": "<string>"
}'
{
  "id": "<string>",
  "href": "<string>",
  "relation": "<string>",
  "method": "GET"
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

Body

staffId
string | null

Staff id to notify.

Example:

"832e778f-83df-454a-b344-768a862a7e67"

icon
string | null

The icon to display for the notification.

Will be validated against the Smokeball icon sets.

Example:

""

iconColor
string | null

The icon hex color to display for the notification.

Example:

"#25C9A4"

message
string | null

The message to display for the notification.

Supports basic markdown syntax, such as: ** bold **, -- italic --

Supports basic UI markdown syntax for staff member id, such as [@staffId]

Example:

"[@staffId] has **assigned** you a Task."

toastyIcon
string | null

The toast notification icon to display for the notification.

toastyMessage
string | null

The toast notification message to display for the notification.

actionUri
string | null

The Smokeball uri to execute when the notification is clicked.

Response

When request is accepted. Returns a hypermedia 'Link' object of the notification to be created.

id
string | null
href
string | null
relation
string | null
method
string | null
default:GET