Dismiss a suggested edit
curl --request POST \
--url https://postsyncer.com/api/v1/comments/{comment}/dismiss \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://postsyncer.com/api/v1/comments/{comment}/dismiss', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://postsyncer.com/api/v1/comments/{comment}/dismiss"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://postsyncer.com/api/v1/comments/{comment}/dismiss",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 88240,
"user_id": 9,
"crm_contact_id": null,
"post_id": 4182,
"platform_post_id": null,
"parent_comment_id": null,
"source": "INTERNAL",
"comment_url": null,
"platform": null,
"platform_post_comment_id": null,
"author_name": "Sam Example",
"author_avatar_url": "https://cdn.postsyncer.com/examples/avatar-sam.jpg",
"content": "Weekends only, so let's say so.",
"moderation_message": null,
"moderation_reason": null,
"is_resolved": true,
"is_approved": null,
"is_deleted_on_platform": false,
"is_hidden_on_platform": false,
"media_hidden_by_platform": false,
"needs_reply": false,
"quote": "so is the rhubarb bun",
"anchor": {
"thread": 0,
"network": null
},
"visibility": "client",
"pin": {
"type": "words",
"quote": "so is the rhubarb bun",
"anchor": {
"thread": 0,
"network": null
}
},
"suggestion": {
"from": "so is the rhubarb bun",
"to": "so is the rhubarb bun, on weekends",
"state": "dismissed"
},
"resolved_at": "2030-03-15T09:10:00.000000Z",
"resolved_by": 9,
"mentions": [],
"account_id": null,
"account": null,
"likes_count": null,
"created_at": "2030-03-14T16:20:00.000000Z",
"updated_at": "2030-03-15T09:10:00.000000Z",
"replies": [],
"media": [],
"user": {
"id": 9,
"name": "Sam Example",
"avatar": "https://cdn.postsyncer.com/examples/avatar-sam.jpg"
},
"parent_comment": null
},
"message": "Suggested edit dismissed"
}Comments
Dismiss a suggested edit
Close a comment’s suggested edit and keep the post as it is.
POST
/
comments
/
{comment}
/
dismiss
Dismiss a suggested edit
curl --request POST \
--url https://postsyncer.com/api/v1/comments/{comment}/dismiss \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://postsyncer.com/api/v1/comments/{comment}/dismiss', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://postsyncer.com/api/v1/comments/{comment}/dismiss"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://postsyncer.com/api/v1/comments/{comment}/dismiss",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 88240,
"user_id": 9,
"crm_contact_id": null,
"post_id": 4182,
"platform_post_id": null,
"parent_comment_id": null,
"source": "INTERNAL",
"comment_url": null,
"platform": null,
"platform_post_comment_id": null,
"author_name": "Sam Example",
"author_avatar_url": "https://cdn.postsyncer.com/examples/avatar-sam.jpg",
"content": "Weekends only, so let's say so.",
"moderation_message": null,
"moderation_reason": null,
"is_resolved": true,
"is_approved": null,
"is_deleted_on_platform": false,
"is_hidden_on_platform": false,
"media_hidden_by_platform": false,
"needs_reply": false,
"quote": "so is the rhubarb bun",
"anchor": {
"thread": 0,
"network": null
},
"visibility": "client",
"pin": {
"type": "words",
"quote": "so is the rhubarb bun",
"anchor": {
"thread": 0,
"network": null
}
},
"suggestion": {
"from": "so is the rhubarb bun",
"to": "so is the rhubarb bun, on weekends",
"state": "dismissed"
},
"resolved_at": "2030-03-15T09:10:00.000000Z",
"resolved_by": 9,
"mentions": [],
"account_id": null,
"account": null,
"likes_count": null,
"created_at": "2030-03-14T16:20:00.000000Z",
"updated_at": "2030-03-15T09:10:00.000000Z",
"replies": [],
"media": [],
"user": {
"id": 9,
"name": "Sam Example",
"avatar": "https://cdn.postsyncer.com/examples/avatar-sam.jpg"
},
"parent_comment": null
},
"message": "Suggested edit dismissed"
}Needs
comments:update. Someone whose role can edit posts may dismiss any suggestion, and its writer their own. See Permissions.suggestion becomes dismissed and its thread is resolved. The post doesn’t change.
While client approvals are off for the workspace, the answer is 403 with the message Client approvals aren't turned on for this workspace yet.
Errors
| Status | error | When | Retry? |
|---|---|---|---|
| 401 | No API key, or not a valid one. | No: fix the key. | |
| 403 | The key lacks comments:update, or its user is inactive. | No: grant it in Settings → API. | |
| 403 | Someone else’s suggestion and your role can’t edit posts, or client approvals are off for the workspace. | No. | |
| 404 | No comment with that id on a post the key can reach, or a Team only comment and you’re a Client. | No. | |
| 409 | suggestion_closed | It was already accepted or dismissed. | No. |
| 422 | The comment suggests nothing. | No. | |
| 429 | More than 60 requests a minute. | Yes, after Retry-After seconds. |
Related
- Accept a suggested edit: apply it instead.
Authorizations
Was this page helpful?