Push notifications

Send push notifications to users

You can send push notifications to users that have installed your xnft and have given the xnft access to send push notifications.

Before you begin, make sure you've asked the users to give push notificaiton permissions to your xnft.

They can do that by going into Profile > xNfts > Your xnft > Push notifications

Send push notification to users

POST https://xnft-api-server.xnfts.dev/v1/notifications

Note: Push notification will only be sent to users who have given push notifications access.

The notifications will appear in the notifications section of the user irrespective of that.

Headers

NameTypeDescription

Authorization*

String

secret <your-xnft-secret>

Request Body

NameTypeDescription

userIds*

String

["user_id_1", "user_id_2", "user_id_3"]

title*

String

Title of notification

body*

String

Body of notification

{
    // Response
}

If all goes well, the user should receive a push notification and see the notification in their notifications tab

Last updated