Fetch & Read Messages
Fetch Received Messages
Fetch the dMessage a customer receives and retrieve information such as the digital passport receiver, if they have been read, and the content.
URL
To fetch all the dMessages received by a digital passport owner, use https://custody.arianee.com/{{client}}/{{chainType}}/messages/getReceived.
GET - https://custody.arianee.com/{{client}}/{{chainType}}/messages/getReceivedReturn Payload
| Status Code | Success | Description |
|---|---|---|
200 | true | The dMessages are returned. |
[
{
"data": {
"id": "617768167",
"certificateId": "287574096",
"content": {
"$schema": "https://cert.arianee.org/version1/ArianeeMessage-i18n.json",
"language": "en-US",
"title": "Welcome to Arianee NFTs",
"content": " Test automessage 25/04 15:38"
},
"rawContent": {
"$schema": "https://cert.arianee.org/version1/ArianeeMessage-i18n.json",
"language": "en-US",
"title": "Welcome to Arianee NFTs",
"content": " Test automessage 25/04 15:38"
},
"imprint": "TODO",
"isRead": true,
"protocol": {
"name": "testnet",
"chainId": 77
},
"receiver": "0xa45d9dacbea470cf93e8454aca5eca4e62fb5fcf",
"sender": "0x57f5111a7e997a7ba63cc8976c92decbd86c1b08",
"timestamp": 1686817705
}
}
]Error
| Status Code | Success | Description |
|---|---|---|
404 | false | The wallet may not exist. You are not authenticated. |
Fetch Message using ID
Fetch a dMessage by providing its ID and retrieve associated information such as a digital passport's receiver, if it has been read, and the content.
URL
To fetch the dMessage information, use https://custody.arianee.com/{{client}}/{{chainType}}/messages/get.
POST - https://custody.arianee.com/{{client}}/{{chainType}}/messages/getBody
Field | Type | Required | Description |
|---|---|---|---|
| Number | ✅ | dMessage identification number. |
| String - | ✅ | Protocol on which the dMessage and its receiver have been minted. |
{
"id": "617768167",
"protocolName": "testnet"
}Return Payload
| Status Code | Description |
|---|---|
200 | The dMessage's information and content are returned. |
{
"data": {
"id": "617768167",
"certificateId": "287574096",
"content": {
"$schema": "https://cert.arianee.org/version1/ArianeeMessage-i18n.json",
"language": "en-US",
"title": "Welcome to Arianee NFTs",
"content": " Test automessage 25/04 15:38"
},
"rawContent": {
"$schema": "https://cert.arianee.org/version1/ArianeeMessage-i18n.json",
"language": "en-US",
"title": "Welcome to Arianee NFTs",
"content": " Test automessage 25/04 15:38"
},
"imprint": "TODO",
"isRead": true,
"protocol": {
"name": "testnet",
"chainId": 77
},
"receiver": "0xa45d9dacbea470cf93e8454aca5eca4e62fb5fcf",
"sender": "0x57f5111a7e997a7ba63cc8976c92decbd86c1b08",
"timestamp": 1686817705
}
}Status Code
| Status Code | Success | Description |
|---|---|---|
400 | false | The body of the request may be wrong. |
404 | false | The wallet may not exist. You are not authenticated. |
500 | false | Error server. |
{
"errors": [
{
"type": "field",
"msg": "Invalid value",
"path": "id",
"location": "body"
},
{
"type": "field",
"msg": "id parameter is required and must be a string",
"path": "id",
"location": "body"
},
{
"type": "field",
"msg": "Invalid value",
"path": "protocolName",
"location": "body"
},
{
"type": "field",
"msg": "protocolName parameter is required and must be a string",
"path": "protocolName",
"location": "body"
}
]
}Mark Message as Read
URL
Use the https://custody.arianee.com/{{client}}/{{chainType}}/messages/markAsRead.
POST - https://custody.arianee.com/{{client}}/{{chainType}}/messages/markAsReadBody
Field | Type | Required | Description |
|---|---|---|---|
| Number | ✅ | Message identification number to be marked as read. |
| String - | ✅ | Protocol on which the message has been sent. |
{
"id": "606514080",
"protocolName": "testnet"
}Return Payload
Status Code | Success | Description |
|---|---|---|
|
|
|
{
"success": true
}Errors
| Status Code | Success | Description |
|---|---|---|
400 | false | Not authorized. You must be authenticated. |
404 | false | The wallet may not exist. You are not authenticated. |
404 | false | No message was found using this ID. |
Updated 9 days ago
