Skip to content

Message extras

Extras (extras) carry additional information with a message and change how clients behave. They are stored as key-value pairs and are passed in the JSON body of a POST /message request (Content-Type: application/json).

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

NamespaceDescription
client::*Reserved
client::displayChanges how the client displays the information
client::notificationConfigures the notification
android::*Reserved
android::actionReacts to events
ios::*Reserved
notifly::*Service fields set by the server — do not set them yourself
All othersDefined by end users
contentTypedescription
text/markdownDefault; the message should be rendered as markdown. HTML must be ignored.
text/plainThe message is displayed as plain text. Links may be highlighted and clickable.

Note: Notifly renders messages as markdown by default. Markdown supports displaying images via ![](img url), and these images are loaded automatically when the message is viewed. For the same reason remote content is blocked by default in email clients, automatic loading of remote images can be used to collect information about the user.

Also, if part of a message is interpolated from a malicious external source, an attacker can inject malformed markdown that leads to information disclosure.

If a message is assembled from external sources (for example, script output), it is recommended to set text/plain explicitly — plain text does not interpret markdown and reduces possible security issues.

{
"extras": {
"client::display": {
"contentType": "text/plain"
}
}
}
Clientdescription
Web adminUses GitHub Flavored Markdown
Notifly AndroidUses CommonMark

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

{
"extras": {
"client::notification": {
"click": {"url": "https://example.com/deploy/42"}
}
}
}
Clientdescription
Notifly AndroidTapping the notification opens the URL instead of the message in the feed
Notifly iOSTapping the notification opens the URL in the embedded admin (beta)

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

{
"extras": {
"client::notification": {
"bigImageUrl": "https://placekitten.com/400/300"
}
}
}
Clientdescription
Notifly AndroidYou may need to expand the notification.

onReceive.intentUrl (string): opens the URL right after the notification is delivered.

{
"extras": {
"android::action": {
"onReceive": {"intentUrl": "https://example.com/status"}
}
}
}
Clientdescription
Notifly AndroidBy default a confirmation dialog is shown before opening (the “Confirm onReceive intents” setting). For silent messages (quiet hours, maintenance windows) the URL is not opened.

Fields prefixed with notifly:: are set by the server itself. Clients read them to display the message correctly; you do not need to send them in your requests.

KeyMeaning
notifly::askThe message is an interactive question: type, options or form fields, status, answer deadline
notifly::deliveryA delivery hint. {"silent": true, "reason": "maintenance"} — the channel is in an active maintenance window: the message is shown in the feed, but silently and without alarm mode
notifly::screenshotThe key of a screenshot taken by a browser check on failure; clients show the image right in the feed
notifly::event, notifly::command, notifly::silentService frames (heartbeat status, commands to the client, etc.) — not shown as notifications; see WebSocket protocol