Stateful endpoint

Copied!

Content can be moderated in a “stateful” way to provide seamless integration for customers. Enabling moderation for stream chat customers is as easy as a switch and will enable all its exclusive features with a click.

Integrating with the stateful moderation endpoint allows having the full automod moderation experience with a human in the loop. Advanced Moderation dashboard access will be given where messages can be moderated based on the input of the AI engine as well the human moderators in addition to many exciting features to reduce the effort needed to the minimum.

URL

Copied!
POST /automod/v1/chat_message_tasks

Request parameters

Copied!
nametypedescriptiondefaultoptional
textstring

The text message to be moderated

-

user_id

stringUser ID-

message_id

stringMessage ID-
channel_idstringChannel ID-
user_namestringUser Name (if not provided the user_id value is set)-user_id
channel_namestringChannel Name (if not provided the channel_id value is set)-channel_id
evaluations[]EvaluationObj

Array of Objects with the moderation evaluations to be ran against the message

-

Responses

Copied!

201 - Successful response:

Copied!
nametypedescriptiondefaultoptional
taskChatMessageTaskResponse

ChatMessageTaskResponse Object

-
durationstring

The duration time of the request

-

Stateless endpoint

Copied!

Content can be moderated in a “stateless” way, without defining rules up front, by passing one or more desired evaluations in the request. This allows, third-party providers to use the AutoMod API as an external service for moderating text. In the future, we will support multiple types of content for moderation such as images, videos, etc.

URL

Copied!
POST /automod/v1/tasks

Request parameters

Copied!
nametypedescriptiondefaultoptional
content_typestring

Type of payload for this task, can be one of: text, image

-

payload

PayloadObj

The (serialized) payload for this content type, typically consists of text field that represents the message to be moderated

-
evaluations[]EvaluationObj

Array of Objects with the moderation evaluations to be ran against the message

-
extraExtraObj

Object with data that needs to be stored for this task, eg. fields relevant for the user to identify the content in 3rd party systems, custom metadata, etc.

-

Responses

Copied!

201 - Successful Response:

Copied!
nametypedescriptiondefaultoptional
taskTaskResponseObjTaskResponse Object-
durationstring

The duration time of the request

-

Evaluations Object

Copied!
nametypedescriptiondefaultoptional
typestringThe Evaluation type. Can be one of spam_commercial, platform_circumvention or semantic_filter-
scorefloat32The score from the result of the evaluation against the filter-
phrase_list_ids[]intList of Phrase List ID's, applicable to semantic_filter-
matches[]MatchObjList of Match objects which contain only the type for comparing the results-

Task Response Object

Copied!
nametypedescriptiondefaultoptional
idstringUnique Identifier-
statusstringThe status of the task-
content_typestringType of payload for this task, can be one of: text, image-
payloadPayloadObjThe (serialized) payload for this content type, typically consists of text field that represents the message to be moderated-
extraExtraObjObject with data that needs to be stored for this task, eg. fields relevant for the user to identify the content in 3rd party systems, custom metadata, etc.-
evaluations[]EvaluationObjList of evaluations with scores from the responses-
ruleRuleResponseObjThe rule object containing the filter, evaluations, condition and triggers for this task-
triggers[]TriggerResponseObjList of triggers assigned to the task-
assigned_tostringThe user that this task was assigned to-
reviewed_attimestampThe time the task was reviewed at-
reviewed_bystringThe person who reviewed the task-
created_attimestamp-
updated_attimestamp-

Chat Message Task Response Object

Copied!
nametypedescriptiondefaultoptional
idstringUnique Identifier-
message_idstringMessage ID-
user_idstringUser ID-
channel_idstringChannel ID-
user_namestringUser Name (if not provided the user_id value is set)-
channel_namestringChannel Name (if not provided the channel_id value is set)-
statusstringThe status of the task-
textstringThe text message to be moderated-
content_typestringType of payload for this task, can be one of: text, image-
extraExtraObjObject with data that needs to be stored for this task, eg. fields relevant for the user to identify the content in 3rd party systems, custom metadata, etc.-
evaluations[]EvaluationObjList of evaluations with scores from the responses-
ruleRuleResponseObjThe rule object containing the filter, evaluations, condition and triggers for this task-
triggers[]TriggerResponseObjList of triggers assigned to the task-
assigned_tostringThe user that this task was assigned to-
reviewed_attimestamp The time the task was reviewed at-
reviewed_bystringThe person who reviewed the task-
created_attimestamp-
updated_attimestamp-

Rule Response Object

Copied!
nametypedescriptiondefaultoptional
filterstring

Filter that selects a task based on its attributes, eg. content-type or channel type.

-
evaluations[]EvaluationObj-
conditionConditionObj

MongoDB expression that determines if the defined actions should be executed

-
triggers[]TriggerResponseObj-

Trigger Response Object

Copied!
nametypedescriptiondefaultoptional
typestringTrigger Type-
options[]OptionsObjList of trigger options for-