These docs are for v1.9. Click to read the latest docs for v2.1.

Once Off Message Campaign

Communicate with your audience through once off message campaigns.

Workflow

Let's start 🚀

Limitations

Digital passport owners cannot reply to your once message campaigns.

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

Field

Type

Required

Description

campaignName

String

Name of the campaign as a reference in your NFT Management Platform.

audienceId

String

ID of the audience you wish to target.
For more information about the audience, see Manage Audience Segmentation.

content

Object

For more information on the content $schema, see Message Schema.

statut

String

Statut set as DRAFT.

Target your audience owning digital passports associated with at least one defined tag

{
    "campaignName": "New Arianeer",
    "audienceId": "6620d8b99db1ffed81bd0147",
    "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"
}

Only target custodial wallets & active wallets

{
    "campaignName": "New Arianeer",
    "status": "DRAFT",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"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.\"}",
    "uniqueOwner": true,
    "tags": [],
    "tagRule": "all",
    "isWalletActiveSinceNumberOfDays": 30,
    "custodialWallet": "yes",
    "countries": [],
    "_id": "6525520ea1e2be28ae2735ff",
    "createdAt": "2023-10-10T13:30:54.689Z",
    "updatedAt": "2023-10-10T13:30:54.689Z",
    "__v": 0,
    "id": "6525520ea1e2be28ae2735ff"
}

Target specific countries & active wallets

💡

To fetch the list of countries, refer to the Segmentation documentation.

{
    "campaignName": "New Arianeer",
    "status": "DRAFT",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/ArianeeMessage-i18n.json\",\"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.\"}",
    "uniqueOwner": true,
    "tags": [],
    "tagRule": "all",
    "isWalletActiveSinceNumberOfDays": 30,
    "custodialWallet": "yes",
    "countries": [
        "France",
        "Spain"
    ],
    "_id": "6525530ca1e2be28ae2736eb",
    "createdAt": "2023-10-10T13:35:08.125Z",
    "updatedAt": "2023-10-10T13:35:08.125Z",
    "__v": 0,
    "id": "6525530ca1e2be28ae2736eb"
}
🚀

* All filter types (tags or tokenId, isWalletActiveSinceNumberOfDays, custodialWallet, countries) can be combined to refine your target audience.* If you wish to know how many recipients are involved in your campaign, use our dedicated API.

Return Playload

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.

{
    "tags": [
        "test_api_5k"
    ],
// ID of the once off message campaign
    "_id": "63b7ef72ec133a4fe78e7399",
    "campaignName": "campaign name",
    "tagRule": "or",
    "uniqueOwner": true,
    "tokenIds": {
        "type": "Buffer",
        "data": []
    },
    "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",
    "createdAt": "2023-01-06T09:52:50.018Z",
    "updatedAt": "2023-01-06T09:52:50.018Z",
    "__v": 0,
    "id": "63b7ef72ec133a4fe78e7399"
}

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 Status

Description

200

Your 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

{
    "campaignName": "Hello & welcome to your Arianee NFT",
    "tagRule": "or",
    "uniqueOwner": true,
    "tags": ["dropJan23","dropFeb23"],
    "tokenIds": "",
    "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.
{
    "tags": [
        "tag_test",
        "other_tag"
    ],
    "_id": "63b7ef72ec133a4fe78e7399",
    "campaignName": "Welcome to your Arianee NFT!!",
    "tagRule": "or",
    "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.\"}]}",
    "createdAt": "2023-02-16T15:39:36.389Z",
    "updatedAt": "2023-03-16T13:29:54.351Z",
    "__v": 0,
    "enable": false,
    "id": "63b7ef72ec133a4fe78e7399"
}

Errors

Status CodeSuccessDescription
400falseYour once-off message campaign ID may not exist.
{
    "stringValue": "\"63ee4e3822c4554801f7\"",
    "kind": "ObjectId",
    "value": "63ee4e3822c4554801f7",
    "path": "_id",
    "reason": {}
}