Set Comment Moderation Status
youtube_set_comment_moderationModerate YouTube comments by approving, holding for review, or rejecting them. Optionally ban comment authors in bulk.
Instructions
Sets the moderation status of one or more comments. Can optionally ban the comment author(s).
Args
commentId(string, required) — ID of the comment to moderate. Accepts a comma-separated list of IDs to moderate multiple comments in one call (e.g."id1,id2,id3").moderationStatus("published" | "heldForReview" | "rejected", required) — Target moderation state:published: approve and make public.heldForReview: hold for manual review.rejected: reject (hide) the comment.
banAuthor(boolean, default false) — Iftrue, bans the author(s) from commenting on the channel.
Returns
{ "moderated": true, "commentIds": ["string"], "moderationStatus": "string", "banAuthor": false }Examples
Approve a comment:
{ "commentId": "UgxABC123", "moderationStatus": "published" }Reject and ban:
{ "commentId": "UgxXYZ,UgxFOO", "moderationStatus": "rejected", "banAuthor": true }
Errors
400 if
moderationStatusis invalid.403 if the comment(s) do not belong to the authenticated channel's videos, or quota is exceeded.
404 if a comment ID does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commentId | Yes | ID of the comment to moderate. Comma-separate multiple IDs to moderate in bulk. | |
| moderationStatus | Yes | "published" to approve, "heldForReview" to hold, "rejected" to reject/hide. | |
| banAuthor | No | If true, bans the comment author(s) from the channel. |