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 them what this product passport gives them 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.

โš ๏ธ

  • 1 message sent per digital passport: 1 credit
  • End-users cannot reply to message campaigns.

Workflow

Let's start ๐Ÿš€

Create Auto-Message Campaign

URL

Required rights: admin

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.
statusStringโœ…- DRAFT: The campaign is created as a draft, the audience won't receive it after creation.
- CREATED: The campaign will be launched after sending the request.
{
    "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

Required rights: admin

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\""
}

Fetch an Auto-Message Campaign

URL

Required rights: admin

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

GET - 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\""
}

Fetch All Auto-Message Campaigns

URL

Required rights: admin

To fetch all the auto-message campaigns, use /autoMessage.

GET - https://{{url}}/autoMessage

Return Payload

Status CodeSuccessDescription
200trueAll the auto-message campaigns created on your NFT Management Platform are returned.
[
    {
        "_id": "65d4868ca8c444d474de4b5b",
        "enable": false,
        "campaignName": "Welcome to Ferrari",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"title\":\"Welcome to your Ferrari \",\"content\":\"Welcome we are happy to have you\",\"i18n\":[]}",
        "type": "genesis",
        "tags": [],
        "tagRule": "all",
        "createdAt": "2024-02-20T11:01:32.239Z",
        "updatedAt": "2024-04-29T08:51:12.501Z",
        "__v": 0,
        "id": "65d4868ca8c444d474de4b5b"
    },
    {
        "_id": "66210a8fa37f9663f2cfd2a9",
        "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.\"}]}",
        "tags": [
            "newArianeer",
            "drop2023"
        ],
        "tagRule": "or",
        "createdAt": "2024-04-18T11:57:03.778Z",
        "updatedAt": "2024-04-18T11:57:03.778Z",
        "__v": 0,
        "id": "66210a8fa37f9663f2cfd2a9"
    },
    {
        "_id": "655b281179e136a7fa9b36c7",
        "enable": false,
        "campaignName": "Welcome to Bugatti",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"title\":\"Welcome to Bugatti\",\"content\":\"Lucky you\",\"i18n\":[]}",
        "type": "genesis",
        "tags": [
            "bugatti"
        ],
        "tagRule": "and",
        "createdAt": "2023-11-20T09:34:09.127Z",
        "updatedAt": "2023-12-01T13:43:06.638Z",
        "__v": 0,
        "id": "655b281179e136a7fa9b36c7"
    },
    {
        "_id": "655b33dc9b33d053f5a4fcc7",
        "enable": false,
        "campaignName": "test bugatti on transfers",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"title\":\"test bugatti on transfers\",\"content\":\"test bugatti on transfers\",\"i18n\":[]}",
        "type": "walletToWallet",
        "tags": [
            "bugatti"
        ],
        "tagRule": "and",
        "createdAt": "2023-11-20T10:24:28.387Z",
        "updatedAt": "2023-12-01T13:43:07.058Z",
        "__v": 0,
        "id": "655b33dc9b33d053f5a4fcc7"
    },
    {
        "_id": "662127b1e0bafdee4570d798",
        "enable": false,
        "campaignName": "test cyril",
        "type": "genesis",
        "audienceId": "6617a8be2f23ca47623b2d02",
        "tags": [],
        "createdAt": "2024-04-18T14:01:21.019Z",
        "updatedAt": "2024-04-29T08:51:15.147Z",
        "__v": 0,
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\"}",
        "id": "662127b1e0bafdee4570d798"
    },
    {
        "_id": "66222642493a4d8a21b61fe7",
        "enable": false,
        "campaignName": "campaign2",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"title\":\"title2\",\"content\":\"content\"}",
        "type": "walletToWallet",
        "tags": [],
        "tagRule": "all",
        "createdAt": "2024-04-19T08:07:30.684Z",
        "updatedAt": "2024-04-29T12:23:26.951Z",
        "__v": 0,
        "id": "66222642493a4d8a21b61fe7"
    },
    {
        "_id": "6633582fc82eecf78b0ef4cb",
        "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": [],
        "createdAt": "2024-05-02T09:09:03.478Z",
        "updatedAt": "2024-05-02T09:09:03.478Z",
        "__v": 0,
        "id": "6633582fc82eecf78b0ef4cb"
    },
    {
        "_id": "654e2676ab67e2c21f1d0976",
        "enable": false,
        "campaignName": "e",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"title\":\"Welcome to your Arianee NFT 13:55\"}",
        "type": "genesis",
        "tags": [],
        "tagRule": "all",
        "createdAt": "2023-11-10T12:47:50.045Z",
        "updatedAt": "2024-02-20T11:01:34.853Z",
        "__v": 0,
        "id": "654e2676ab67e2c21f1d0976"
    },
    {
        "_id": "655b3461d06272f6a0b54f42",
        "enable": false,
        "campaignName": "test bugatti on genesis transfers & transfers",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"title\":\"test bugatti on transfers & genesis transfers\",\"content\":\"test bugatti on transfers & genesis transfers\"}",
        "type": "eachTransfer",
        "tags": [
            "bugatti"
        ],
        "tagRule": "and",
        "createdAt": "2023-11-20T10:26:41.391Z",
        "updatedAt": "2023-11-20T10:31:40.630Z",
        "__v": 0,
        "id": "655b3461d06272f6a0b54f42"
    },
    {
        "_id": "66211e4128ad8e9062a1db40",
        "enable": false,
        "campaignName": "test campaign name 1520",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"test\"}]}",
        "audienceId": "6617a8be2f23ca47623b2d02",
        "tags": [],
        "createdAt": "2024-04-18T13:21:05.563Z",
        "updatedAt": "2024-04-29T08:51:13.000Z",
        "__v": 0,
        "id": "66211e4128ad8e9062a1db40"
    },
    {
        "_id": "66211f9328ad8e9062a1dbfb",
        "enable": false,
        "campaignName": "aaa",
        "type": "genesis",
        "audienceId": "6617a8be2f23ca47623b2d02",
        "tags": [],
        "createdAt": "2024-04-18T13:26:43.535Z",
        "updatedAt": "2024-04-29T08:51:13.898Z",
        "__v": 0,
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[]}",
        "id": "66211f9328ad8e9062a1dbfb"
    },
    {
        "_id": "6633b5aef6e6a570ed90be40",
        "enable": true,
        "campaignName": "test activated by default or not",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"aeojfa\",\"content\":\"zihgfzoiabf\"}]}",
        "type": "walletToWallet",
        "tags": [],
        "tagRule": "all",
        "createdAt": "2024-05-02T15:47:58.560Z",
        "updatedAt": "2024-05-02T15:47:58.560Z",
        "__v": 0,
        "id": "6633b5aef6e6a570ed90be40"
    },
    {
        "_id": "63b4374f176d2f8ede4a3862",
        "tags": [],
        "enable": false,
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello automessage title\",\"content\":\"I am a content\"}]}",
        "campaignName": "My first auto message",
        "tagRule": "all",
        "type": "eachTransfer",
        "createdAt": "2023-01-03T14:10:23.646Z",
        "updatedAt": "2023-12-01T13:43:06.112Z",
        "__v": 0,
        "id": "63b4374f176d2f8ede4a3862"
    },
    {
        "_id": "66223827170dec9e6ba96321",
        "enable": false,
        "campaignName": "auto newTagCSV1 - genesis only",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"nice one !\"}]}",
        "type": "genesis",
        "audienceId": "6622357f170dec9e6ba93f8c",
        "tags": [],
        "createdAt": "2024-04-19T09:23:51.488Z",
        "updatedAt": "2024-04-29T08:51:15.742Z",
        "__v": 0,
        "id": "66223827170dec9e6ba96321"
    },
    {
        "_id": "6622390a170dec9e6ba971d4",
        "enable": false,
        "campaignName": "test-audience-maxime-automessage",
        "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"test audience automessage\",\"content\":\"test audience automessage\"}]}",
        "type": "eachTransfer",
        "audienceId": "662238e9170dec9e6ba96fa3",
        "tags": [],
        "createdAt": "2024-04-19T09:27:38.402Z",
        "updatedAt": "2024-04-29T08:51:16.322Z",
        "__v": 0,
        "id": "6622390a170dec9e6ba971d4"
    }
]

Delete Auto-Message Campaign

URL

Required rights: admin

To remove an existing campaign from your NFT Management Platform, use /autoMessage/:id.

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

Return Payload

Status CodeSuccessDescription
200trueThe auto-message campaign has been removed from your NFT Management Platform.
{
    "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\""
}

Error

Status CodeSuccessDescription
500falseThe ID of the campaign may be wrong.
{
    "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\""
}