Skip to content

Messaging API (1.0.0)

Feature Overview

The Messaging API is responsible for messaging interactions related to email, Push Protocol or XMTP.

Authenticated endpoint overview

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.

How to authenticate

  • 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
  • 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
Languages
Servers
Production
https://api.unstoppabledomains.com/messaging/

Communities

Operations

Partner notifications

Operations

Send a message to holders of a badge

Request

Allows an authorized user to send a message to all holders of a badge that have opted-in to partner notifications

Headers
x-auth-domainstringrequired

The domain to authorize. Should match the domain specified in the body

Example: mydomain.tld
x-auth-expiresstringrequired

The expiration time of the signature

Example: 1765522015090
x-auth-signaturestringrequired

The signature generating using domain owner private key

Example: b62348775da58077591e2d20506371e8d94a5a83031f34b9ac85845d3463e73b0f0a500875830785c093515806e354cda6c217acab0fce5245d662eff4105f5e1c
Bodyapplication/jsonrequired
badgeCodestring

The badge identifier

Example: "badge1"
subjectstring

Notification subject

Example: "My new subject"
messagestring

Notification message body

Example: "This is the message content"
ctaUrlstring

Optional link the user can click for more information

Example: "https://unstoppabledomains.com"
imageUrlstring

Optional link to an image

Example: "https://unstoppabledomains.com/logo.png"
senderobject
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"
    }
  }'

Responses

Notification successful

Status

Operations

Chat

Operations