Skip to content

Message Comment

POST /public/content/{contentId}/message

Send a reply to an existing comment. The reply is posted directly on the platform within the comment thread.

Endpoint Details

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Gold+

Parameters

ParameterTypeRequiredDescription
contentIdstringYesThe unique identifier of the content/post.

Request Body

FieldTypeRequiredDescription
accountIdstringYesThe unique identifier of the target account to post to.
commentIdstringYesThe ID of the comment to reply to.
textstringNoThe message text content to send.
buttonobjectNoInteractive button attachment with URL.

Example Request

bash
curl -X POST "https://api.repliz.com/public/content/113958387982006_942538351814577/message" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
  -H "Content-Type: application/json" \
  -d '{"accountId":"680affa5ce12f2f72916f67e","commentId":"18083576267346315","text":"Hello there, this is from Repliz"}'
javascript
import axios from 'axios';

const contentId = '113958387982006_942538351814577';

const response = await axios.post(`https://api.repliz.com/public/content/${contentId}/message`, {
  "accountId": "680affa5ce12f2f72916f67e",
  "commentId": "18083576267346315",
  "text": "Hello there, this is from Repliz"
}, {
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY'
  }
});

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const contentId = '113958387982006_942538351814577';

const response = await fetch(`https://api.repliz.com/public/content/${contentId}/message`, {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
  "accountId": "680affa5ce12f2f72916f67e",
  "commentId": "18083576267346315",
  "text": "Hello there, this is from Repliz"
})
});

const data = await response.json();
console.log(data);

Response

json
{
  "messageId": "m_vN5eeDcgmLq8bDeIvh08FKDllBn-ZQje_xFEJPRwKTwzH9Og2HlvRGj_quroDpxF_fKYDuK-zJjqU6sxLZHuDw"
}
json
// Account
{
  "code": 404,
  "message": "account not found"
}

// Comment
{
  "code": 404,
  "message": "comment not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}