Moderate a YouTube comment
curl --request POST \
--url https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}/moderate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"ban_author": true,
"post_id": "<string>",
"status": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '<string>',
ban_author: true,
post_id: '<string>',
status: '<string>'
})
};
fetch('https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}/moderate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}/moderate"
payload = {
"account_id": "<string>",
"ban_author": True,
"post_id": "<string>",
"status": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}YouTube
Moderate a YouTube comment
Sets the moderation status of a YouTube comment (published, held_for_review, or rejected), optionally banning the author. ban_author is only valid with status=rejected. YouTube only.
POST
/
platforms
/
youtube
/
comments
/
{commentId}
/
moderate
Moderate a YouTube comment
curl --request POST \
--url https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}/moderate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"ban_author": true,
"post_id": "<string>",
"status": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '<string>',
ban_author: true,
post_id: '<string>',
status: '<string>'
})
};
fetch('https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}/moderate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}/moderate"
payload = {
"account_id": "<string>",
"ban_author": True,
"post_id": "<string>",
"status": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
YouTube comment ID
Body
application/json
Moderation action (account_id and post_id are both required to resolve the channel that owns the comment)
Response
Comment moderated
Example:
true