ConversationFlow API allows to programatically submit video/text and images for moderation, check on their status, and receive callbacks when that changes.
There's no reason to reinvent the wheel though - there are a number of existing open source libraries that integrate with ConversationFlow. We still recommend reading through this document though, especially the integration section.
In ConversationFlow, it is possible to moderate different kinds of content, such as images, texts or video content.
The API is asynchronous, so when an item is created it won't be moderated immediately. You'll have to check back later, or receive callbacks, to find out when it has been moderated.



REST APIs with XML or JSON

The communication with the ConversationFlow platform will happen through calls to REST services with the possibility to receive answers in XML or JSON format.

↑ top

URL EntryPoints

The platform displays the addresses which enable to send and to receive data. The supported formats for answers are XML and JSON.

Incoming calls

Creation of a comment on the platform (POST incoming call):

api.conversationflow.com/api/v1/comment/create.[format]?access_token=[token]

↑ top

Submit content to moderate

To create an element inside the platform it’s necessary to carry out a POST call.

Example of call

"date_create" = “2011-09-01 12:04:12”
"element_type" = “comment”
"remote_id" = “12”
"root_object" = “cf_api_test_1”
"from_id" = “123123”
"name" = “Username_on_remote_platform”
"message" = “Message Message Message Message Message”
"url" = “http://public-site.com/image.jpg”

Fields detail

  • date_create: creation date of the comment, format: AAAA-MM.GG HH:MM:SS
  • element_type: type of the element, “comment”, “video”, “image”, “user”
  • remote_id: remote id of the comment, it allows to identify the element sent to moderation
  • root_object: defined in phase of configuration of the platform, it identifies the plan
  • from _id: identity of the user who inserted the comment
  • name: name of the user who inserted the comment
  • message: text of the message
  • url: address of the content to moderate, the address must be publicly accessible
↑ top

Check for the moderation Status

Answer about the moderation status

Outgoing comment in XML format:

<?xml version="1.0" encoding="UTF-8"?>
<element>
<remote-id>123345</remote-id>
<moderation-status>[pending|validate|delete|escalated]</moderation-status>
<sentiment>[negative|neutral|positive]</sentiment>
</element>

Outgoing comment in JSON format:

{ "element": { "remote_id": "10150254", "moderation_status": "pending", "sentiment": "" } }

Answer about the creation of an element

JSON format:

{ 'element': { 'saved': '[true|false]' } }

XML format:

<?xml version="1.0" encoding="UTF-8"?>
<element>
<saved>[true|false]</saved>
</element>

Fields Definition

remote-id: The id that is passed in income is given back in exit in order to univocally identify the comment.

moderation-status: it may have four statuses: Pending, Escalate, Validate e Delete

  • pending: the element still has to be moderated
  • escalate: the element has been escalated and it still has to be moderated
  • validate: the element is in compliance with the policy
  • delete: the element is not in compliance with the policy

sentiment: The moderator assigns a sentiment to the comment. The sentiment can be Negative, Neutral or Positive

↑ top

Errors and Moderation Issues

Error types are reported in the two formats:

XML format:

<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>404</code>
<message>MissingEntryPoint</message>
</error>

JSON format:

{'error': { 'code': '404', 'message':'MissingEntryPoint' } }

Error

MissingEntryPoint: The specific address was not found

  • TokenError: The inserted token is not valid
  • TokenMissing: the token is not present
  • PramsError: the parameters are not correct
  • DataError: the inserted date is not correct
  • TypeError: the element type is not supported
  • InvalidRoot: the element does not have the reading/writing permissions for the token

↑ top