Skip to content

Update Status Comment ​

PUThttps://api.repliz.com/public/comment/{commentId}/status

Update the moderation status of a comment. Use this to mark a comment as resolved, ignored, or pending.

Endpoint Details ​

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

Parameters ​

ParameterTypeRequiredDescription
commentIdstringYesID of the comment in Repliz, the _id from Get Comment.

Request Body ​

FieldTypeRequiredDescription
statusstringYesThe new status: pending (not handled yet), resolved (handled), or ignored. It only changes the comment in Repliz, nothing is sent to the platform.

Example Request ​

bash
curl -X PUT "https://api.repliz.com/public/comment/680affa5ce12f2f72916f67e/status" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "resolved"
  }'
javascript
import axios from 'axios';

const commentId = '680affa5ce12f2f72916f67e';

const response = await axios.put(
  `https://api.repliz.com/public/comment/${commentId}/status`,
  {
    status: 'resolved',
  },
  {
    auth: {
      username: 'YOUR_ACCESS_KEY',
      password: 'YOUR_SECRET_KEY',
    },
  },
);

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

const commentId = '680affa5ce12f2f72916f67e';

const response = await fetch(`https://api.repliz.com/public/comment/${commentId}/status`, {
  method: 'PUT',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    status: 'resolved',
  }),
});

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

Response ​

json
// No content returned on success
json
{
  "code": 404,
  "message": "comment not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}