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.
Creates a new Push Protocol token gated group if it does not yet exists. The group is associated with an Unstoppable Domains badge.
Group created successfully
Badge not found
{- "badgeCode": 123
 
}Request to join a token gated community for a given wallet address. The request is granted if the token gating requirements are satisfied.
Group joined successfully
Wallet not authorized to join group
Group not found
{- "address": 291,
 - "badgeCode": 123,
 - "signature": 291
 
}Request to leave a token gated community for a given wallet address.
Group was left successfully
Group not found
{- "address": 291,
 - "badgeCode": 123,
 - "signature": 291
 
}Allows an authorized user to send a message to all holders of a badge that have opted-in to partner notifications
Notification successful
Notification not authorized
Domain not found
{- "badgeCode": "badge1",
 - "subject": "My new subject",
 - "message": "This is the message content",
 - "sender": {
- "domain": "matt.x"
 
} 
}The provided address is cross referenced against algorithms to suggest whether it has generated spam messages
Registration successful
{- "isSpam": true
 
}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.
Accept successful
Accept not authorized
Not found
{- "ownerAddress": 123,
 - "signedPublicKey": 456,
 - "registrations": [
- {
- "accept": true,
 - "block": true,
 - "topic": "topic-123",
 - "peerAddress": "string",
 - "signature": "<signed topic ID>"
 
} 
] 
}Block the specified XMTP topics and report as spam
Accept successful
Accept not authorized
Not found
{- "ownerAddress": 123,
 - "signedPublicKey": 456,
 - "registrations": [
- {
- "accept": true,
 - "block": true,
 - "topic": "topic-123",
 - "peerAddress": "string",
 - "signature": "<signed topic ID>"
 
} 
] 
}Handles registration of XMTP topics to associate with mobile device tokens to receive push notifications
Registration successful
Notification not authorized
Not found
{- "ownerAddress": 123,
 - "signedPublicKey": 456,
 - "registrations": [
- {
- "accept": true,
 - "block": true,
 - "topic": "topic-123",
 - "peerAddress": "string",
 - "signature": "<signed topic ID>"
 
} 
] 
}