Skip to content

Remove Comment ​

DELETE /public/content/{contentId}/comment/{commentId}

Permanently delete a comment from a specific piece of content on the platform.

On YouTube, a comment written by someone else is hidden instead of deleted, with the moderation status rejected, because YouTube doesn't let apps delete other people's comments. Your channel's own comments are deleted.

Endpoint Details ​

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

Parameters ​

ParameterTypeRequiredDescription
contentIdstringYesThe unique identifier of the content/post.
commentIdstringYesThe unique identifier of the comment.
accountIdstringYesThe unique ID of the account.

Example Request ​

bash
curl -X DELETE "https://api.repliz.com/public/content/113958387982006_942538351814577/comment/113958387982006?accountId=680affa5ce12f2f72916f67e" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const contentId = '113958387982006_942538351814577';
const commentId = '113958387982006';

const response = await axios.delete(`https://api.repliz.com/public/content/${contentId}/comment/${commentId}`, {
  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 commentId = '113958387982006';

const response = await fetch(`https://api.repliz.com/public/content/${contentId}/comment/${commentId}`, {
  method: 'DELETE',
  headers: {
    'Authorization': `Basic ${credentials}`
  }
});

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

Response ​

json
// No content returned on success
json
// Account Not Found
{
  "code": 404,
  "message": "account not found"
}

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