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

Creates a new Push Protocol token gated group

Request

Creates a new Push Protocol token gated group if it does not yet exists. The group is associated with an Unstoppable Domains badge.

Bodyapplication/jsonrequired
badgeCodestring

Badge code associated with the token gated group

Example: 123
curl -i -X POST \
  https://api.unstoppabledomains.com/messaging/push/group \
  -H 'Content-Type: application/json' \
  -d '{
    "badgeCode": 123
  }'

Responses

Group created successfully

Request to join a Push Protocol token gated community

Request

Request to join a token gated community for a given wallet address. The request is granted if the token gating requirements are satisfied.

Bodyapplication/jsonrequired
addressstring

Wallet address to join the token gated group

Example: 291
badgeCodestring

Badge code associated with the token gated group

Example: 123
signaturestring

Signature of the badge code created with user's Push Protocol private key

Example: 291
curl -i -X POST \
  https://api.unstoppabledomains.com/messaging/push/group/join \
  -H 'Content-Type: application/json' \
  -d '{
    "address": 291,
    "badgeCode": 123,
    "signature": 291
  }'

Responses

Group joined successfully

Request to leave a Push Protocol token gated community

Request

Request to leave a token gated community for a given wallet address.

Bodyapplication/jsonrequired
addressstring

Wallet address to join the token gated group

Example: 291
badgeCodestring

Badge code associated with the token gated group

Example: 123
signaturestring

Signature of the badge code created with user's Push Protocol private key

Example: 291
curl -i -X POST \
  https://api.unstoppabledomains.com/messaging/push/group/leave \
  -H 'Content-Type: application/json' \
  -d '{
    "address": 291,
    "badgeCode": 123,
    "signature": 291
  }'

Responses

Group was left successfully

Partner notifications

Operations

Status

Operations

Chat

Operations