ActiveScore API Documentation (3.0.0)

Download OpenAPI specification:Download

About This Guide

ActiveScore is an AI-driven automated detection API, which analyzes items and returns a risk score. ActiveScore is allowing you to reduce violation prevalence while reducing human review to only those items that require it.

ActiveOS is a self-service UI for organizing items sent by ActiveScore, take automatic or manual actions and more.

For more use cases, please see ActiveScore and ActiveOS Use Cases

This guide shows how to programmatically integrate with the ActiveOS platform by setting up data flows between your platform and ActiveOS.

ActiveScore API uses a standard REST design, so that you can use a standard REST client to call our endpoints from your server.

Run in Postman

If you use Postman, you can import the ActiveScore API endpoints as a collection into your Postman app, then try out different requests to learn how the API works. Click the following button to get started:

Run in Postman

Authentication

An ActiveOS platform account is required in order to be able to send requests and data to the ActiveOS platform. An ActiveFence representative will open an account for you and send you an email invitation to log in.

The following describes how to generate an API key, which you must use in the af-api-key header of each API request that you send.

Generating an API Key – How To

To generate an API key –

  1. Click the Account Settings cog button.

  2. Select DATA MANAGEMENT and then select ActiveFence API Keys. A list of the ActiveFence API keys that have already been defined is displayed. ActiveFence_API_Keys

  3. Click the Add Key button. The following displays –

    Add_API_Key

  4. In the Key Name field, enter any free-text name to identify the key.

  5. In the Description field, enter any free text description of the key.

  6. Click the Generate Key button. The key is then displayed in the following window –

    Copy_Key

    You must copy the key and should keep it secure, because you will not be able to see it again. Later, if needed you can regenerate this key.

  7. Click on the key in the Your API Key field to copy it to the clipboard. You can now click the I’ve copied the key button.

  8. Use this key as the value of an af-api-key header that you must add to each request. af-api-key: “YOUR_API_KEY”

Regenerating a Key

Regenerating a key will override the current one. The old one will still be valid for an additional 12 hours. After 12 hours, any request sent with the old key will be rejected.

To regenerate an ActiveFence API Key –

  1. Click the Account Settings cog button.

  2. Select DATA MANAGEMENT and then ActiveFence API Keys. The following displays – API_Key_List

  3. Click the Regenerate Regenerate_Icon button on the right side of the API key to be generated.

Note – The options to delete a key and/or regenerate an existing one enable you to rotate between two different API keys.

Editing/Deleting a Key

Only the name and description of a key can be edited. Once you delete a key, any request that uses the deleted key will be rejected.

To delete an ActiveFence API Key –

  1. Click the Account Settings cog button.

  2. Select DATA MANAGEMENT, and then ActiveFence API Keys.

  3. Click the three dots button on the right side of the API key and select the Edit or the Delete option.

Integrating with ActiveOS – Overview

ActiveOS is the world’s leading tool stack for Trust & Safety teams.

With ActiveFence’s end-to-end solution, Trust & Safety teams of all sizes can protect users from malicious activity and online harm – regardless of content format, language or abuse area. By combining AI and a team of our subject-matter experts, the ActiveOS platform enables you to be agile and proactive for maximum efficiency, scalability and impact.

Integrating with ActiveOS platform enables you to detect, collect and analyze harmful content that may put your users and brand at risk. ActiveOS also provides a self-service UI that lets you easily tackle various moderation challenges and take action against violators.

A variety of options are provided for integrating with ActiveOS platform. You may refer to Integrating with ActiveOS Platform – How To for a description of the programmatic options or to ActiveFence support for a description of a variety of additional options.

See also –

ActiveOS Concepts and Terms

ActiveScore and ActiveOS Use Cases

Integrating with ActiveScore – How To

Concepts & Terms

Entities

The ActiveOS platform categorizes your content data as one of the following entities –

Content

Represents WHAT content was created on your platform, such as a post, comment, review, message, article or data. For example, a web page containing a video, a customer review of a product, a comment and so on.

Users

Represents WHO created content on your platform. These are the end users that have uploaded content to your platform, meaning the people who are the creators or publishers of the content. For example, the account used for creating an image, the user who commented on a post and so on.

Collections

Represents grouped entities. A collection is composed of multiple items grouped together in a playlist, album, folder, group or channel on your platform. For example, a playlist of videos (holding a list of videos), a discussion group (holding a list of posts), a folder (holding a list of files) or a channel.

Item

An item is an instance of an entity, meaning a specific user, content or collection that was on your platform and was sent to ActiveOS platform for analysis. For example, a specific user (a guy named Roy-the-Man), specific content (a video that this user uploaded to your platform) or a specific collection (a specific playlist of this user).

Media

It’s important to differentiate between content and media. Media refers to the images, videos, text, audio and/or files that may be contained in an item (entity instance). All entity types in ActiveOS (meaning users, content and collections) can contain one or more media.

For example, a blog post, an article or a post might contain an image, video, text, audio and/or file.

Flags

A flag is a common mechanism for platform users to report what they consider harmful, such as to specify that something is offensive, abusive or hate speech. Each flag may have multiple attributes, such as a Violation Category and the free text explanation entered by the person who flagged the item.

Risk Score

ActiveScore uses a combination of AI-powered risk scores and human analysis to analyze each item, as well as its context in order to provide a risk score of (between 0 – 1) that indicates the extent and confidence that the item is in violation of each violation type, as described above.

This means that an array of two values is sent by ActiveScore in response to each item that is analyzed.

For example, the following array might be returned by the API for a specific text item –

  • Violation Type – abusive_or_harmful.hate_speech, Risk Score – 0.8
  • Violation Type – abusive_or_harmful.harassment_or_bullying, Risk Score – 0.6

A risk score is only returned for a violation type, if the risk score is over 0.1.

Note – In ActiveOS platform user interface, this number is represented as 0 – 100 and a single aggregated risk score is assigned to each item.

Violation Types

Each item that is analyzed by ActiveScore is assigned a risk score for each violation type in order to indicate the extent and confidence that an item (entity instance) is in violation of each violation type. Violation types include abusive behavior, terrorism, extremism, profanity and so on. A risk score between 0 and 1 represents the probability of the item to be violative, as described below.

Category violation type Policy Media Type
Abusive or Harmful Harassment or Bullying Texts containing insults and use of offensive language and/or threats toward specific individuals. Text
Abusive or Harmful Profanity Texts containing language or words that are considered vulgar, offensive, or taboo in a particular culture or society. Profanity text can include swear words, curse words, racial slurs, sexually explicit language, or any language that is considered to be disrespectful, derogatory, or harmful to others.

Images and videos containing physical gestures or body language that are used to insult, intimidate, or harass someone, or to express contempt or disrespect towards them.
Text/Image
Abusive or Harmful Hate Speech Discrimination, hatred and/or incitement of violence towards individuals or groups based on their religion, ethnicity, gender, sexual orientation, social caste. Text/Image
Abusive or Harmful Child Grooming* Texts containing building an emotional connection with a child with the intention of sexually exploiting or abusing them. Text
Abusive or Harmful Graphic Violence Images and videos containing gore, graphic violence, victims of accidents and shootings, beatings, mutilation, decapitation and horrific imagery images that contain blood and guts, self-harm and suicide. Image
Abusive or Harmful General Violence Texts containing incitement, and/or threat of violence against an individual or a group. These include physical, digital, political and sexual violence, violence against animals or property and depiction and glorification of violent acts. Text
Abusive or Harmful Child Abuse The sexualization of minors and/or the depiction, facilitation, promotion or glorification of sexual exploitation, abuse or assault of minors or individuals appearing as minors. Image
Abusive or Harmful Promotes Terrorism* Any promotion or glorification of any ideology, individual or organization associated with domestic or international terrorism. Text/Image
Self Harm General Promotion, instruction, glorification of Intentional self injury, eating disorders and/or suicide. Text
Adult Content General Texts containing explicit or suggestive language or themes, often involving sexual content or nudity. Intended for mature audiences and may not be appropriate for children or individuals who are easily offended.

Images and videos containing commercial pornography, amateur pornography, child sexual abuse material (CSAM), sexting selfies, nudity, sex acts, greyscale pornographic images, sexually explicit cartoons and manga.
Text/Image
Adult Content Swimwear Images and videos containing people wearing swim/beachwear, underwear and lingerie. Image
Unauthorised Sales Drugs Images and videos containing illegal and legal drugs, drug use, drug paraphernalia, plants and symbols relating to drugs. Image
Unauthorised Sales Alcohol Images and videos containing alcoholic brands and beverages, people drinking alcohol, frat parties, keg stands, bars and nightclubs, party aftermaths, shots, beer pong, kegs, and plastic cups associated with drinking alcohol. Image
Unauthorised Sales Weapons Images and videos containing rifles, machine guns, handguns, grenade launchers, swords, knives and people holding handheld weapons. Image
Gambling Gambling Images and videos containing gambling imagery and events, gambling advertising, casinos, lottery, online betting, slots, poker, blackjack, craps, roulette and other games of chance. Image
Privacy Violation PII Texts containing Personal Identifiable Information: url, US bank number, social security number, International Bank Account Number (IBAN) code, phone number, crypto, UK National Health Service (NHS), ip address, US passport, name/surname, email address, US driver license, credit card. Text
Violative usernames - Drugs Toxicity Trained to detect violations in the unique structure of usernames, which often consists of letters, numbers and symbols, and is devoid of additional context.
This detector will enable clients to weed-out users using violative usernames associated with drugs, which often promote illegal drugs on the platform.

<= 160 characters The text item to analyze.
Text
Violative usernames - Hate Speech Toxicity Trained to detect violations in the unique structure of usernames, which often consists of letters, numbers and symbols, and is devoid of additional context.
This detector will enable clients to weed-out users using violative usernames associated with hate speech, which often promote hate speech on the platform.

<= 160 characters The text item to analyze.
Text
Violative usernames - Profanity Toxicity Trained to detect violations in the unique structure of usernames, which often consists of letters, numbers and symbols, and is devoid of additional context.
This detector will enable clients to weed-out users using violative usernames associated with profanity.

<= 160 characters The text item to analyze.
Text
Violative usernames - Sexual Toxicity Trained to detect violations in the unique structure of usernames, which often consists of letters, numbers and symbols, and is devoid of additional context.
This detector will allow clients to weed-out users using violative usernames associated with sexual content.

<= 160 characters The text item to analyze.
Text
Violative usernames - General Toxicity Trained to detect violations in the unique structure of usernames, which often consists of letters, numbers and symbols, and is devoid of additional context.
This detector will allow clients to weed-out users using violative usernames which often promote general toxicity on the platform.

<= 160 characters The text item to analyze.
Text
Solicitation of drugs Illegal Trained to detect any content, communication, or depiction that indicates an intent to conduct, or the facilitation of drug related transactions.
These may include: advertising or offering drugs, initiating and/or negotiating a drug transaction.
Text
Respectful Prosocial Trained to detect any communication that contains positive respectful behavior. This includes cordiality and positive acknowledgement of others. Text
  • Promotes Terrorism is only supported in asynchronous APIs

  • Child Grooming violation is only supported in the Text API (sync and async)

API Response latency

Response latency is measured from the time a request is received by our servers to the time the response is returned by our servers, not including network latency, which might have an impact.

The latency depends on file type and size, so it might vary from our general benchmark:

media p50 p90
text 100 ms 250 ms
image 1 sec 5 sec
video (1 min) 10 sec 15 sec
video (5 min) 1 min 1.5 min
video (30 min) 3 min 3.5 min
audio (30 sec) 6 sec 8 sec
audio (60 sec) 8 sec 11 sec
audio (30 min) 15 min 20 min

ActiveScore and ActiveOS Use Cases

Here’s a few popular use cases for sending data to ActiveOS platform –

  • Newly published items – Before publishing items, you can send them to the T&S platform in order to avoid publishing violative items. Alternatively, you can send all newly published items to the T&S platform immediately after publishing them in order to determine whether they should be removed.
  • High-impact items – You can send items that have become extremely popular to the T&S platform in order to verify whether they are violative and should be removed.
  • Just violation detection – If you have your own in-house T&S platform, you can send items to the T&S platform for violation detection and then handle the results yourselves.
  • A second opinion – If you’re already sending your data to other risk score vendors, you can use the T&S platform as yet another vendor for specific violations.
  • T&S orchestration – You can send your data to the T&S platform in order to leverage its Automated Workflows and Moderation Views.
  • Getting more T&S services – You can send the T&S platform items that you have already detected as violative, so that the T&S platform can use this information to provide various services, such as detecting repeat offenders or improving the platform’s violation detection services.

Rate limit

Projects has a rate limit for the amount of requests you can send per second. The default rate limit is 50 requests per second. You can reach out to your account manager to increase this rate limit.

When you are past the rate limit, your API requests will get a HTTP 429 response.

Integrating with the T&S Platform – How To

APIs

ActiveFence T&S platform APIs enable you to send your content to the T&S platform in order to get violation detections, risk scores, moderation insights and reports to be consumed by your software.

In this way, you can use the ActiveFence APIs in the traditional request/response model, with or without the ActiveFence T&S platform UI. When using the ActiveFence T&S platform UI, the APIs can act as a gateway for sending your data to ActiveFence. This data then appears in the ActiveFence T&S platform’s UI (Moderation View) and in Automated Workflows.

APIs – How To

Here’s a list of the API types provided for sending your data the T&S platform –

The T&S platform provides both synchronous endpoints and asynchronous endpoints. The data in the request and the response of both types is similar. The difference is the manner in which the response is sent.

  • The T&S platform responds to synchronous endpoints in real time.
  • The T&S platform responds to asynchronous endpoints by acknowledging the receipt of the request and then later sending a callback.

Synchronous APIs

A synchronous endpoint is best suited for users who need realtime responses and require low latency. A synchronous endpoint keeps the HTTP request connection open until after it has completed processing and has sent the results in the response. Currently, only text items can be sent to the T&S platform synchronously. For example, a chat message might require a realtime response from the T&S platform in order to verify that it is not violative before it is published.

To execute a synchronous endpoint –

  1. If you have not done so yet, create an API key, as described in the Authentication section. Otherwise, you can use the API key that you created previously.
  2. Send a request to the T&S platform, while using the API key in the af-api-key header of the request. The T&S platform immediately sends back the violation detections and risk scores. See Text API – synchronous for the syntax of the request.

Asynchronous APIs

The Asynchronous API enables you to send data to the T&S platform and to later get a response as a callback.

To execute an asynchronous endpoint –

  1. If you have not done so yet, create an API key, as described in the Authentication section. Otherwise, you can use the API key that you created previously.
  2. Configure your callback endpoint in the T&S platform as described in Callbacks.
  3. Send a request while using the API key in the af-api-key header of the API request that you send to the T&S platform. The T&S platform immediately sends back an acknowledgement upon receiving a request and later sends the result to your callback endpoint. See the following for the syntax of the requests –

Action Webhooks

In the ActiveFence T&S platform, you can define action webhooks that enable you to trigger actions on your own platform or on any other third-party system.

These action webhooks can be triggered by you at the click of a button in the T&S platform Moderation View or by an Automated Workflow that you define.

You must make sure that a relevant API is defined on your platform or on the third-party platform that will execute the action upon receiving the action webhook from the ActiveFence T&S platform.

Action Webhooks – How To

In the ActiveFence T&S platform, you can define action webhooks that enable you to activate actions on your platform or on any other third-party system. These action webhooks can be triggered by you at the click of a button in the ActiveFence T&S platform Moderation View or by an Automated Workflow that you define.

  • Actions on your platform – The ActiveFence T&S platform action webhooks can trigger actions on your platform, such as removing content, suspending a user, removing a user, warning a user and so on. You must define an API on your platform (for each action webhook) that will execute the relevant action upon receiving the action webhook request from the ActiveFence T&S platform.
  • Actions on third-party platforms – The ActiveFence T&S platform action webhooks can trigger actions on third-party applications, such as ZenDesk. You must ensure that the relevant API exists on the third-party application that will execute the relevant action upon receiving the action webhook request from the ActiveFence T&S platform.

You can customize Moderation Views and the action buttons that they contain, as well as Automated Workflows according to your organization’s preferences and requirements.

Adding an Action Webhook

To add an action webhook –

  1. On your platform, define an API that can receive the relevant action webhook request from the ActiveFence T&S platform. If this action is intended for a third-party platform, such as ZenDesk, then make sure that an API exists there that can execute the relevant action upon receiving the action webhook request from the ActiveFence T&S platform.
  2. Add an API key to be used by the ActiveFence T&S platform action webhook by selecting Data Management, and then Key Management. You may refer to Key Management section for more information.
  3. To define the action webhook in the ActiveFence T&S platform, click the Account Settings cog button.
  4. Select DATA MANAGEMENT, and then Action Webhooks.
  5. Click the Add Action Webhook button. The following displays –

Add_Action_Webhook

  1. Fill out this window, as follows –
  • In the Action field, enter a free-text indicative name for this action. For example, Suspend.

  • In the Related Entity field, select the relevant data entity on which the action will be performed – user, collection, content or flag.

  • In the Endpoint URL field, specify the URL of the endpoint on your platform or on the third-party application that will execute the relevant action upon receiving this action webhook request.

  • In the Request Method field, select GET or POST.

  • In the API Key dropdown menu, select one of the API Keys that you defined in the Key Management or select No Auth. The No auth option specifies that the webhook does not require authentication.

    The bottom of the page enables you to define the JSON of the payload to be sent by the action webhook.

  1. In the JSON editor, customize the request body with your own payload. You can use the $ sign to include dynamic value placeholders that will be inserted by the ActiveFence T&S platform.

For example, if the payload should include a dynamic value, such as a user name, then by inserting a $ sign, a dropdown menu is displayed of all the relevant values to choose from. For example, as shown below –

Action_Webhook_Payload-1

The values that are displayed in the dropdown menu for your selection differ according to the entity type that is selected in the Entity field – user, collection, content or flag.

The following displays after selecting userId from the dropdown menu (shown above) –

Action_Webhook_Payload-2

  1. If needed, select the Query params tab to enter keys and values to be added to the webhook’s endpoint URL, as shown below –

Query_Params

  1. Test the endpoint by clicking the Test Action button. Upon a successful test, the Save button is enabled.

  2. Click the Save button.

Note – This action webhook is now available to be selected when defining a button in the Action Mapping section for a Moderation View.

Editing an Action Webhook

To edit an existing webhook –

  1. Click the Account Settings cog button.
  2. Select DATA MANAGEMENT, and then Action Webhooks.
  3. Click the name of the displayed webhook to display a dropdown menu of all the webhooks defined in your account, as shown below –

Edit_Web_Hook-1 4. You can modify the fields that appear across the top of the page, as follows –

Edit_Web_Hook-2

  • In the Request Method field, select GET or POST.
  • In the Endpoint URL field, specify the URL of the endpoint on your platform or on the third-party application that will execute the relevant action upon receiving this action webhook request.
  • In the Entity field, select the relevant data entity on which the action will be performed user, collection or content.
  • In the API Key dropdown menu, select one of the API Keys that you defined in the Key Management or select No Auth. The No auth option specifies that the webhook does not require authentication. If you would like to create a new API key, then select the + Create new key option from this dropdown menu and follow the instructions in Key Management section.
  1. The bottom of the page enables you to define/modify the JSON of the payload to be sent by the action webhook.

In the JSON editor, customize the request body with your own payload. You can use the $ sign to include dynamic value placeholders that will be inserted by the ActiveFence T&S platform.

For example, if the payload should include a dynamic value, such as a user name, then by inserting a $ sign, a dropdown menu is displayed of all the relevant values for you to choose. For example, as shown below –

Action_Webhook_Payload-1 The properties that are displayed in the dropdown menu for your selection differ according to the entity type that is selected in the Entity field – content, user or collection.

The following displays after selecting userId from the dropdown menu (shown above) – Action_Webhook_Payload-2

Note – By default, the properties that you can select from this dropdown menu are suited to the entity type. If you change the entity type by selecting a different value from the Entity dropdown menu, then the properties that you have already added to the payload may no longer be suitable to the new entity type, and therefore the definitions of this action webhook are erased from the current page. A warning message is displayed accordingly. For example, if you added the $contentId property to the payload of a Content entity and then changed the entity type to User.

  1. If needed, select the Query params tab to enter keys and values to be added to the webhook’s endpoint URL, as shown below –

Query_Params

  1. Test the endpoint by clicking the Test Action button. Upon a successful test, the Save button is enabled.

  2. Click the Save button.

To delete an action webhook, click three dots and select Remove Webhook.

To rename an action webhook, click three dots and select Rename Action.

Callbacks

A callback is a notification sent by the ActiveFence T&S platform in response to an asynchronous API request sent by your platform.

The ActiveFence T&S platform will send a callback to the endpoint of your choice after the ActiveFence T&S platform has completed processing the request sent in an asynchronous API.

For example, after your platform sends an asynchronous text request, the ActiveFence T&S platform returns an analysis result callback containing the list of violations that were detected for that text.

Important Note

Terror, Hate Speech and Child Abuse violations take longer to process. To avoid waiting for the results of each of these types of violations, a separate callback is sent by the ActiveFence T&S platform for each of these violations after the process completes for a text, image and/or audio API.

A separate callback may be sent in response to a video API for each type of violation.

This means that multiple callbacks may be triggered in response to a single request. Each callback contains the risk score for one or more violations and considers all relevant media fields (texts/images and so on) sent in the request.

You may refer to the documentation of each API for a description of the fields that are analyzed for each API.

The list of the violations with which this callback is associated is in the analyzed_violations field.

A callback is triggered even when no violation is found (risk score is 0, or no relevant fields exist in the request for a violation) so that you can track when the processing of this item has finished.

How to define a Callback

To define the callback endpoint –

When sending an asynchronous request, set the callback_url field to your endpoint. ActiveFence will call this endpoint once processing is done, or for error reporting.

Note - This field is not mandatory. In case it is not used, the request would still be processed, only a callback won't be called by ActiveFence.

Callback Authentication

You have the option to add an API key to a callback request’s header or query params. To do so, assign the name of a key that you defined in the T&S platform’s Key Management section to callback_key_name. This key is then added as the API key in the callback request’s header or query params.

Key Management

The Key Management option enables you to create API keys that you can use to interact programmatically with ActiveFence T&S platform. In addition, they can be used by the T&S platform to send action webhook notifications or callbacks to your platform, such as a notification to remove a post from your platform.

To define an API key –

  1. Click the cog button.

  2. Select DATA MANAGEMENT, and then select Key Management.

    A list of the API keys that have already been defined is displayed.

Key_Management

  1. Click the Add Key button. The following displays –

    Add_API_Key-1

  2. Define the API key by filling out the following fields –

  • Key Name – Enter any free text to identify the key.
  • Description – Enter a free text description of the purpose of this key.
  • Key – Enter any free-text as the key name. Spaces or periods (.) are not permitted. Underscores (_) and dashes (-) are permitted.
  • Value – Enter the value for this key. For security reasons, once you save the API key, you will no longer be able to display it here, but you can always regenerate another API key.
  • Add To – Select Header or Query Params to specify where the key will be inserted in the request.
  1. Click the Save button.

Custom Fields

By default, the ActiveFence T&S platform is provided with a wide variety of fields to describe your items.

The ActiveFence T&S platform also enables you to add your own fields by defining the title, key and type of each Custom Field to be added to your account. These Custom Fields then appear throughout the T&S platform, such as in the Moderation Views and Automated Workflows.

For example, you might define a new Custom Field named Subscription, which can have one of the following values – Premium, Basic or Free.

By defining these Custom Fields in the ActiveFence T&S platform, the request structure of the API requests that you can send to the ActiveFence T&S platform is automatically modified to accept these Custom Fields according to your definitions. You can immediately start sending values in these new fields.

To define Custom Fields –

  1. Click the Account Settings cog button.

  2. Select MODERATION CAPABILITIES and then select Custom Fields. Custom Field

  3. Click the Add Field button. The following displays –

    Choose_Custom_Field

  4. Click on the COLLECTED or EDITABLE option and then the Next button to specify that the values of these fields will be received by the ActiveFence T&S platform from your platform via API request or direct upload. The following displays –

    Add_a_Collected_Field

  5. In the Title field, enter any free-text name. This name appears as the name of this Custom Field and as title of this field’s column in the Moderation View. This field can include spaces.

  6. In the Key field, enter any free text name for this key. This name appears as the name of this field in an API request to the T&S platform. Spaces or periods (.) are not permitted. Underscores (_) and dashes (-) are permitted.

  7. From the Type dropdown menu, select the data type of the Custom Field, which can be Text, Number, Boolean, Date or Dropdown.

    Note – The data type of fields sent to the ActiveFence T&S platform in a Custom Field will be verified and if incorrect, an error is generated.

    Later, in the Moderation View, the ActiveFence T&S platform will validate the data type that a moderator can enter for this field. The T&S platform will also validate data type received in API requests accordingly.

  8. Click the Finish button. The following displays listing the collected Custom Fields that have been defined (see example below)–

    Custom_Fields_List

    Clicking the threedots button enables you to edit or delete the definition of a Custom Field.

  9. You can now push data to the ActiveFence T&S platform.

The following is an example of an API request that sends an image to the T&S platform.

animal_type, age, is_adopted, adoption_date and habitat are the key names of the Custom Fields and Persian cat, 3, true, 2015-11-25 and Urban, Coastal are the values accordingly.

When this request will be received by the T&S platform, it will validate the data type (Text, Number, Boolean, Date or Dropdown) in each Custom Field.

Valid formats:

Text : Free text.

Number : Any number including floating number.

Boolean : true / false.

Date: "MM-DD-YYYY" , "YYYY-MM-DD" , "MM-DD-YYYY HH:MM" , "YYYY-MM-DD HH:MM".

Dropdown: A single string or an Array of strings - ["str1", "str2"].

Reuest example:

"custom_fields" : [
{“animal_type: “Persian cat”}, 
{“age”: 3}, 
{“is_adopted”: true}, 
{"adoption_date" : "2015-11-25"},
{"habitat" : ["Urban","Coastal"]} or {"habitat" : "Urban"}
]

These fields are now part of each item, so that they may appear in each row (item) in a Moderation View, if the Moderation View is defined to include them.

Note – Defining Editable fields by selecting Editable in the Choose custom field type window (described above) enables moderators to enter these item values in a Moderation View. Editable fields can also be populated by API requests using the custom fields.

content

Content APIs Represents WHAT content was created on your platform, such as a post, comment, review, message, article or data. For example, a web page containing a video, a customer review of a product, a comment and so on.

Text API - Asynchronous

Endpoint: https://apis.activefence.com/v3/content/text

The Asynchronous Text API enables you to send a text item and its context to the ActiveFence T&S platform, which will analyze it, detect violations and return an array of one or more violations detected in the item in a callback.

If the ID of this text item already exists, then its details are updated.

The T&S platform analyzes the text and thumbnail_url fields.

NOTE - Text length is limited to 10,240 characters. Longer texts should be split into segments (by punctuation or spacing) and sent in a separate request.

Authorizations:
API Key
Request Body schema: application/json

Text, along with its context.

text
required
string <= 10240 characters

The text to analyze. Limited to 10,240 characters

content_id
required
string (content_id_async)

The unique identifier of the item on your platform. This ID will be used in the callback sent to your platform.

Note – A callback containing the analysis results is only sent once for each content_id.

category
string (category)

This field activates specific policies corresponding to the categories included in the API request. For example, sending a category of “chats” will activate only those policies defined as “chats” via the Policy Management UI.

callback_url
string (callback_url)

Callback URL where Activefence will post the response to.

callback_key_name
string (callback_key_name)

The name of a key defined in the T&S platform’s key management section.

This key will be added to the header/query params of callback requests sent to the callback defined in callback_url.

thumbnail_url
string <uri> (thumbnail_url)

The publicly available URL of the thumbnail that accompanied the item. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading.

date_created (number) or date_created (string) (date_created)

The time in which the item was added to your platform. Supports ISO 8601 time string or UNIX number.

ISO format: YYYY-MM-DD HH:MM or MM-DD-YYYY HH:MM.

For example – “2020-11-23 22:30” 0r “11-23-2015 05:30“.

views_count
number (views_count) >= 0

The quantity of views of this item on your platform.

comments_count
number (comments_count) >= 0

The quantity of comments on this item on your platform.

user_id
string (user_id)

The ID of the User who created this item. It is recommended to first add the details of this User using the Users API.

Array of objects (contained_in)

The collections to which the item belongs.

webpage_url
string <uri> (webpage_url)

The publicly available web page where the item is visible.

custom_fields
Array of objects (custom_fields)

A set of key/value pairs of the custom fields that were added to your account. These custom fields then appear throughout the T&S platform.

Example – [{"special_name":"name1"}, {"special_count": "10"}, {"is_premium": "true"}]

Note – Quotation marks must be used for key and text values.

See Custom Fields for an overview.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "text": "string",
  • "content_id": "string",
  • "category": "string",
  • "callback_url": "string",
  • "callback_key_name": "\"my key",
  • "thumbnail_url": "http://example.com",
  • "date_created": "2020-11-23 22:30",
  • "views_count": 0,
  • "comments_count": 0,
  • "user_id": "string",
  • "contained_in": [
    ],
  • "webpage_url": "http://example.com",
  • "custom_fields": [
    ]
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "analyzed_violations": [
    ]
}

Callback payload samples

Callback
POST: {$request.body#/callback_url}
Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "violations": [
    ],
  • "analyzed_violations": [
    ],
  • "errors": [
    ]
}

Text API - Synchronous

Endpoint: https://apis.activefence.com/sync/v3/content/text

The Synchronous Text API enables you to send a text item and its context to the ActiveFence T&S platform, which will analyze it, detect violations and return an array of one or more violations detected in the item synchronously.

If the ID of this text item already exists, then its details are updated.

The T&S platform analyzes the text field.

Note - This API does not support Promotes Terrorism violation.

NOTE - Text length is limited to 1024 characters. Longer texts should be split into segments (by punctuation or spacing) and sent in a separate request.

Authorizations:
API Key
Request Body schema: application/json

Text, along with its context.

text
required
string (text) <= 1024 characters

The text item to analyze. Limited to 1024 characters

content_id
required
string (content_id)

The unique identifier of the item on your platform. This ID will be used in the response.

category
string (category)

This field activates specific policies corresponding to the categories included in the API request. For example, sending a category of “chats” will activate only those policies defined as “chats” via the Policy Management UI.

thumbnail_url
string <uri> (thumbnail_url)

The publicly available URL of the thumbnail that accompanied the item. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading.

webpage_url
string <uri> (webpage_url)

The publicly available web page where the item is visible.

date_created (number) or date_created (string) (date_created)

The time in which the item was added to your platform. Supports ISO 8601 time string or UNIX number.

ISO format: YYYY-MM-DD HH:MM or MM-DD-YYYY HH:MM.

For example – “2020-11-23 22:30” 0r “11-23-2015 05:30“.

user_id
string (user_id)

The ID of the User who created this item. It is recommended to first add the details of this User using the Users API.

Array of objects (contained_in)

The collections to which the item belongs.

views_count
number (views_count) >= 0

The quantity of views of this item on your platform.

comments_count
number (comments_count) >= 0

The quantity of comments on this item on your platform.

custom_fields
Array of objects (custom_fields)

A set of key/value pairs of the custom fields that were added to your account. These custom fields then appear throughout the T&S platform.

Example – [{"special_name":"name1"}, {"special_count": "10"}, {"is_premium": "true"}]

Note – Quotation marks must be used for key and text values.

See Custom Fields for an overview.

Responses

Request samples

Content type
application/json
{
  • "text": "text to analyze",
  • "content_id": "entity123",
  • "category": "chats",
  • "thumbnail_url": "http://example.com",
  • "webpage_url": "http://example.com",
  • "date_created": 1650886140,
  • "user_id": "user123",
  • "contained_in": [
    ],
  • "views_count": 0,
  • "comments_count": 0,
  • "custom_fields": [
    ]
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "confidence": "NotDetected",
  • "language": "string",
  • "violations": [
    ],
  • "errors": [
    ]
}

Image API

Endpoint: https://apis.activefence.com/v3/content/image

The Image API enables you to send an image item and its context to the ActiveFence T&S platform, which will analyze it, detect violations and return an array of one or more violations detected in the item. If the ID of this image already exists, then its details are updated.

The API supports the following file formats: JPG, PNG, WEBP. Image file size is limited to 6k - 5MB.

The T&S platform analyzes the following fields:

Analyzed image - media_url or raw_media fields.

Analyzed texts - title and description fields.

NOTE - title field is limited to 1,024 characters and description field is limited to 10,240 characters.

Authorizations:
API Key
Request Body schema: application/json
content_id
required
string (content_id_async)

The unique identifier of the item on your platform. This ID will be used in the callback sent to your platform.

Note – A callback containing the analysis results is only sent once for each content_id.

category
string (category)

This field activates specific policies corresponding to the categories included in the API request. For example, sending a category of “chats” will activate only those policies defined as “chats” via the Policy Management UI.

media_url
string <uri> (media_url)

The URL from which to download the content. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading. Alternatively, "raw_media" field can be used to send the media as Base64-encoded string. Either the "media-url" or "raw-media" field is mandatory.

callback_url
string (callback_url)

Callback URL where Activefence will post the response to.

callback_key_name
string (callback_key_name)

The name of a key defined in the T&S platform’s key management section.

This key will be added to the header/query params of callback requests sent to the callback defined in callback_url.

webpage_url
string <uri> (webpage_url)

The publicly available web page where the item is visible.

title
string (title) <= 1024 characters

The title that accompanied the item. Limited to 1024 characters

description
string (description) <= 10240 characters

The description that accompanied the item. Limited to 10,240 characters.

date_created (number) or date_created (string) (date_created)

The time in which the item was added to your platform. Supports ISO 8601 time string or UNIX number.

ISO format: YYYY-MM-DD HH:MM or MM-DD-YYYY HH:MM.

For example – “2020-11-23 22:30” 0r “11-23-2015 05:30“.

views_count
number (views_count) >= 0

The quantity of views of this item on your platform.

comments_count
number (comments_count) >= 0

The quantity of comments on this item on your platform.

user_id
string (user_id)

The ID of the User who created this item. It is recommended to first add the details of this User using the Users API.

Array of objects (contained_in)

The collections to which the item belongs.

custom_fields
Array of objects (custom_fields)

A set of key/value pairs of the custom fields that were added to your account. These custom fields then appear throughout the T&S platform.

Example – [{"special_name":"name1"}, {"special_count": "10"}, {"is_premium": "true"}]

Note – Quotation marks must be used for key and text values.

See Custom Fields for an overview.

raw_media
string (raw_media)

Base64-encoded string of a media file. Alternatively, "media_url" field can be used to send a link to the media. Either the "raw-media" or "media-url" field is mandatory.

mime_type
string (mime_type)

The MIME (Multipurpose Internet Mail Extensions) type of a media file. Represents the specific format or type of the media content sent in "raw-media" field. It is not mandatory in scenarios where the media type can be reliably inferred or detected.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "content_id": "string",
  • "category": "string",
  • "media_url": "http://example.com",
  • "callback_url": "string",
  • "callback_key_name": "\"my key",
  • "webpage_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "date_created": "2020-11-23 22:30",
  • "views_count": 0,
  • "comments_count": 0,
  • "user_id": "string",
  • "contained_in": [
    ],
  • "custom_fields": [
    ],
  • "raw_media": "string",
  • "mime_type": "image/jpeg"
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "analyzed_violations": [
    ]
}

Callback payload samples

Callback
POST: {$request.body#/callback_url}
Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "violations": [
    ],
  • "analyzed_violations": [
    ],
  • "errors": [
    ]
}

Video API

Endpoint: https://apis.activefence.com/v3/content/video

The Video API enables you to send a video item and its context to the ActiveFence T&S platform, which will analyze it, detect violations and return an array of one or more violations detected in the item. If the ID of this video already exists, then its details are updated.

The API supports the following file formats: mp4, mkv, avi.

Video length is limited to 30 min.

Video file size is limited to 1GB.

The T&S platform analyzes the following fields:

Analyzed video - media_url or raw_media fields.

Analyzed image - thumbnail_url field.

Analyzed texts - title and description fields.

NOTE - title field is limited to 1,024 characters and description field is limited to 10,240 characters.

Authorizations:
API Key
Request Body schema: application/json
content_id
required
string (content_id_async)

The unique identifier of the item on your platform. This ID will be used in the callback sent to your platform.

Note – A callback containing the analysis results is only sent once for each content_id.

category
string (category)

This field activates specific policies corresponding to the categories included in the API request. For example, sending a category of “chats” will activate only those policies defined as “chats” via the Policy Management UI.

media_url
string <uri> (media_url)

The URL from which to download the content. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading. Alternatively, "raw_media" field can be used to send the media as Base64-encoded string. Either the "media-url" or "raw-media" field is mandatory.

callback_url
string (callback_url)

Callback URL where Activefence will post the response to.

callback_key_name
string (callback_key_name)

The name of a key defined in the T&S platform’s key management section.

This key will be added to the header/query params of callback requests sent to the callback defined in callback_url.

webpage_url
string <uri> (webpage_url)

The publicly available web page where the item is visible.

title
string (title) <= 1024 characters

The title that accompanied the item. Limited to 1024 characters

description
string (description) <= 10240 characters

The description that accompanied the item. Limited to 10,240 characters.

thumbnail_url
string <uri> (thumbnail_url)

The publicly available URL of the thumbnail that accompanied the item. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading.

date_created (number) or date_created (string) (date_created)

The time in which the item was added to your platform. Supports ISO 8601 time string or UNIX number.

ISO format: YYYY-MM-DD HH:MM or MM-DD-YYYY HH:MM.

For example – “2020-11-23 22:30” 0r “11-23-2015 05:30“.

views_count
number (views_count) >= 0

The quantity of views of this item on your platform.

comments_count
number (comments_count) >= 0

The quantity of comments on this item on your platform.

user_id
string (user_id)

The ID of the User who created this item. It is recommended to first add the details of this User using the Users API.

Array of objects (contained_in)

The collections to which the item belongs.

custom_fields
Array of objects (custom_fields)

A set of key/value pairs of the custom fields that were added to your account. These custom fields then appear throughout the T&S platform.

Example – [{"special_name":"name1"}, {"special_count": "10"}, {"is_premium": "true"}]

Note – Quotation marks must be used for key and text values.

See Custom Fields for an overview.

raw_media
string (raw_media)

Base64-encoded string of a media file. Alternatively, "media_url" field can be used to send a link to the media. Either the "raw-media" or "media-url" field is mandatory.

mime_type
string (mime_type)

The MIME (Multipurpose Internet Mail Extensions) type of a media file. Represents the specific format or type of the media content sent in "raw-media" field. It is not mandatory in scenarios where the media type can be reliably inferred or detected.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "content_id": "string",
  • "category": "string",
  • "media_url": "http://example.com",
  • "callback_url": "string",
  • "callback_key_name": "\"my key",
  • "webpage_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "thumbnail_url": "http://example.com",
  • "date_created": "2020-11-23 22:30",
  • "views_count": 0,
  • "comments_count": 0,
  • "user_id": "string",
  • "contained_in": [
    ],
  • "custom_fields": [
    ],
  • "raw_media": "string",
  • "mime_type": "image/jpeg"
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "analyzed_violations": [
    ]
}

Callback payload samples

Callback
POST: {$request.body#/callback_url}
Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "violations": [
    ],
  • "analyzed_violations": [
    ],
  • "errors": [
    ]
}

Audio API

Endpoint: https://apis.activefence.com/v3/content/audio

The Audio API enables you to send an audio item and its context to the ActiveFence T&S platform. If the ID of this audio already exists, then its details are updated.

The Platform supports playing the following file formats: mp3, WAV, OGG.

Audio length is limited to 30 min.

Analyzed audio - media_url or raw_media fields.

Analyzed image - thumbnail_url field.

Analyzed texts - title and description fields.

NOTE - title field is limited to 1,024 characters and description field is limited to 10,240 characters.

Authorizations:
API Key
Request Body schema: application/json
content_id
required
string (content_id_async)

The unique identifier of the item on your platform. This ID will be used in the callback sent to your platform.

Note – A callback containing the analysis results is only sent once for each content_id.

category
string (category)

This field activates specific policies corresponding to the categories included in the API request. For example, sending a category of “chats” will activate only those policies defined as “chats” via the Policy Management UI.

media_url
string <uri> (media_url)

The URL from which to download the content. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading. Alternatively, "raw_media" field can be used to send the media as Base64-encoded string. Either the "media-url" or "raw-media" field is mandatory.

callback_url
string (callback_url)

Callback URL where Activefence will post the response to.

callback_key_name
string (callback_key_name)

The name of a key defined in the T&S platform’s key management section.

This key will be added to the header/query params of callback requests sent to the callback defined in callback_url.

webpage_url
string <uri> (webpage_url)

The publicly available web page where the item is visible.

title
string (title) <= 1024 characters

The title that accompanied the item. Limited to 1024 characters

description
string (description) <= 10240 characters

The description that accompanied the item. Limited to 10,240 characters.

thumbnail_url
string <uri> (thumbnail_url)

The publicly available URL of the thumbnail that accompanied the item. In order to be displayed correctly in the T&S platform, the url should start with "https://" to avoid mixed content issues, where web browsers block insecure resources from loading.

date_created (number) or date_created (string) (date_created)

The time in which the item was added to your platform. Supports ISO 8601 time string or UNIX number.

ISO format: YYYY-MM-DD HH:MM or MM-DD-YYYY HH:MM.

For example – “2020-11-23 22:30” 0r “11-23-2015 05:30“.

views_count
number (views_count) >= 0

The quantity of views of this item on your platform.

comments_count
number (comments_count) >= 0

The quantity of comments on this item on your platform.

user_id
string (user_id)

The ID of the User who created this item. It is recommended to first add the details of this User using the Users API.

Array of objects (contained_in)

The collections to which the item belongs.

custom_fields
Array of objects (custom_fields)

A set of key/value pairs of the custom fields that were added to your account. These custom fields then appear throughout the T&S platform.

Example – [{"special_name":"name1"}, {"special_count": "10"}, {"is_premium": "true"}]

Note – Quotation marks must be used for key and text values.

See Custom Fields for an overview.

raw_media
string (raw_media)

Base64-encoded string of a media file. Alternatively, "media_url" field can be used to send a link to the media. Either the "raw-media" or "media-url" field is mandatory.

mime_type
string (mime_type)

The MIME (Multipurpose Internet Mail Extensions) type of a media file. Represents the specific format or type of the media content sent in "raw-media" field. It is not mandatory in scenarios where the media type can be reliably inferred or detected.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "content_id": "string",
  • "category": "string",
  • "media_url": "http://example.com",
  • "callback_url": "string",
  • "callback_key_name": "\"my key",
  • "webpage_url": "http://example.com",
  • "title": "string",
  • "description": "string",
  • "thumbnail_url": "http://example.com",
  • "date_created": "2020-11-23 22:30",
  • "views_count": 0,
  • "comments_count": 0,
  • "user_id": "string",
  • "contained_in": [
    ],
  • "custom_fields": [
    ],
  • "raw_media": "string",
  • "mime_type": "image/jpeg"
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "analyzed_violations": [
    ]
}

Callback payload samples

Callback
POST: {$request.body#/callback_url}
Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "violations": [
    ],
  • "analyzed_violations": [
    ],
  • "errors": [
    ]
}

users

Users API Represents WHO created content on your platform. These are the end users that have uploaded content to your platform, meaning the people who are the creators or publishers of the content. For example, the account used for creating an image. A user can also be someone who likes, reacts, follows, administers, shares items and so on.

Users API

Endpoint: https://apis.activefence.com/v3/users/upsert

The Users API enables you to send details about a user of your platform to the ActiveFence T&S platform, which will analyze it, detect violations and return an array of one or more violations detected in the item. If the ID of this user already exists, then its details are updated.

The T&S platform analyzes the name, description and nickname fields of each item.

NOTE - name and nickname fields are limited to 1,024 characters. Description field is limited to 10,240 characters.

Authorizations:
API Key
Request Body schema: application/json
required
Array of objects (user)
callback_url
string (callback_url)

Callback URL where Activefence will post the response to.

callback_key_name
string (callback_key_name)

The name of a key defined in the T&S platform’s key management section.

This key will be added to the header/query params of callback requests sent to the callback defined in callback_url.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "users": [
    ],
  • "callback_url": "string",
  • "callback_key_name": "\"my key"
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "analyzed_violations": [
    ]
}

Callback payload samples

Callback
POST: {$request.body#/callback_url}
Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "violations": [
    ],
  • "analyzed_violations": [
    ],
  • "errors": [
    ]
}

collection

Collection API Represents grouped entities. A collection is comprised of multiple items grouped together in a playlist, album, folder, group or channel on your platform. For example, a playlist of videos (holding a list of videos), a discussion group (holding a list of posts), a folder (holding a list of files) or a channel.

Collection API

Endpoint: https://apis.activefence.com/v3/collections/{collection_type}

The Collections API enables you to send details about a collection of your platform to the ActiveFence T&S platform, which will analyze it, detect violations and return an array of one or more violations detected in the item. If the ID of this collection already exists, then its details are updated.

The T&S platform analyzes the name and description fields of each collection.

Authorizations:
API Key
path Parameters
collection_type
required
string
Enum: "album" "playlist" "channel" "folder" "group"

The type of the collection.

Request Body schema:
object (collection)

A Collection object is a data structure to be used in ActiveScore API requests to describe a collection of items, such as playlist, groups, folders and so on.

callback_url
string (callback_url)

Callback URL where Activefence will post the response to.

callback_key_name
string (callback_key_name)

The name of a key defined in the T&S platform’s key management section.

This key will be added to the header/query params of callback requests sent to the callback defined in callback_url.

Responses

Callbacks

Request samples

Content type
{
  • "collection": {
    },
  • "callback_url": "string",
  • "callback_key_name": "\"my key"
}

Response samples

Content type
application/json
{
  • "response_id": "string",
  • "analyzed_violations": [
    ]
}

Callback payload samples

Callback
POST: {$request.body#/callback_url}
Content type
application/json
{
  • "response_id": "string",
  • "entity_id": "string",
  • "entity_type": "content",
  • "violations": [
    ],
  • "analyzed_violations": [
    ],
  • "errors": [
    ]
}

flags

The Flags API enables you to send details about the flag made on an item on your platform to the ActiveFence T&S platform.

Flags API

Endpoint: https://apis.activefence.com/v3/flags

A flag represents a report by a platform user of what they consider a violative item, such as to specify that a content, a user or a collection is offensive, abusive or hate speech.

The Flag API enables you to send details about the flag made on an item on your platform to the ActiveFence T&S platform.

You can specify one of the ActiveFence supported violation types and/or specify a custom violation for the flag. You can also describe the reason for this flag.

A Flags request must include the flagger's ID, as well as an identifier of either the flagged content,user or collection. Only one of these identifiers should be specified in the request.

If a flag with the same id is defined in ActiveFence already, then its details are updated.

If the flagged item and/or the flagger do not exist in ActiveFence, they are automatically created as empty fields.  

Here is an example of a flag sent to the ActiveFence T&S platform –

{
  "flag_id":"flag1",
  "flagger_id":"user12345",
  "flagged_content_id":"content12345",
  "flagging_reasoning":"this is offensive",
  "flagged_at":"2023-01-15 20:31",
  "violation":"abusive_or_harmful.hate_speech"
}

Each item’s flag appears in the Flags pane on the right of the Moderator’s View when that item is selected.

FLAGS

Each additional flag will appear similarly underneath it.

The result of the Flags request shown above will appear in the Flags pane of the Moderator’s View as shown below –

FLAG

In this example, JOHN DOE is the name of the user referenced in the flagger_id field.

Authorizations:
API Key
Request Body schema: application/json

A Flag request must include an identifier of a flagged content/user/collection, as well as the flagger's ID. In the event that the flagged entity and/or the flagger do not exist in ActiveFence, they are automatically created as empty fields.

flag_id
required
string

The unique identifier of the flag on your platform.

flagger_id
required
string

The ID of the user who created this flag. It is recommended to first add the details of this User using the Users API.

flagged_content_id
string

The unique identifier of the flagged content on your platform.

flagged_collection_id
string

The unique identifier of the flagged collection on your platform

flagged_user_id
string

The unique identifier of the flagged user on your platform.

string or string <date-time>

The date and time in which the item was flagged. This field should be sent as a timestamp in Coordinated Universal Time (UTC). If the field is omitted, it will be automatically populated with the current time at the time of processing. Supports ISO 8601 time string or UNIX number. ISO format: YYYY-MM-DD HH:MM or MM-DD-YYYY HH:MM. For example – “2020-11-23 22:30” 0r “11-23-2015 05:30“.

flagging_reasoning
string <= 1024 characters

Free text that describes the reason for the flag.

violation
string (violation_types)
Enum: "abusive_or_harmful.harassment_or_bullying" "abusive_or_harmful.profanity" "abusive_or_harmful.hate_speech" "abusive_or_harmful.child_grooming" "abusive_or_harmful.graphic_violence" "abusive_or_harmful.general_violence" "abusive_or_harmful.child_abuse" "abusive_or_harmful.promotes_terrorism" "self_harm.general" "adult_content.general" "adult_content.swimwear" "unauthorised_sales.drugs" "unauthorised_sales.alcohol" "unauthorised_sales.weapons" "gambling.gambling" "privacy_violation.PII"

violation types analyzed by ActiveFence

custom_violation
string

Free text that describes a custom violation. This is not one of the violations supported by ActiveFence.

Responses

Request samples

Content type
application/json
{
  • "flag_id": "string",
  • "flagger_id": "string",
  • "flagged_content_id": "string",
  • "flagged_collection_id": "string",
  • "flagged_user_id": "string",
  • "flagged_at": 0,
  • "flagging_reasoning": "string",
  • "violation": "abusive_or_harmful.harassment_or_bullying",
  • "custom_violation": "string"
}

Response samples

Content type
{
  • "response_id": "string"
}