Edit a YouTube comment
curl --request PATCH \
--url https://api.social-api.ai/v1/platforms/youtube/comments/{commentId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"post_id": "<string>",
"text": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', post_id: '<string>', text: '<string>'})
};
fetch('https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}', 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}"
payload = {
"account_id": "<string>",
"post_id": "<string>",
"text": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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
Edit a YouTube comment
Edits the text of one of the connected account’s own YouTube comments via comments.update. Only the comment author (the connected account) can edit. YouTube only.
PATCH
/
platforms
/
youtube
/
comments
/
{commentId}
Edit a YouTube comment
curl --request PATCH \
--url https://api.social-api.ai/v1/platforms/youtube/comments/{commentId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"post_id": "<string>",
"text": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', post_id: '<string>', text: '<string>'})
};
fetch('https://api.social-api.ai/v1/platforms/youtube/comments/{commentId}', 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}"
payload = {
"account_id": "<string>",
"post_id": "<string>",
"text": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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
New comment text (account_id, post_id, and text are all required to resolve the channel and edit the comment)
Response
Comment edited
Example:
true