Skip to content

Mark Message Read

Request URL

POST /message/read/:AFiMessageId

Description

Mark a specified message as read. The message is identified by the path parameter.

Schema

Property table for message/read/:AFiMessageId

Property Description Required Schema
AFiMessageId ampliFi ID of the message Yes {
  "type": "string"
}

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/message/read/:AFiMessageId',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/message/read/:AFiMessageId"  --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 MESSAGE/READ/:AFIMESSAGEID SUCCESSFUL RESPONSE MARKED MESSAGE READ

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

PARAMETERS

Parameter Description Value
AFiMessageId [required] qwemsgl8kguke0qpblvxpsgoghpabtgygccq

REQUEST BODY

none

RESPONSE BODY

{
    "success": true
}