Auto-Message Campaign

Create an auto-message campaign to communicate by targeting your audience every time rules are triggered.

Overview

Use case

Your brand has sold a product to a customer. You welcome this user and tell what this product passport gives access to. As the messages are not accessible for a new owner, you want this message to be sent to each new owner after a transfer.

⚠️

  • Each event sent per digital passport spends 1 credit.
  • NFT owners cannot reply to your auto message campaigns.

Workflow

Let's start πŸš€

Create Auto-Message Campaign

URL

Create your auto message campaign draft respecting the Message Schema by using the /autoMessage.

POST - https://{{nmpUrl}}/autoMessage

πŸ“Œ

The API is authenticated with the user rights required β†’ certCreate

Body

FieldTypeMandatoryDescription
campaignNameStringβœ…Name of the campaign. The first thing displayed in the customers' wallet.
triggereachTransfer, genesis, walletToWalletβœ…- eachTransfer: All transfers.

- genesisTransfer: Genesis transfers only.
- walletToWallet: Based on each transfer but not the genesis.
audienceIdString❌ID of the audience you wish to target.
For more information about the audience, see Manage Audience Segmentation.
productIdsArray❌Specific digital passport(s) you wish to target.
contentObject❌For more information on the content $schema, see Message Schema.
statutStringβœ…Statut set as DRAFT.
{
    "campaignName": "Welcome to your Arianee NFT!",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "productIds": "test",
    "trigger": "eachTransfer",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello you!\",\"content\":\"Welcome to your first Arianee NFT! Access exclusive content and event through this token.\"}]}",
    "status": "DRAFT"
}

Return Payload

Status CodeSuccessDescription
200trueYour auto-message campaign draft has been created and is ready to be triggered. Keep the _id, ID of the campaign in case you wish to update the content afterward.
{
    "campaignName": "Welcome to your Arianee NFT!",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello you!\",\"content\":\"Welcome to your first Arianee NFT! Access exclusive content and event through this token.\"}]}",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "tags": [],
    "_id": "66210ad0deccd6a73842279a",
    "createdAt": "2024-04-18T11:58:08.748Z",
    "updatedAt": "2024-04-18T11:58:08.748Z",
    "__v": 0,
    "id": "66210ad0deccd6a73842279a"
}


Update Auto-Message Campaign

URL

Update the content of your auto message campaign, e.g. let's say you wish to correct your campaign title and use the /autoMessage/:id.

PUT - https://{{nmpUrl}}/autoMessage/:id

Body

FieldTypeMandatoryDescription
campaignNameString❌Name of the campaign. The first thing displayed in the customers' wallet.
audienceIdString❌ID of the audience you wish to target.
For more information about the audience, see Manage Audience Segmentation.
productIdsObject❌Specific digital passport(s) you wish to target.
contentObject❌For more information on the content $schema, see Message Schema.
statutString❌Statut set as DRAFT.
{
    "campaignName": "Hey you, welcome to your Arianee NFT!",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "productIds": "test",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hey you, welcome to your Arianee NFT!\",\"content\":\"Welcome to your first Arianee NFT! Access exclusive content and event through this token.\"}]}",
    "status": "DRAFT"
}

Return Payload

Status CodeDescription
200Your auto-message campaign has been updated.
{
    "_id": "66210ad0deccd6a73842279a",
    "campaignName": "Hey you, welcome to your Arianee NFT!",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hey you, welcome to your Arianee NFT!\",\"content\":\"Welcome to your first Arianee NFT! Access exclusive content and event through this token.\"}]}",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "tags": [],
    "createdAt": "2024-04-18T11:58:08.748Z",
    "updatedAt": "2024-04-18T11:59:26.745Z",
    "__v": 0,
    "id": "66210ad0deccd6a73842279a"
}

Errors

Status CodeSuccessDescription
500falseYour auto-off-message campaign ID may not exist.
{
    "stringValue": "\"66210ad0deccd6a73842279\"",
    "valueType": "string",
    "kind": "ObjectId",
    "value": "66210ad0deccd6a73842279",
    "path": "_id",
    "reason": {},
    "name": "CastError",
    "message": "Cast to ObjectId failed for value \"66210ad0deccd6a73842279\" (type string) at path \"_id\" for model \"AutoMessage\""
}

Retrieve Auto-Message Campaign

URL

To retrieve an auto-message campaign, use /autoMessage/:id.

https://{{url}}/autoMessage/:id

Return Payload

Status CodeSuccessDescription
200trueThe auto-message campaign is returned.
{
    "_id": "66210ad0deccd6a73842279a",
    "campaignName": "Hey you, welcome to your Arianee NFT!",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hey you, welcome to your Arianee NFT!\",\"content\":\"Welcome to your first Arianee NFT! Access exclusive content and event through this token.\"}]}",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "tags": [],
    "createdAt": "2024-04-18T11:58:08.748Z",
    "updatedAt": "2024-04-18T12:12:32.018Z",
    "__v": 0,
    "id": "66210ad0deccd6a73842279a"
}

Errors

Status CodeSuccessDescription
500falseThe auto-message campaign ID is wrong.
{
    "stringValue": "\"66210a8fa37f9663f2cfd2a\"",
    "valueType": "string",
    "kind": "ObjectId",
    "value": "66210a8fa37f9663f2cfd2a",
    "path": "_id",
    "reason": {},
    "name": "CastError",
    "message": "Cast to ObjectId failed for value \"66210a8fa37f9663f2cfd2a\" (type string) at path \"_id\" for model \"AutoMessage\""
}