Once-Off Message Campaign

Create and send a once-off message campaign to a defined audience. You can engage a specific group of holders of digital passports thanks to tags or digital passport ID(s).

Overview

Uses Cases

  • As a brand, you wish to send a message for a new product launch to active end-users in a specific country.
  • As a brand, you wish to send a message to share a discount to end-users that have been active in the 30 days.

πŸ’‘

To reach out this specific audience, segment these end-users using the Audience Segmentation.

⚠️

  • Each event sent per digital passport spends 1 credit.
  • Digital passport owners cannot reply to messages.

Workflow

Let's start πŸš€

Create Once Off Message Campaign Draft

URL

Create your once-off message campaign draft respecting the Message Schema by using the /onceOfMessage.

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

πŸ“Œ

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

Body

FieldTypeRequiredDescription
campaignNameStringβœ…Name of the campaign as a reference in your NFT Management Platform.
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": "New Arianeer",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "productIds": "test",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello Arianeer!\",\"content\":\"Wether you joined us this year or prior to 2022, we want to thank you for being part of this adventure.\"}]}",
    "status": "DRAFT"
}

Return Payload

Your once-off message campaign draft has been created and is ready to be sent. Keep the _id, ID of the campaign, to send it the next step.

{
    "campaignName": "New Arianeer",
    "tags": [],
    "status": "DRAFT",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello Arianeer!\",\"content\":\"Wether you joined us this year or prior to 2022, we want to thank you for being part of this adventure.\"}]}",
    "countries": [],
    "productIds": [
        "test"
    ],
    "audienceId": "6620d8b99db1ffed81bd0147",
    "_id": "6620ea83e5e3c7f33f7595b9",
    "createdAt": "2024-04-18T09:40:19.982Z",
    "updatedAt": "2024-04-18T09:40:19.982Z",
    "__v": 0,
    "id": "6620ea83e5e3c7f33f7595b9"
}

Send Once-Off Message Campaign

URL

Once your once-off message draft is ready to be sent, use /onceOfMessage/:_id/createMessage.

POST - https://{{nmpUrl}}/onceOfMessage/{_id}/createMessage

Return Payload

Code StatusDescription
200Your once-off message campaign has been sent to your audience.
In this example, 46 messages, t, has been delivered.
{
    "ok": 1,
    "writeErrors": [],
    "writeConcernErrors": [],
    "insertedIds": [
        {
            "index": 0,
            "_id": "63b7ef72ec133a4fe78e7399"
        }
    ],
    "nInserted": 1,
    "nUpserted": 0,
    "nMatched": 0,
    "nModified": 0,
    "nRemoved": 0,
    "upserted": [],
    "lastOp": {
        "ts": "7185474668390776833",
        "t": 46
    }
}

Errors

Code StatusSuccessCodeDescription
400falsenmp.back.onceOff.campaignAlreadyCreatedYour campaign has already been sent.
500falsenmp.back.onceOff.noNFTsFoundYour once-off message campaign ID may not exist.
400falseN/ANo digital passport was found for your campaign ID.
{
    "name": "API Error",
    "description": "This message 63b7ef1cec133a4fe78e7397 has already been created",
    "code": "nmp.back.onceOff.campaignAlreadyCreated",
    "httpCode": 400
}
{
    "name": "API Error",
    "description": "No NFT found for the message campaign 641436fc334534f2ee7907aa",
    "code": "nmp.back.onceOff.noNFTsFound",
    "httpCode": 400
}
{
    "sentryLink": "https://sentry.io/organizations/arianee/issues/?project=5375493&query=id:ee2e0719a4de4585b120be9e523ef55e&statsPeriod=1h",
    "message": "An unexpected error occured. To help fixing this bug, please send us sentryLink"
}

Update Once Off Message Campaign

URL

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

PUT - https://{{nmpUrl}}/onceOfMessage/:_id

πŸ“Œ

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

Body

FieldTypeRequiredDescription
campaignNameString❌Name of the campaign as a reference in your NFT Management Platform.
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": "Hello & 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\":\"Hello you !\",\"content\":\"My message content here.\"}]}",
    "status": "DRAFT"
}

Return Payload

Status CodeDescription
200Your once-off message campaign has been updated.
{
    "_id": "6620ea83e5e3c7f33f7595b9",
    "campaignName": "campaign name!",
    "tags": [],
    "status": "DRAFT",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello you !\",\"content\":\"My message content here.\"}]}",
    "countries": [],
    "productIds": [
        "test"
    ],
    "audienceId": "6620d8b99db1ffed81bd0147",
    "createdAt": "2024-04-18T09:40:19.982Z",
    "updatedAt": "2024-04-18T09:49:13.028Z",
    "__v": 0,
    "id": "6620ea83e5e3c7f33f7595b9"
}

Errors

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

Retrieve Once-Off Message Campaign

URL

To fetch a specific once-off message campaign and its information, use /onceOfMessage/:id.

https://{{url}}/onceOfMessage/:id

Return Payload

Status CodeSuccessDescription
200trueThe once-off message campaign is returned with its associated information.
{
    "_id": "6620ea83e5e3c7f33f7595b9",
    "campaignName": "Campaign name",
    "tags": [],
    "status": "DRAFT",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"language\":\"en-US\",\"i18n\":[{\"language\":\"en-US\",\"title\":\"Hello you !\",\"content\":\"My message content here.\"}]}",
    "countries": [],
    "productIds": [
        "test"
    ],
    "audienceId": "6620d8b99db1ffed81bd0147",
    "createdAt": "2024-04-18T09:40:19.982Z",
    "updatedAt": "2024-04-18T09:55:02.697Z",
    "__v": 0,
    "id": "6620ea83e5e3c7f33f7595b9"
}

Errors

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