Message extras
Additional extras are used to pass extra information, change client behavior, etc.
Extras are stored in a key-value schema and are only accepted in POST /message requests with content type application/json.
Namespaces
Section titled “Namespaces”Keys under .extras must be in the following format: <top-namespace>::[<sub-namespace>::]<action>.
Some namespaces are used by official clients:
| Namespace | Description |
|---|---|
client::* | Reserved |
client::display | Changes how the client displays information |
client::notification | Configures the notification |
android::* | Reserved |
android::action | Reacts to events |
ios::* | Reserved |
server::* | Reserved |
| All others | Defined by end users |
client::display
Section titled “client::display”contentType
Section titled “contentType”Definition
Section titled “Definition”| contentType | description |
|---|---|
text/markdown | Default; the message should be rendered as markdown. HTML must be ignored. |
text/plain | The message will be displayed as plain text. Links may be highlighted and interactive. |
Note: Notifly renders messages as markdown by default. Markdown supports displaying images via
, and those images will be automatically fetched when viewing a message. Similar to why remote content is blocked by default in mail clients, automatically fetching remote images can be used to gather information about the user.Also, if part of the message is interpolated from a malicious external source, an attacker can inject malformed markdown that leads to information disclosure.
If a message is constructed from external sources (e.g., script output), it is recommended to explicitly set
text/plain— plain text does not interpret markdown and reduces potential security issues.
Example
Section titled “Example”{ "extras": { "client::display": { "contentType": "text/plain" } }}Support
Section titled “Support”| Client | since | description |
|---|---|---|
| Notifly Web UI | v2.0.5 | Uses GitHub Flavored Markdown |
| Notifly Android | v2.0.7 | Uses commonmark-spec |
client::notification
Section titled “client::notification”click.url
Section titled “click.url”click.url (string): opens a URL when the notification is clicked.
Example
Section titled “Example”{ "extras": { "client::notification": { "click": {"url": "https://notifly.net"} } }}Support
Section titled “Support”| Client | since | description |
|---|---|---|
| Notifly Android | v2.0.10 | Prevents opening the Notifly app by default |
bigImageUrl
Section titled “bigImageUrl”bigImageUrl (string): shows a large image in the notification.
Example
Section titled “Example”{ "extras": { "client::notification": { "bigImageUrl": "https://placekitten.com/400/300" } }}Support
Section titled “Support”| Client | since | description |
|---|---|---|
| Notifly Android | v2.3.0 | May require expanding the notification. |
android::action
Section titled “android::action”onReceive.intentUrl
Section titled “onReceive.intentUrl”onReceive.intentUrl (string): opens an intent after the notification is delivered.
Example
Section titled “Example”{ "extras": { "android::action": { "onReceive": {"intentUrl": "https://notifly.net"} } }}Support
Section titled “Support”| Client | since | description |
|---|---|---|
| Notifly Android | v2.0.11 | ”Intent Action Permission” must be enabled in the app settings, otherwise this feature only works when the app is active. |