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

Status

Operations

Chat

Operations

Determine if an address is marked as source of spam

Request

The provided address is cross referenced against algorithms to suggest whether it has generated spam messages

curl -i -X GET \
  'https://api.unstoppabledomains.com/messaging/xmtp/spam/{address}'

Responses

Registration successful

Bodyapplication/json
isSpamboolean

Address spam value

Response
application/json
{ "isSpam": true }

Accept an XMTP chat request

Request

New XMTP chats are not show in the Unstoppable Messaging inbox by default. After a topic is accepted by the user, it is shown in the default view.

Bodyapplication/jsonrequired
ownerAddressstring

Domain owner public wallet address

Example: 123
signedPublicKeystring

XMTP account public key

Example: 456
registrationsArray of objects(SerializedTopicPost)
curl -i -X POST \
  https://api.unstoppabledomains.com/messaging/xmtp/topics/accept \
  -H 'Content-Type: application/json' \
  -d '{
    "ownerAddress": 123,
    "signedPublicKey": 456,
    "registrations": [
      {
        "accept": true,
        "block": true,
        "topic": "topic-123",
        "peerAddress": "string",
        "signature": "<signed topic ID>"
      }
    ]
  }'

Responses

Accept successful

Block an XMTP conversation

Request

Block the specified XMTP topics and report as spam

Bodyapplication/jsonrequired
ownerAddressstring

Domain owner public wallet address

Example: 123
signedPublicKeystring

XMTP account public key

Example: 456
registrationsArray of objects(SerializedTopicPost)
curl -i -X POST \
  https://api.unstoppabledomains.com/messaging/xmtp/topics/block \
  -H 'Content-Type: application/json' \
  -d '{
    "ownerAddress": 123,
    "signedPublicKey": 456,
    "registrations": [
      {
        "accept": true,
        "block": true,
        "topic": "topic-123",
        "peerAddress": "string",
        "signature": "<signed topic ID>"
      }
    ]
  }'

Responses

Accept successful

Register an XMTP topic for mobile push notifications

Request

Handles registration of XMTP topics to associate with mobile device tokens to receive push notifications

Bodyapplication/jsonrequired
ownerAddressstring

Domain owner public wallet address

Example: 123
signedPublicKeystring

XMTP account public key

Example: 456
registrationsArray of objects(SerializedTopicPost)
curl -i -X POST \
  https://api.unstoppabledomains.com/messaging/xmtp/topics/register \
  -H 'Content-Type: application/json' \
  -d '{
    "ownerAddress": 123,
    "signedPublicKey": 456,
    "registrations": [
      {
        "accept": true,
        "block": true,
        "topic": "topic-123",
        "peerAddress": "string",
        "signature": "<signed topic ID>"
      }
    ]
  }'

Responses

Registration successful