Allows an authorized user to send a message to all holders of a badge that have opted-in to partner notifications
Messaging API (1.0.0)
The Messaging API is responsible for messaging interactions related to email, Push Protocol or XMTP.
This API uses signed messages to validate a given wallet is authorized to submit the request. Authentication headers must be provided using the approach described below.
- Determine the message that must be signed through the message generator endpoint
- Request GET /api/user/{domain}/signature?device=true&expiry={timestamp}
- Replace '{domain}' with desired domain
- Replace '{expiry}' with desired Unix epoch timestamp
- Response contains the message that must be signed
- Message is a unique hash value
- Represents combination of provided request parameters
- Includes an expiration timestamp
- Request GET /api/user/{domain}/signature?device=true&expiry={timestamp}
- User must sign the message returned by the message generator API
- For example, the Metamask wallet could be used to sign the message
- Generated signature is used in header of subsequent GET or POST request
- Construct a request to the desired endpoint that requires user authentication
- Must include headers
- x-auth-domain - Must equal the {domain} in context
- x-auth-expiration - Must equal the {expiry} timestamp in the signed message
- x-auth-signature - Must be set to the value of the user generated signature
- Must include headers
Languages
Servers
Production
https://api.unstoppabledomains.com/messaging/
Bodyapplication/jsonrequired
Optional link the user can click for more information
Example: "https://unstoppabledomains.com"
- Productionhttps://api.unstoppabledomains.com/messaging/push/notification/badge
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
curl -i -X POST \
https://api.unstoppabledomains.com/messaging/push/notification/badge \
-H 'Content-Type: application/json' \
-H 'x-auth-domain: mydomain.tld' \
-H 'x-auth-expires: 1765522015090' \
-H 'x-auth-signature: b62348775da58077591e2d20506371e8d94a5a83031f34b9ac85845d3463e73b0f0a500875830785c093515806e354cda6c217acab0fce5245d662eff4105f5e1c' \
-d '{
"badgeCode": "badge1",
"subject": "My new subject",
"message": "This is the message content",
"ctaUrl": "https://unstoppabledomains.com",
"imageUrl": "https://unstoppabledomains.com/logo.png",
"sender": {
"domain": "matt.x"
}
}'