Set comment moderation status
Set a comment's moderation status. Supported on YouTube only.
Use this to work a moderation queue: approve a held comment (published), reject it
(rejected), or send it back for review (heldForReview).
The request must be authorized by the owner of the channel or video the comment belongs to. You cannot moderate comments on videos you do not own.
This is distinct from POST /v1/inbox/comments/{postId}/{commentId}/hide, which
covers Facebook, Instagram, Threads, and X/Twitter and does not apply to YouTube.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
The social account ID
Only YouTube supports comment moderation
"youtube"published approves the comment, rejected removes it, heldForReview returns it to the queue.
"published" | "rejected" | "heldForReview"Also ban the comment's author, auto-rejecting their future comments. Only valid when moderationStatus is "rejected"; any other pairing is a 400.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.comments.setCommentModeration({ path: { postId: 'post_abc123', commentId: 'comment_abc123', }, body: { accountId: 'account_abc123', platform: 'youtube', moderationStatus: 'published', },});console.log(data);{
"success": true
}{
"error": "Unauthorized"
}