Unmarshal Smart Notifications

⚡️Get Notified. Instantly! 🔔Never Miss Critical Alerts

The Smart Notification service from Unmarshal is a multi-chain feature that can be integrated on Ethereum, Binance Smart Chain, Polygon, Ziliqa and XDC Network.

🔄 Revive User Engagement

Unmarshal Smart Notification will always allow dApp owners to keep in touch with their users discreetly, providing timely helpful updates and relevant information like wallet transaction updates and trending crypto pairs, wallet balances updates, price changes and so on. They also provide a great way of getting users to engage in new promotions or features.

💬 Unmarshal Smart Notification API

The Smart Notification features a lot of aspects that can help you with your user retention. dApps can connect to the API through the cloud-based platform Firebase to send messages and notifications to users across devices.

👉 Get Notifications for

  • Wallet Transactions

  • Protocol Positions

  • Trending Pairs

  • New Token Listings

🤖 Our Smart Notification service also helps you build bots on instant messaging applications on Telegram and Slack, allowing applications to seamlessly connect with users in more than one way.

👉To start using our Smart Notification Service, please get in touch with us at partnership@unmarshal.io along with your Firebase credentials.

API KEY❗️

To get API-key / Auth-token please visit console.unmarshal.io

Subscribe for webhook Notification

POST https://notify.unmarshal.com/v1/webhook/subscribe

This endpoint allows subscription for webhook Notification. Example: Subscribe for webhook Notification https://notify.unmarshal.com/v1/webhook/subscribe with all body parameters or curl --location --request POST 'https://notify.unmarshal.com/v1/webhook/subscribe' \ --header 'x-api-key: REPLACE_WITH_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "url": "https://webhook.site/2b3d7ad6-339d-4722-bec0-69b184f19a27", "wallet_ids": ["0x47ef8edf-replace-with-address-cb5ff99b13"] }'

Headers

NameTypeDescription

x-api-key

string

Valid api-key

Request Body

NameTypeDescription

wallet_ids

array

list of wallet ids that needs to get notification

url

string

Webhook URL which accepts post request with below payload

{
    "message": "Success"
}

Webhook call request payload

{
  "wallet_address": "0x2c46a199c0bddfae4cdf5dbd89a5352a5d9c578e",
  "chain": "bsc",
  "transaction": {
    "id": "0xd077db512e09a272745f3a904bc6c59f629e76bdfc024cf06be70d2c9beadee1",
    "from": "0x2c46a199c0bddxxxxxxf5dbd89a5352a5d9c578e",
    "to": "0x10ed43c71871kkkxxxxxxx7b78b54704e256024e",
    "fee": "13618904640000000",
    "date": 1621429226,
    "status": "completed",
    "type": "swap",
    "value": "67583889390490853376",
    "received": [
      {
        "name": "XRP",
        "symbol": "XRP",
        "token_id": "0x1d2f0da169cxxxxxxxx44628db156f3f6c60dbe",
        "decimals": 18,
        "value": "20733505344636930921422"
      }
    ],
    "sent": [
      {
        "name": "WBNB",
        "symbol": "WBNB",
        "token_id": "0xbb4cdb9cbxxxxxxxxxf2de08d9173bc095c",
        "decimals": 18,
        "value": "67583889390490853376"
      }
    ],
    "description": "Swapped 67.5839 WBNB for 20733.5053 XRP"
  }
}

Subscribe for Firebase Notification

POST https://notify.unmarshal.com/v1/firebase/subscribe

This endpoint allows subscription for Firebase Notification. Example: Subscribe for Firebase Notification http://notify.unmarshal.com/v1/firebase/subscribe with all body parameters or curl --location --request POST 'https://notify.unmarshal.com/v1/firebase/subscribe' --header 'x-api-key: REPLACE_WITH_API_KEY' --header 'Content-Type: application/json' --data-raw '{"fcm_token": "FCM_TOKEN","device_id": "device_id","wallet_ids": ["0x47ef8edf-replace-with-address-cb5ff99b13"]}'

Headers

NameTypeDescription

x-api-key*

string

Valid api-key

Request Body

NameTypeDescription

fcm_token*

string

Fcm Token

wallet_ids*

array

list of valid wallet ids which needs to get notification

device_id*

string

Device Id

{
    "message": "Success"
}

Unsubscribe

POST https://notify.unmarshal.com/v1/:address/unsubscribe

This endpoint allows to unsubscribe all subscriptions for a given address

Path Parameters

NameTypeDescription

address

string

Address which needs to get unsubscribed

Query Parameters

NameTypeDescription

webhookURL

string

If provided, we'll unsubscribe only for given address and web-hook URL.

fcmToken

string

If provided, we'll unsubscribe only for given address and FCM token.

Headers

NameTypeDescription

x-api-key

string

Valid api-key

{
    "message": "Success"
}

Bulk Unsubscribe Firebase Notification

POST https://notify.unmarshal.com/v1/subscriptions/firebase/unsubscribe

This endpoint allows to unsubscribe Firebase Notification subscriptions for a given set of addresses

Headers

NameTypeDescription

x-api-key

String

Valid api-key

Request Body

NameTypeDescription

device_id*

String

Device address requesting unsubscribe

addresses*

Array[String]

Array of addresses to be unsubscribed

{
    "message":"Unsubscribed successfully",
    "unsubscribe_count": count,
}

Bulk Unsubscribe Webhook Notification

POST https://notify.unmarshal.com/v1/subscriptions/webhook/unsubscribe

This endpoint allows to unsubscribe Webhook Notification subscriptions for a given set of addresses

Headers

NameTypeDescription

x-api-key

String

Valid api-key

Request Body

NameTypeDescription

webhook_url*

String

Webhook url requesting unsubscribe

addresses*

Array[String]

Array of addresses to be unsubscribed

{
    "message":"Unsubscribed successfully",
    "unsubscribe_count": count,
}

Unsubscribe Firebase Notifications based on device id

POST https://notify.unmarshal.com/v1/subscriptions/firebase/devices/:deviceId/unsubscribe

This endpoint allows to unsubscribe firebase notifications for all addresses subscribed from a device

Path Parameters

NameTypeDescription

device_id*

String

Device for which firebase notifications are to be unsubscribed

Headers

NameTypeDescription

x-api-key

String

Valid api-key

{
    "message":"Unsubscribed successfully",
    "unsubscribe_count": count,
}

List subscriptions

GET https://notify.unmarshal.com/v1/subscriptions

This endpoint allows to list subscriptions

Query Parameters

NameTypeDescription

pageSize

string

page

string

address

string

Can be added to list subscriptions of a given address

device_id

string

Can be added to list subscriptions of a given device id

Headers

NameTypeDescription

x-api-key

string

Valid api-key

{
    "page": 1,
    "total_pages": 1,
    "items_on_page": 8,
    "data": [
        {
            "created_at": "2021-07-29T16:00:26.379556+05:30",
            "updated_at": "2021-07-29T16:00:26.379556+05:30",
            "address": "e1234507-675e-4527-b4ce-6c2416ced213",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T16:00:25.888631+05:30",
            "updated_at": "2021-07-29T16:00:25.888631+05:30",
            "address": "e31196ff-84d4-4787-bfb7-c0adc2cce5e0",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T16:00:24.267291+05:30",
            "updated_at": "2021-07-29T16:00:24.267291+05:30",
            "address": "4859abc6-b3df-4354-8195-e7eeae456cf5",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T16:00:18.260001+05:30",
            "updated_at": "2021-07-29T16:00:18.260001+05:30",
            "address": "c0b5e64b-a502-4b56-8f53-bf32737ee835",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T16:00:17.470481+05:30",
            "updated_at": "2021-07-29T16:00:17.470481+05:30",
            "address": "96940afb-8b3a-4570-a550-8c4987c4cdcb",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T15:59:34.488417+05:30",
            "updated_at": "2021-07-29T15:59:34.488417+05:30",
            "address": "Auto Loan Account",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T15:59:26.812879+05:30",
            "updated_at": "2021-07-29T15:59:26.812879+05:30",
            "address": "Investment Account",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        },
        {
            "created_at": "2021-07-29T15:59:18.632672+05:30",
            "updated_at": "2021-07-29T15:59:18.632672+05:30",
            "address": "8",
            "type": "Webhook",
            "webhook_url": "https://60c4d952ec8ef800175e0a08.mockapi.io/notification/transaction",
            "client": "CLIENT_NAME"
        }
    ]
}

List notification receipts

GET https://notify.unmarshal.com/v1/receipts

This API allows to list notification receipts

Query Parameters

NameTypeDescription

device_id

String

Can be added to list notification receipts of a given device id

transactionHash

String

Can be added to list notification receipts of a given transaction hash

Headers

NameTypeDescription

x-api-key

String

Valid api-key

{
    "page": 1,
    "total_pages": 1,
    "items_on_page": 3,
    "data": [
        {
            "channel": "Firebase",
            "type": "TransactionalNotification",
            "chain": "ethereum",
            "address": "0xc098b2a3aa256d2140208c3de6543aaef5cd3a94",
            "client": "frontier",
            "transaction_hash": "0xd53aee375a6385e6b4593bdba794566d4a38be57e6b007688b24296b5331a6eb",
            "timestamp": 1636626557,
            "notification_delay": 64736,
            "receipt": "projects/frontier-wallet/messages/0:1636626557693961%8fed36538fed3653",
            "status": "Success",
            "device_id": ""
        },
        {
            "channel": "Firebase",
            "type": "TransactionalNotification",
            "chain": "ethereum",
            "address": "0x6cc5f688a315f3dc28a7781717a9a798a59fda7b",
            "client": "frontier",
            "transaction_hash": "0xb9db66fc8f98506cbe5974c7d473defdedbdb90aa221d3a3c67de097f3c3eb6f",
            "timestamp": 1636626554,
            "notification_delay": 61031,
            "receipt": "projects/frontier-wallet/messages/1636626553882788",
            "status": "Success",
            "device_id": ""
        },
        {
            "channel": "Firebase",
            "type": "TransactionalNotification",
            "chain": "ethereum",
            "address": "0x6cc5f688a315f3dc28a7781717a9a798a59fda7b",
            "client": "frontier",
            "transaction_hash": "0x6e5ed6829d61ab54425f9c53d1fce5c25927e3d24f6aea03e01898310541a717",
            "timestamp": 1636626553,
            "notification_delay": 60675,
            "receipt": "projects/frontier-wallet/messages/1636626553591278",
            "status": "Success",
            "device_id": ""
        }
    ]
}

Conditional notification

USDT value-based filter

POST https://notify.unmarshal.com/v1/:notificationType/subscribe

This endpoint helps to apply a filter based on transaction value (in USDT) Webhook subscription example request curl --location --request POST 'https://notify.unmarshal.com/v1/webhook/subscribe'\ --header 'x-api-key: REPLACE_WITH_API_KEY'\ --header 'Content-Type: application/json'\ --data-raw '{ "url": "https://webhook.site/2b3d7ad6-339d-4722-bec0-69b184f19a27", "filter_meta_data": { "value": "1", "operator": "GreaterThanOrEqualTo" }, "filter_type": "USDTValueBasedFilter", "wallet_ids": [ "0x47ef8edf-replace-with-address-cb5ff99b13" ] }' Firebase subscription example request curl --location --request POST 'https://notify.unmarshal.com/v1/firebase/subscribe' \ --header 'x-api-key: REPLACE_WITH_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "fcm_token": "FCM_TOKEN","device_id": "DEVICE_ID", "filter_meta_data": { "value": "1", "operator": "GreaterThanOrEqualTo" }, "filter_type": "USDTValueBasedFilter", "wallet_ids": [ "0x47ef8edf-replace-with-address-cb5ff99b13" ] }'

Path Parameters

NameTypeDescription

notificationType

string

Can be webhook or firebase

Query Parameters

NameTypeDescription

x-api-key*

string

Valid API key

Request Body

NameTypeDescription

operator*

string

Can be GreaterThanOrEqualTo / LessThanOrEqualTo / EqualTo

filter_type*

string

USDTValueBasedFilter

filter_meta_data*

string

Required to capture metadata related to filter

wallet_ids*

string

List of wallet ids that needs to get notification

url/(fcm_token and device_id)*

string

Webhook URL / FCM Token

{
    "message": "Success"
}

Firebase Server Configuration

Configure firebase server credentials

POST https://notify.unmarshal.com/v1/firebase/credentials

Configure firebase server credentials example request

https://notify.unmarshal.com/v1/firebase/credentials with credentials as body parameter

curl --location --request POST 'https://notify.unmarshal.com/v1/firebase/credentials' --header 'x-api-key: REPLACE WITH API KEY' --header 'Content-Type: application/json' --data-raw ‘{ "type": REPLACE WITH TYPE, "project_id": REPLACE WITH PROJECT ID, "private_key_id": REPLACE WITH PRIVATE KEY ID, "private_key": REPLACE WITH PRIVATE KEY, "client_email": REPLACE WITH CLIENT EMAIL, "client_id": REPLACE WITH CLIENT ID, "auth_uri": REPLACE WITH AUTH URI, "token_uri": REPLACE WITH TOKEN URI, "auth_provider_x509_cert_url": REPLACE WITH AUTH PROVIDER CERTIFICATE URL, "client_x509_cert_url": REPLACE WITH CLIENT CERTIFICATE URL }'

Headers

NameTypeDescription

x-api-key

String

Valid api key

Request Body

NameTypeDescription

type

String

Account type

project_id

String

Project ID

private_key_id

String

Private key ID

private_key

String

Private key

client_email

String

Client mail ID

client_id

String

Client ID

auth_uri

String

Authentication URI

token_uri

String

Token URI

auth_provider_x509_cert_url

String

Authentication provider certificate URL

client_x509_cert_url

String

Client certificate URL

{
    "Success"
}

Steps to get firebase server credentials

For users with firebase credentials: Navigate to https://console.firebase.google.com/project/{replace with project-id}/settings/serviceaccounts/adminsdk

For users without firebase credentials:

  1. Choose project

  2. Go to project settings

  3. Choose Service Account

  4. Click on Generate new private key

  5. Copy contents on downloaded json file

Last updated