Reject Nodes as SPAM

/services/v2/node/{node}/rejectAsSpam

The purpose of this API is to reject content as SPAM from the Moderation or Reported queues. When content is rejected as spam, it is placed in moderation state in the SPAM queue and will communicate information about the post to the Akismet service so that it learns to better recognize SPAM posts and automatically intercept them. Rejected nodes in SPAM may be retrieved using the Retrieve nodes in SPAM GET call https://developer.devada.com/reference#retrieve-nodes-in-spam and may be canceled with the CancelRejectAsSPAM PUT API.

🚧

Permissions & Notes:

  • You must have the permission called View Nodes in Moderation under Moderation Roles to use this call and the Akismet plugin must be enabled and correctly configured.

This functionality was added in the 2.19.0 Release

Sample Request

https://apidocs.cloud.answerhub.com/services/v2/node/55/rejectAsSpam
Here the content node ID (55) is specified

-u answerhub:test123
-H "Accept: application/json"
-H "Content-type: application/json"
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/55/rejectAsSpam"

Sample Response

HTTP Error Response codes:

Success Response:

  • 200: Message: Node: {0} has been successfully rejected as spam

Error Responses:

  • 403: role issue “View Nodes In Moderation” revoked role.

Message: We're sorry, but you are not allowed to view posts in moderation.

  • 403: permission issue - Node not in reported or review (moderation) state - reported/flagged

Message: We're sorry, but you cannot reject the node as spam (it should be in moderation or in reported status).

  • 404: node not found.

Message: Node not found.

  • 400: Akismet plugin disabled

Message: Spam Akismet Plugin disabled.

  • 400: Node already marked as spam.

Message: Node already marked as spam.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!