# Messaging API # 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 Version: 1.0.0 ## Servers Production ``` https://api.unstoppabledomains.com/messaging ``` ## Download OpenAPI description [Messaging API](https://docs.unstoppabledomains.com/_bundle/apis/messaging-v1/openapi.yaml) ## Communities ### Creates a new Push Protocol token gated group - [POST /push/group](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/communities/paths/~1push~1group/post.md): Creates a new Push Protocol token gated group if it does not yet exists. The group is associated with an Unstoppable Domains badge. ### Request to join a Push Protocol token gated community - [POST /push/group/join](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/communities/paths/~1push~1group~1join/post.md): Request to join a token gated community for a given wallet address. The request is granted if the token gating requirements are satisfied. ### Request to leave a Push Protocol token gated community - [POST /push/group/leave](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/communities/paths/~1push~1group~1leave/post.md): Request to leave a token gated community for a given wallet address. ## Partner notifications ### Send a message to holders of a badge - [POST /push/notification/badge](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/partner-notifications/paths/~1push~1notification~1badge/post.md): Allows an authorized user to send a message to all holders of a badge that have opted-in to partner notifications ## Status ### status probe - [GET /status](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/status/paths/~1status/get.md): This route can be used to determine if the application service is alive ## Chat ### Determine if an address is marked as source of spam - [GET /xmtp/spam/{address}](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/chat/paths/~1xmtp~1spam~1%7Baddress%7D/get.md): The provided address is cross referenced against algorithms to suggest whether it has generated spam messages ### Accept an XMTP chat request - [POST /xmtp/topics/accept](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/chat/paths/~1xmtp~1topics~1accept/post.md): 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. ### Block an XMTP conversation - [POST /xmtp/topics/block](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/chat/paths/~1xmtp~1topics~1block/post.md): Block the specified XMTP topics and report as spam ### Register an XMTP topic for mobile push notifications - [POST /xmtp/topics/register](https://docs.unstoppabledomains.com/apis/messaging-v1/openapi/chat/paths/~1xmtp~1topics~1register/post.md): Handles registration of XMTP topics to associate with mobile device tokens to receive push notifications