Skip to content

Additional message fields

Additional fields are used to convey extra information, modify client behavior, etc. Extras are stored in a key-value schema and are accepted only in POST /message requests with the content type application/json.

Keys under .extras must be in the following format: <top-namespace>::[<sub-namespace>::]<action>. Some of the namespaces are used by official clients:

NamespaceDescription
client::*Reserved
client::displayAlters how the client displays information
client::notificationConfigures notification
android::*Reserved
android::actionResponds to events
ios::*Reserved
server::*Reserved
All othersDefined by end users
contentTypedescription
text/plainDefault; the message will be displayed as plain text. Links may be highlighted and interactive.
text/markdownThe message should be rendered as markdown. HTML must be ignored.

Note: Markdown supports displaying images via ![](img url), these images will be automatically loaded when viewing the message. Similar to why remote content is blocked by default in mail clients, automatic loading of remote images can be used to collect information from the user.

Also, if part of the message is interpolated from a malicious external source, an attacker may inject malformed markdown that results in information disclosure.

It is recommended to use text/plain to reduce potential security issues when using text from external sources such as script output.

{
"extras": {
"client::display": {
"contentType": "text/plain"
}
}
}
Clientsincedescription
Notifly Web UIv2.0.5Uses GitHub Flavored Markdown
Notifly Androidv2.0.7Uses commonmark-spec

click.url (string): opens a URL when the notification is clicked.

{
"extras": {
"client::notification": {
"click": {"url": "https://notifly.net"}
}
}
}
Clientsincedescription
Notifly Androidv2.0.10Prevents opening the Notifly app by default

bigImageUrl (string): shows a large image in the notification.

{
"extras": {
"client::notification": {
"bigImageUrl": "https://placekitten.com/400/300"
}
}
}
Clientsincedescription
Notifly Androidv2.3.0May require expanding the notification.

onReceive.intentUrl (string): opens an intent after the notification is delivered.

{
"extras": {
"android::action": {
"onReceive": {"intentUrl": "https://notifly.net"}
}
}
}
Clientsincedescription
Notifly Androidv2.0.11You must enable “Intent Action Permission” in the app settings, otherwise this feature only works when the app is active.