[OLD] Send Message to Digital Passports Group

As a brand, you wish to send a dMessage to digital passports in a given group, so all your digital passport owners receive it.

Overview

Use cases

  • Your brand wants to provide useful information about your product or the brand community around the product.
  • Your brand wants to invite digital passport owners to exclusive events or online experiences.
  • You wish to greet new owners in case of digital passport transfers.

Workflow

Let's start 🚀

⚠️

Each message sent spends 1 credit.

URL

To send a message to a complete productGroupId, use /productManagement/productGroup/:productGroupId/sendMessage.

POST - https://{{nmpUrl}}/productManagement/productGroup/:productGroupId/sendMessage

Body

FieldTypeRequiredDescription
campaignNameStringName of the campaign.
contentObjectContent of the message.
filtersObjectFilters to target message recipients.
productIdsObjectList of product IDs to send message to (if match wallet profile). It should not be used with a large array.
tagsArrayTags associated with the target digital passports.
tagRuleand,or,allIf you search for one tag, leave the parameter empty.
countriesArray”USA”, “France”... Fetch the countries using the dedicated API.
isCustodialBooleanWhether the user has a custodial wallet or not.
iswalletActiveSinceNumberOfDaysNumberNumber of days since wallet activity.
activeBooleanWhether the user has been active last X days.
uniqueOwnerBooleanUnique owner.
walletActivityactive,inactive,all- active: Active end-users only.
- inactive: Inactive end-users only.
- all: All end-users.

{
    "campaignName": "name1",
    "message": { 
        "title": "Title",
        "content": "This is the message content"
    },
    "filters": { 
        "productIds": ["SN1"],
        "tags": ["tag1"], 
        "tagRule": "all", 
        "countries": ["France", "USA"],
        "iswalletActiveSinceNumberOfDays": 30, 
        "uniqueOwner": true, 
        "walletActivity": "active" 
    }
}

Return Payload

FieldTypeDescription
successBooleantrue: The request was a success.
messageStringMessage has been successfully sent to productId.
approximativeNumberOfMessagesNumberNumber of messages sent.
{
    "success": true,
    "message": "The message campaign has been scheduled and will be sent soon.",
    "approximativeNumberOfMessages": 1
}

Errors

Status CodeSuccessCodeError Message
400falsenpm.productManager.product.message.incorrectPayloadSome parameters of your payload are incorrect. See details.
400falsenpm.productManager.product.message.notIssuerYou cannot send a message to NFT you have not created.
400falsenpm.productManager.product.message.blacklistedYou cannot send a message to NFT that does not accept incoming messages.
404falsenpm.productManager.product.message.product_group_Id_Not_ExistsProductGroup ID does not exist.
500falsenpm.productManagement.product.UnknownErrorAn unknown error has occurred.
{
    "message": "productGroupId :productGroupId does not exists",
    "code": "nmp.productManagement.PRODUCT_GROUP_ID_NOT_EXISTS"
}